Starlight Tools

Direct and Inverse Variation Calculator — Solve x, y, or k

Exact fractions, decimals, signed values, and scientific notation are supported. All work stays in your browser.

Find the constant of variation (constant of proportionality), solve a missing variable, predict a second value, check two pairs, or classify a table as direct proportion, inverse proportion (indirect variation), or neither.

What do you want to do?

k = y/xSelected formula: the ratio y/x stays constant.

Enter integers, terminating decimals, fractions such as -3/4, or scientific notation such as 1.2e3. Fractions stay exact.

Unit labels (optional)

Variation result

Exact answer
k = 5/2 exact
Direct variation: y = (5/2)x.
Relationshipy = (5/2)x
Constant k5/2 ≈ 2.5
Valuesx = 4, y = 10
Invarianty/x = 10/4 = 5/2
Verification(5/2) × 4 = 10 ✓

Step-by-step solution

Interactive variation graph

A direct-variation line through the origin with slope k = 5/2.

Graph value table

This table is the accessible equivalent of the graph. Use standard browser table navigation or scroll it horizontally.

Values on y = (5/2)x
xyPoint type

Direct and inverse variation formula reference

TaskDirect variationInverse variation
Solve yy = kxy = k/x
Solve xx = y/kx = k/y
Solve kk = y/xk = xy
Two pairsy₁/x₁ = y₂/x₂, or y₁x₂ = y₂x₁x₁y₁ = x₂y₂

Terms

Independent variable (x)
The input or variable chosen freely.
Dependent variable (y)
The output whose value depends on x.
Constant of variation / constant of proportionality (k)
The fixed multiplier in direct variation or fixed product in inverse variation.
Invariant
A quantity that does not change: y/x for direct variation or xy for inverse variation.

How to choose the model

TestDirect variationInverse variation
Number patterny/x is constantxy is constant
GraphStraight line through the originReciprocal curve approaching both axes
If x doublesy doublesy halves
Equationy = kxy = k/x

Direct variation is not every linear equation

A general linear equation is y = mx + b. It is direct variation only when b = 0, so the graph passes through (0,0) and its slope m is the constant k.

Common mistakes

  • For direct variation, keep the order y/x consistent; using x/y gives the reciprocal constant.
  • A decreasing relationship is not automatically inverse variation. Its products xy must stay constant.
  • Convert corresponding quantities to consistent units before comparing them.
  • Do not treat rounded observations as perfectly exact; use the reported tolerance note.

How to solve variation problems

1. Choose the task and model

Choose solve, predict, check, or identify. Use direct when y/x is fixed and inverse when xy is fixed.

2. Enter the known values

Enter only the fields shown. Fractions, decimals, signed values, and scientific notation are accepted.

3. Find the invariant

Divide y by x for direct variation or multiply x and y for inverse variation.

4. Solve and verify

Substitute k, solve the requested value, and check the same ratio or product.

Worked examples

Direct variation: find k and a new y

Problem: If y = 10 when x = 4, find k and y when x = 6.

  1. Substitute: 10 = k(4).
  2. Simplify: k = 10/4 = 5/2.
  3. Equation: y = (5/2)x.
  4. New value: y = (5/2)(6) = 15.
  5. Verify: 10/4 = 15/6 = 5/2.

Inverse variation: find a missing x

Problem: If y = 8 when x = 3, find x when y = 6.

  1. Substitute: k = xy = 3(8).
  2. Simplify: k = 24.
  3. Equation: y = 24/x.
  4. Solve: x = k/y = 24/6 = 4.
  5. Verify: 3(8) = 4(6) = 24.

Exact fraction example

Problem: In direct variation, y = 5/6 when x = 1/3. Find y when x = 3/2.

  1. Substitute: 5/6 = k(1/3).
  2. Simplify: k = (5/6) ÷ (1/3) = 5/2.
  3. Equation: y = (5/2)x.
  4. Solve: y = (5/2)(3/2) = 15/4.
  5. Verify: (5/6)/(1/3) = (15/4)/(3/2) = 5/2.

Classify a table

Problem: Classify (2,12), (3,8), and (4,6).

  1. Ratios: 12/2 = 6, 8/3, 6/4 = 3/2; they are not constant.
  2. Products: 2·12 = 24, 3·8 = 24, 4·6 = 24.
  3. Conclusion: inverse variation.
  4. Equation: y = 24/x.
  5. Verify each row by confirming xy = 24.

Practical interpretation of k

Hourly pay — direct

At £18 per hour, pay y varies directly with hours x. Here k = 18 £/hour: the constant is the pay earned per hour.

Constant speed — direct

Travelling 180 miles in 3 hours gives k = 60 miles/hour. Distance equals speed times time.

Worker-hours — inverse

If 4 workers need 15 hours, k = 60 worker-hours. With a fixed workload, workers multiplied by hours stays 60.

Fixed-distance travel — inverse

For a 300-mile trip, speed times time is k = 300 miles. At 75 mph, time is 4 hours.

Review, accuracy, and privacy

Authored and reviewed by: Starlight Tools Mathematics Review Team, experienced in exact-arithmetic calculator implementation and algebra-content quality assurance. No individual credentialed reviewer is claimed because no verified individual attribution is available for this page.

Review method: formulas were checked by algebraic substitution, exact-fraction cases and zero restrictions were tested, table classifications were verified from both invariants, and definitions were compared with OpenStax Elementary Algebra 2e, §8.9 and Mathematics LibreTexts, Direct and Inverse Variation. Reviewed .

Integer, decimal, fraction, and scientific-notation inputs are converted to reduced fractions and calculated exactly. Decimal approximations are display aids. For tables or pairs representing rounded observations, invariants within one part in one billion of one another are judged consistent; the result explicitly says when this rounding allowance, rather than exact equality, was needed. Inputs are limited to 40 digits.

Standard direct and inverse variation use k ≠ 0. Inverse variation also excludes x = 0 and y = 0. Direct variation may include (0,0), but that point alone cannot determine k. All calculations run locally; values are not uploaded or stored.

Direct and inverse variation FAQs

Can the constant of variation k be negative?

Yes. A negative k gives a decreasing direct-variation line or inverse-variation branches in quadrants II and IV. In standard variation, k must not be zero.

Is inverse variation the same as indirect proportion?

In many school texts, indirect variation, inverse variation, and inverse proportion all mean y = k/x. Check the stated formula because terminology can vary.

How is direct variation different from a linear function?

Direct variation is the special linear function y = kx with y-intercept zero. A general linear function y = mx + b is direct variation only when b = 0.

How do I solve when k is already known?

In “Solve x, y, or k” mode, select x or y as the unknown and enter k plus the other variable. The calculator uses y = kx or y = k/x.

How do I classify an x-y table?

Compare y/x down the table for direct variation and xy down the table for inverse variation. “Identify the relationship” calculates both columns and marks inconsistent rows.

How are rounded data values handled?

All entered values are converted to exact fractions. In pair and table checks, invariants that differ by no more than one part in one billion are treated as matching rounded observations, and the result says when tolerance was used.

Explore more tools