Ratio CalculatorFree online math calculator — instant results, no sign-up

Solve A:B = C:D for the missing value (enter 0 for D).

Inputs

D
12
Simplified A:B3:4

Sign in to save results and favorites.

About the Ratio Calculator

This calculator solves for the unknown fourth term D in an equivalent proportion of the form A:B = C:D. It also reduces the baseline ratio A:B to its simplest integer form. It is commonly used by students, designers, chefs, and builders scaling recipes, dimensions, or physical mixtures.

A
The first term (antecedent) of the reference ratio. Must not be zero.
B
The second term (consequent) of the reference ratio.
C
The first term of the target ratio to scale against A:B.

Formula and method

D = (B × C) / A
Simplified A:B = (A / gcd(A, B)) : (B / gcd(A, B))
  • ANumerator or first quantity in the reference ratio
  • BDenominator or second quantity in the reference ratio
  • CFirst quantity in the scaled ratio
  • DCalculated fourth term satisfying the proportion A:B = C:D
  • gcd(A, B)Greatest common divisor of integer values A and B

The calculator multiplies term B by term C and divides the product by term A using cross-multiplication, rounding the final value of D to 6 decimal places. Simultaneously, it divides A and B by their greatest common divisor to return the simplified ratio A:B.

Worked example

These are the calculator's starting values and the results it actually produces for them.

Inputs

  • A3
  • B4
  • C9

Results

  • D12
  • Simplified A:B3:4

How to use the Ratio Calculator

  1. 1Enter the known ratio quantities into fields A and B.
  2. 2Enter the known scaling quantity into field C.
  3. 3Cross-multiply B and C, then divide by A to solve for unknown term D.
  4. 4Inspect D and the reduced ratio A:B formatted in lowest integer terms.

Reading your result

The result D represents the exact quantity needed to keep the relationship C:D identical to A:B. The 'Simplified A:B' output displays the most compact whole-number ratio representation of your baseline inputs.

Limitations

The calculation requires A to be non-zero; entering zero for A causes a division-by-zero error. It also assumes a direct linear relationship and solves specifically for D rather than allowing arbitrary selection of any missing variable without rearranging the inputs.

Common questions

What happens if A is zero?+

Because solving for D involves dividing by A, setting A to zero results in a mathematical division by zero, yielding infinity or an undefined result.

How do I solve for a missing A, B, or C instead of D?+

Rearrange your values so the unknown is in position D. For example, if you need to find C in A:B = C:D, swap positions such that the known ratio is B:A and the target becomes D:C, placing the unknown at the end.

Can I use negative numbers or decimals?+

Yes, decimal and negative values can be entered into the calculation of D, though ratio simplification works best when A and B are positive integers.

Does the calculator save my information?+

Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.

Further reading

You might also like

Results are estimates for informational purposes and are not financial, medical or legal advice.