Direct and Inverse Variation Calculator

Solve any one missing value or verify two completed pairs. Fractions, decimals, signed values, and scientific notation are supported; your entries stay in your browser.

Choose the relationship, enter two corresponding xy pairs, and get the missing value, constant of variation k, invariant check, and worked steps.

Enter two corresponding pairs

y = kxThe ratio y/x stays constant.
Pair 1
Pair 2

Leave exactly one of the four values blank to solve it, or fill all four to verify. Examples: -2, 3/4, 1.5, 2e3.

Unit labels (optional)
Try an example

Variation result

Missing value
y₂ = 28
Both pairs have the same direct-variation constant.
Relationshipy = 4x
Constant k4
Completed pairs(3, 12) and (7, 28)
Invarianty₁/x₁ = y₂/x₂ = 4
Verification12/3 = 28/7 ✓

Advertisement

Step-by-step solution

Advertisement

Direct vs. inverse variation

Direct variation

Use y = kx. Multiplying x by a factor multiplies y by the same factor. The graph is a straight line through the origin.

k = y/x

Inverse variation

Use y = k/x, equivalently xy = k. Multiplying x by a nonzero factor divides y by that factor.

k = xy

Quick comparison

FeatureDirectInverse
Equationy = kxy = k/x
Constant checky/x = kxy = k
Two-pair equationy₁x₂ = y₂x₁x₁y₁ = x₂y₂
Zero values(0,0) lies on every direct-variation graphx = 0 is undefined; standard inverse variation uses k ≠ 0

How to solve variation problems

1. Identify the pattern

Choose direct when the ratio y/x stays fixed. Choose inverse when the product xy stays fixed.

2. Find k

Use one complete pair. Divide for direct variation; multiply for inverse variation.

3. Substitute

Put the known value from the other pair into y=kx or y=k/x.

4. Verify both pairs

Recalculate the invariant with both pairs. Matching values confirm the relationship, allowing for displayed rounding.

Units of the constant

For direct variation, the units of k are y-units per x-unit, such as miles per hour. For inverse variation, they are the product of the two units, such as worker-hours. Keep corresponding units consistent between Pair 1 and Pair 2.

Accuracy, assumptions, and privacy

The calculator evaluates decimal and fractional inputs with JavaScript floating-point arithmetic, displays up to 12 significant digits, and verifies completed pairs with a relative tolerance of 1 × 10−10. Values whose intermediate products overflow the supported range are rejected instead of showing infinity.

Standard inverse variation here means y=k/x with k≠0, so neither coordinate may be zero. Direct variation permits the origin, but at least one pair with nonzero x is needed to determine k. All calculations run locally in your browser; inputs are not uploaded or stored by this tool. Last reviewed: 4 August 2026.

Direct and inverse variation FAQs

What is direct variation?

Direct variation follows y=kx. Its ratio y/x is constant wherever x≠0, and its graph passes through the origin.

What is inverse variation?

Inverse variation follows y=k/x, or xy=k, with a nonzero constant k. As one variable grows in magnitude, the other shrinks proportionally.

How do I find the constant of variation?

For direct variation, calculate k=y/x from a pair with nonzero x. For inverse variation, calculate k=xy.

How do I know which variation type to use?

Test several pairs from the relationship. A constant quotient y/x signals direct variation; a constant product xy signals inverse variation.

Can direct variation include zero?

Yes. Because y=kx, setting x=0 also gives y=0. The origin alone cannot determine k, so another nonzero-x pair is required.

Why can’t inverse variation use zero?

The expression k/x is undefined at x=0. Under the standard assumption k≠0, y cannot be zero either.

Can I check completed pairs instead of solving?

Yes. Fill all four fields. The calculator compares the two ratios for direct variation or the two products for inverse variation and reports whether they match.

Explore more tools