Direct Variation Calculator - Constant of Proportionality

Use this direct variation calculator to find the constant of proportionality k and solve for any unknown in y = kx, with a worked example and graph values.

Updated: June 16, 2026 • Free Tool

Direct Variation Calculator

The first independent value. Used with y₁ to set the constant of proportionality k = y₁ / x₁.

The first dependent value, paired with x₁. Together with x₁ this pair defines k = y₁ / x₁.

Optional. If given, the calculator returns y₂ = k * x₂. Leave at 0 if you want to solve for x₂ from a given y₂ instead.

Optional. If given and x₂ is 0, the calculator returns x₂ = y₂ / k. Leave at 0 if you only need k from the initial pair.

Results

Constant of Proportionality (k)
0
Calculated y₂ 0
Calculated x₂ 0

What Is a Direct Variation Calculator?

A direct variation calculator is a quick tool that turns an initial (x, y) pair into the constant of proportionality k and then uses k to solve for any unknown in the equation y = kx. Type the first x and y to recover k, then enter either a new x to find y or a new y to find x, with no algebra on paper.

  • Physics laws: Apply y = kx to Ohm's law V = IR, Newton's second law F = ma, and Hooke's law F = kx.
  • Geometry and rates: Read k as the constant that turns one quantity into another, such as pi for C = pi * d or speed for d = v * t.
  • Algebra homework: Check problems that ask for the constant of direct variation, or for the missing x or y in y = kx.

Direct variation is the algebraic name for the simplest linear relationship: y is a constant multiple of x, and one known (x, y) pair is enough to fix k and predict the rest.

Direct variation is the multiplicative sibling of inverse variation, where the product y * x is held constant; for that case, Inverse Variation Calculator reports k = y * x and solves for the unknown x or y in y = k / x.

How the Direct Variation Calculator Works

The calculator recovers the constant k from the initial (x₁, y₁) pair, then applies y = kx or x = y / k to whichever new value is given. The result panel always shows k, the computed y₂ when a new x₂ is given, and the computed x₂ when a new y₂ is given.

y = k * x (with k = y / x for x ≠ 0)
  • x₁, y₁: The initial (x, y) pair. Together they fix the constant of proportionality k = y₁ / x₁.
  • k: The constant of proportionality. Equals the slope of the line y = kx through the origin.
  • x₂, y₂: An optional new (x, y) point on the same line. Enter x₂ to read y₂ = k * x₂, or enter y₂ to read x₂ = y₂ / k.

The form has two rows: the first fixes k from a known (x, y) pair, the second asks for a new x₂ or y₂. The result panel updates as inputs change, with the formula box keeping y = kx visible above.

Worked example from a real (x, y) pair

x₁ = 5, y₁ = 20

k = y₁ / x₁ = 20 / 5 = 4; with x₂ = 3, y₂ = k * x₂ = 4 * 3 = 12

k = 4. y₂ = 12 when x₂ = 3.

The constant k is 4, so each unit of x adds 4 to y, and (3, 12) sits on the line y = 4x through the origin.

According to Wolfram MathWorld, two quantities y and x are directly proportional if y is given by a constant multiple of x, so y = kx and the proportionality constant is the ratio k = y / x for x != 0.

When the (x, y) pair comes from a real measurement, the same k can be recovered as the slope of a least-squares line; Linear Regression Calculator returns the slope, intercept, R squared, and predicted values for an ordinary y = a + bx fit.

Key Concepts Behind Direct Variation

Four small ideas explain why direct variation behaves the way it does and keep the simple y = kx rule from being confused with a generic y = a + bx line.

Constant of proportionality k

The single number that scales x into y. The same k works for every (x, y) pair on the line.

Line through the origin

y = kx is a straight line with y-intercept 0 and slope k. Every point on the line has the same ratio y / x.

Direct vs inverse variation

In direct variation the ratio y / x stays constant; in inverse variation the product y * x stays constant.

Graph and slope

The graph of y = kx is the visual signature of direct variation, and the slope of that line equals k.

The ratio y / x is the heart of the rule. When that ratio is the same for every pair, the data lies on a single line through the origin; when it drifts, a more general linear model is needed.

The constant k is itself a ratio y / x, so a quick sanity check is to compare k against the y : x ratio computed by Ratio Calculator, which simplifies, scales, and lists part-to-part and part-to-whole views of the same pair.

How to Use the Direct Variation Calculator

Fill in the first row with the initial (x₁, y₁) pair to set k, then use the second row to ask for a new x₂ or y₂. The result panel updates as you type, so trying a new value takes one keystroke and a click.

  1. 1 Enter the initial x₁ and y₁: Type the first independent value into the Initial x (x₁) field and the matching dependent value into Initial y (y₁). Together they define k = y₁ / x₁.
  2. 2 Read the constant k: Look at the highlighted Constant of Proportionality (k) row. The value shown is the slope of the y = kx line through the origin.
  3. 3 Enter a new x₂ to find y₂: Type any real number into New x (x₂). The Calculated y₂ row updates to y₂ = k * x₂ right away.
  4. 4 Or enter a new y₂ to find x₂: Leave x₂ at 0 and type a value into New y (y₂) instead. The Calculated x₂ row updates to x₂ = y₂ / k for any non-zero k.
  5. 5 Test edge cases: Type a negative pair, x₁ = y₁ = 0, or a large value to see how the result panel responds.

