Home · Everyday · Percentages & Ratios · Direct Variation Calculator
Direct Variation Calculator
Given one pair of directly proportional values, work out the constant of variation and predict the partner of any new value.
What this calculator does
Given one pair of directly proportional values, work out the constant of variation and predict the partner of any new value. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
Two quantities vary directly when their ratio stays constant: y = kx for a fixed k. One known pair fixes k = y₁/x₁, and any new x then gives y₂ = k·x₂. Doubling x doubles y, and the graph is a straight line through the origin.
Direct variation only applies when the relationship truly passes through zero — a taxi fare with a fixed flag-fall fee, for example, is not direct variation. The known x₁ must not be zero, since k would be undefined.
Worked example
With the example inputs this page opens with (known x (x₁) 4, known y (y₁) 12, new x (x₂) 7), the result is 21.0000 — predicted y (y₂). Computed from the inputs on this page with the formula below — change any figure and every result updates.
Quick reference
| New x (x₂) | Predicted y (y₂) | Constant of variation k | Ratio y₂ : x₂ check (y₂/x₂) |
|---|---|---|---|
| 1 | 3 | 3 | 3 |
| 2 | 6 | 3 | 3 |
| 3 | 9 | 3 | 3 |
| 5 | 15 | 3 | 3 |
| 7 | 21 | 3 | 3 |
| 10 | 30 | 3 | 3 |
| 12 | 36 | 3 | 3 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
How do I know two quantities vary directly?
Check whether y/x is the same for every data pair and whether y is zero when x is zero. If both hold, the relationship is y = kx with that shared ratio as k.
How does the Direct Variation Calculator work?
Given one pair of directly proportional values, work out the constant of variation and predict the partner of any new value. Known x · Known y · New x → Predicted y. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Direct Variation Calculator need?
Known x · Known y · New x → Predicted y. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Direct Variation Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.