Everyday Math

Ratio Calculator

Reduce two nonnegative whole-number quantities to their simplest ratio and show each share of the combined total.

Private, in-browser calculationUpdated

Let’s work it out

Enter your numbers. We’ll show the working.

Whole number, up to 30 digits; no decimal point.
Whole number, up to 30 digits; no decimal point.

How to use this calculator

  1. Enter first ratio term and the remaining values.
  2. Check the selected units and the counting or calculation convention described below.
  3. Select Calculate to review the result and breakdown. Reset restores the example.

The formula

Simplest ratio = (a / gcd(a,b)) : (b / gcd(a,b))

The greatest common divisor removes the largest whole-number factor shared by the terms. Exact integer arithmetic preserves large ratios without rounding either term. At least one term must be positive.

PUTTING IT INTO PRACTICE

A worked example

12:18 reduces by a greatest common divisor of 6 to 2:3. The first term represents 40% of the combined quantity.

How to interpret your result

Order matters: 2:3 assigns two parts to the first quantity and three to the second. A part-to-part ratio differs from a part-to-total fraction.

Assumptions and limitations

Whole-number, nonnegative terms of up to 30 digits. One zero term is permitted.

Decimal measurements must first be expressed using a common integer scale. This does not solve an unknown proportion or convert incompatible units.