Example: a student needs the constant of direct variation for (3, 9.4248) to predict the value at x₂ = 7. They type 3 into Initial x and 9.4248 into Initial y, read k = 3.1416 in the Constant row, and type 7 into New x to see y₂ = 21.9911. The answer matches the circumference of a circle of diameter 7, because C = pi * d is a direct variation with k = pi.

When the goal is to express k as a percent grade rather than a raw slope, Slope Percentage Calculator takes the same rise-over-run pair and returns the percent slope, the angle in degrees, and the run-length needed for a chosen rise.

Benefits of Using This Direct Variation Calculator

The direct variation rule is short, but applying it to a new x or y by hand is the kind of work where sign errors and division-by-zero slips are easy to make. The calculator removes that risk and adds a built-in cross-check.

  • Solve for any of the three variables: The result panel returns k, the computed y₂, and the computed x₂ in a single view, so the same form covers the three common direct-variation questions without picking a different tool.
  • Built-in k = y / x cross-check: The constant of proportionality row uses k = y₁ / x₁, the same ratio as the formula box. The two stay in sync on every input, so a discrepancy would surface immediately.
  • Works for negative and zero cases: Negative pairs give a negative k, the (0, 0) pair is treated as the constant k = 0 line, and a non-zero y₁ at x₁ = 0 is flagged as undefined so the user knows the rule does not apply.
  • Connects to physics and geometry: The same y = kx form covers Ohm's law V = IR, Hooke's law F = kx, circumference C = pi * d, and distance d = v * t, so the tool is useful well past the algebra classroom.

The biggest practical benefit is the cross-check between the formula box and the result panel. The formula says k = y / x, the result panel shows the same k computed from the user's first row, and any new (x₂, y₂) is a point on the line y = kx.

Surface area to volume ratio is a direct variation of surface area with volume for shapes such as cubes and spheres, so the same y = kx form applies; Surface Area to Volume Ratio Calculator reports the ratio for a chosen shape and size so k can be read off the same line.

Factors That Affect the Result and Its Limits

The rule itself is fixed, but a few input choices change the meaning of the result rows.

Sign of the input pair

Positive and negative pairs both give a well-defined k, but a negative k means the line slopes downward through the origin. The result panel preserves the sign, so y₂ and x₂ also carry the sign.

Whether x₁ is zero

x₁ = 0 with a non-zero y₁ is not a direct variation, because y = k * 0 = 0 for any k. The result panel returns k = 0 to reflect that the rule does not apply.

Magnitude of the constant k

Large |k| means y grows quickly with x, small |k| means y grows slowly, and |k| close to 1 means the new value is close to the input.

Domain of the underlying model

Direct variation is exact only when the underlying relationship really is y = kx. For real data with scatter, the linear-regression slope is the closest analogue.

  • Direct variation is the special case y = kx with no constant term. A line such as y = 2x + 3 is not a direct variation, and the calculator will not represent the +3 term.
  • When k = 0, the new y₂ is 0 for any new x₂, and the new x₂ is undefined for any non-zero y₂ because y / 0 has no real value.

When the question really is about a direct variation, the result panel is the complete answer. The other math-conversion calculators cover the next step: a least-squares slope for noisy data, a percent-grade view of the same slope, or a constant-ratio view of two quantities that scale together.

According to Wikipedia, y is directly proportional to x if there is a positive constant k such that y = kx, the relation is a linear equation in two variables with a y-intercept of 0 and a slope of k, and the real-world examples include distance versus time at constant speed, circumference versus diameter with constant pi, and force versus mass with constant gravitational acceleration.

The same y = kx line, written as kx - y = 0, is the boundary case of a linear inequality; for the same pair turned into kx - y > 0 or kx - y < 0, Linear Inequality Calculator plots the half-plane, lists the sign chart, and reports the values of x for which the inequality holds.

Direct variation calculator showing the constant of proportionality k, the y = kx formula, a worked example with x and y values, and a straight-line graph through the origin.
Direct variation calculator showing the constant of proportionality k, the y = kx formula, a worked example with x and y values, and a straight-line graph through the origin.

Frequently Asked Questions

Q: What is direct variation?

A: Direct variation is the relationship y = k * x between two variables for a non-zero constant k. The same k works for every (x, y) pair, so a single known pair is enough to fix the constant and predict the rest. The graph is a straight line through the origin whose slope equals k.

Q: What is the direct variation formula?

A: The direct variation formula is y = k * x, where k is the constant of proportionality. The same constant is the ratio k = y / x for x != 0, so any one known (x, y) pair is enough to recover k.

Q: How do you find the constant of direct variation?

A: Pick any known (x, y) pair and compute k = y / x. For the pair (5, 20) the constant is k = 20 / 5 = 4, and the line y = 4x passes through the origin with that slope.

Q: How do you solve for y in y = kx?

A: Once k and x are known, y is the product y = k * x. If only k and y are known, x is the quotient x = y / k. The calculator does both at once and updates the result panel as the inputs change.

Q: What is the difference between direct and inverse variation?

A: Direct variation holds the ratio y / x constant and the graph is a straight line through the origin. Inverse variation holds the product y * x constant and the graph is a hyperbola. The two together cover the standard proportional-relationship pair.

Q: What are real-world examples of direct variation?

A: Ohm's law V = I * R, Newton's second law F = m * a, Hooke's law F = k * x, circumference C = pi * d, and distance d = v * t are all direct variations. The constant of proportionality is the resistance, mass, spring constant, pi, or speed.