Direct Variation Calculator
Enter any two of the three values in y = kx and this calculator finds the third. Choose "Find Y" to compute the dependent variable, "Find X" to reverse-solve, or "Find K" to derive the constant of variation from a known (x, y) pair. Switch to two-point mode to calculate k from two coordinate pairs, or use the proportion solver (a/b = c/d) to find any missing term. Results update instantly and every step is shown.
Formula
Worked example
A car travels at a constant speed of 60 km/h. After 2.5 hours the distance is d = 60 * 2.5 = 150 km. The constant of variation is k = 60 (speed). To find how long it takes to cover 210 km: t = 210 / 60 = 3.5 hours.
What is direct variation?
Direct variation (also called direct proportion) describes a relationship between two variables where one is always a fixed multiple of the other. If y varies directly with x, then y = kx for some non-zero constant k, called the constant of variation or proportionality constant. The defining features are: the graph is a straight line through the origin (0, 0), the ratio y/x is the same for every pair of values, and scaling x by any factor scales y by the same factor. If x doubles, y doubles. If x is cut in half, y is cut in half. This makes direct variation one of the most fundamental relationships in algebra, physics, chemistry, and economics.
How to use this calculator
Select a solve mode from the dropdown. In "Find Y" mode enter the constant k and an x value to compute y. In "Find X" mode enter k and y to reverse-solve. In "Find K" mode enter a matching (x, y) pair and the calculator derives k for you. Two-point mode accepts two coordinate pairs, confirms whether they are consistent with a single direct variation, and lets you predict y at a new x. Proportion mode solves any missing term in a/b = c/d by cross-multiplication. All modes display a worked step-by-step solution, a live chart, and a plain-language interpretation of the result.
How to identify a direct variation
To check whether a dataset shows direct variation, compute y/x for every pair. If the ratio is constant (within measurement error), you have direct variation and that constant ratio is k. A graph check works just as well: plot the points, and if they lie on a straight line that passes through the origin, the relationship is direct variation. Note that a straight line that does NOT pass through the origin is a linear relationship but NOT direct variation, it has the form y = kx + b where b is non-zero. Direct variation is the special case where b = 0.
Direct variation vs. inverse variation
Direct variation means y = kx: as x grows, y grows proportionally. Inverse variation means y = k/x: as x grows, y shrinks. The two are easy to confuse because both involve a single constant k, but the graphs look completely different. A direct variation graph is a line through the origin; an inverse variation graph is a hyperbola that never touches either axis. Real-world examples of direct variation include wage and hours worked, distance and time at constant speed, and force and acceleration at constant mass. Examples of inverse variation include the time to complete a job as the number of workers increases, and pressure versus volume of a gas at constant temperature.
Common direct variation relationships
| Relationship | Formula | Constant k | Example |
|---|---|---|---|
| Ohm's Law (V and I) | V = R * I | Resistance R (ohms) | 12 V = 4 ohm * 3 A |
| Newton's 2nd Law (F and a) | F = m * a | Mass m (kg) | 20 N = 5 kg * 4 m/s^2 |
| Speed-distance (d and t) | d = v * t | Speed v (m/s or km/h) | 150 km = 60 km/h * 2.5 h |
| Unit price (cost and qty) | C = p * q | Unit price p ($/unit) | $25 = $5 * 5 units |
| Wages (pay and hours) | W = r * h | Hourly rate r ($/h) | $160 = $20/h * 8 h |
| Spring (force and extension) | F = k * x | Spring constant k (N/m, Hooke's Law) | 10 N = 50 N/m * 0.2 m |
| Currency conversion | Y = r * X | Exchange rate r | 110 JPY = 1.10 * 100 USD |
Real-world examples where y = kx holds, with the proportionality constant named.
Frequently asked questions
What is the constant of variation?
The constant of variation (k) is the fixed ratio between y and x in the equation y = kx. It tells you how much y changes for every one-unit increase in x. For example, if k = 4.5, then y increases by 4.5 for each unit added to x. You can always find k by dividing any known y value by its corresponding x value: k = y/x.
How do you write a direct variation equation?
A direct variation equation takes the form y = kx. To write one, first find k by dividing a known y by its corresponding x. Then substitute k into the formula. For instance, if y = 15 when x = 3, then k = 15/3 = 5, and the equation is y = 5x. Use this equation to find y for any future x, or to reverse-solve for x when y is given.
Does a direct variation graph always pass through the origin?
Yes. By definition y = kx implies that when x = 0, y = 0. So the graph of a direct variation always passes through (0, 0). If a line does not cross the origin, it is a general linear equation y = mx + b with a non-zero b, which is NOT direct variation.
What is the difference between direct variation and a linear equation?
All direct variation relationships are linear, but not all linear relationships are direct variations. A linear equation has the form y = mx + b. When b = 0 it reduces to y = kx, which is direct variation. When b is non-zero the line does not pass through the origin, so the ratio y/x is not constant and the relationship is not a direct variation.
How do you solve a direct variation problem step by step?
Step 1: Write the formula y = kx. Step 2: Substitute the known pair (x, y) and solve for k by computing k = y/x. Step 3: Write the specific equation with your k value (e.g., y = 3x). Step 4: Substitute the new x or y value to find the unknown. For example, if y = 18 when x = 6, then k = 18/6 = 3 and the equation is y = 3x. When x = 10, y = 3 * 10 = 30.
Can k be negative in direct variation?
Yes. A negative k means y decreases as x increases, but the ratio y/x remains constant. The graph is still a straight line through the origin, but it slopes downward from left to right. Examples include temperature change versus altitude (temperature drops as altitude rises at a roughly constant lapse rate).
What is two-point mode and when should I use it?
Two-point mode lets you enter two observed (x, y) data points. The calculator derives k from the first point and then checks whether the second point is consistent with the same k. Use it when you have recorded data and want to confirm that a direct variation model fits, and to get the equation for making predictions. If the two points give different k values, the relationship is not direct variation.