Skip to content
Calculate.FAST

Ratio calculator

Simplify a two-part ratio, use it to divide a total, or solve one missing value in an equivalent proportion.

Two-part ratio
Calculation

First side of the ratio; use a whole number when simplifying.

Second side of the ratio; use a whole number when simplifying.

Simplified ratio
2 : 3
Original ratio
12 : 18
Greatest common divisor
6
Scale factor
÷ 6

Relative size of the two parts

The two bars share a scale and supplement the exact numeric labels; length and colour are not the only way the relationship is shown.

Both sides were divided by the same greatest common divisor, so the relationship is unchanged.

Included

  • Two-part ratios with non-negative values
  • Whole-number simplification using the greatest common divisor
  • Dividing a non-negative total between two ratio parts
  • Solving one missing fourth term in a positive proportion

Not included

  • Negative ratios or ratios with three or more parts
  • General symbolic equations or more than one unknown value
  • Unit conversion or checking whether quantities use compatible units
  • Recipe, mixture, dosage or safety guidance

What this means

A ratio compares two quantities in a fixed order. 12:18 and 2:3 describe the same relationship because both sides of 12:18 can be divided by their greatest common divisor, 6.

When a total is divided in a ratio, each side receives its fraction of all ratio parts. For 2:3, there are five parts altogether: the first share is 2/5 of the total and the second is 3/5.

A proportion states that two ratios are equal. In a:b = c:x, the missing value is x = b × c ÷ a. This calculator requires all three known proportion terms to be greater than zero so the displayed solution is unique and valid.

Formula & worked example

Simplify: divide both sides by gcd(a, b)
Divide a total: left = total × a ÷ (a + b); right = total × b ÷ (a + b)
Solve a:b = c:x: x = b × c ÷ a

Simplify the ratio 12:18

Greatest common divisor of 12 and 18
6
First side: 12 ÷ 6
2
Second side: 18 ÷ 6
3

The simplified ratio is 2:3. Multiplying both sides by 6 reconstructs the original 12:18 ratio.

How this calculation works

The calculation follows the formulas, definitions and assumptions explained on this page. The references below support the method and any stated boundaries.

Official sources

Common questions

Can one side of a ratio be zero?
Yes for simplification and division, as long as both sides are not zero. For example, 0:18 simplifies to 0:1. Solving a proportion requires all three known terms to be greater than zero.
What happens when the total is zero?
Both amount shares are zero, but the ratio still describes their percentage split. Dividing zero in a 2:3 ratio therefore gives amounts 0 and 0 while retaining 40% and 60%.
Do the ratio values need the same unit?
A meaningful direct ratio normally compares quantities expressed on a compatible basis. This calculator performs the entered arithmetic only and does not convert or validate units.
Why must simplification use whole numbers?
This mode uses the greatest common divisor, which is defined here for non-negative whole-number sides. Decimal proportions can still be divided or solved in the other modes.

Related calculators