• Home
  • Blog
  • How to calculate a ratio from two numbers

How to calculate a ratio from two numbers

You have two quantities and want to know how they compare. A ratio is the answer, and it takes about a minute to work out once you know the steps.

The short answer

To calculate a ratio, write the first quantity, then the second, and join them with a colon. If you have 20 apples and 30 oranges, the ratio of apples to oranges is 20 : 30. Then simplify it by dividing both numbers by their greatest common divisor, which gives 2 : 3.

Step by step

  1. Decide the order. "Apples to oranges" means apples come first. Swapping the order swaps the ratio.
  2. Use the same unit for both amounts. Convert minutes and hours, or inches and feet, before you compare.
  3. Write the ratio as first : second.
  4. Simplify. Divide both numbers by the largest number that divides them both evenly.
  5. Check. Multiply the simplified ratio back up. 2 × 10 and 3 × 10 gives 20 and 30 again.

Example 1: apples and oranges

A bowl has 20 apples and 30 oranges. What is the ratio of apples to oranges?
20 : 30 = 2010 : 3010 = 2 : 3

For every 2 apples there are 3 oranges.

Example 2: different units

A class lasts 45 minutes and the break lasts 1 hour. Convert the hour to 60 minutes first.
45 : 60 = 4515 : 6015 = 3 : 4

Three ways to write the same ratio

FormExampleRead as
With a colon2 : 32 to 3
With the word "to"2 to 32 to 3
As a fraction2/32 parts out of every 3 in the second amount
Careful with fractions. The ratio 2 : 3 as a fraction of the whole is 2/5 and 3/5, because the whole is 2 + 3 = 5 parts. See ratio vs fraction for the difference.

Part-to-part and part-to-whole

A part-to-part ratio compares two pieces, such as apples to oranges (2 : 3). A part-to-whole ratio compares one piece with the total, such as apples to all fruit (2 : 5). Both are valid. Just say clearly which one you mean.

Common mistakes

  • Mixing units, for example comparing dollars with cents.
  • Writing the numbers in the wrong order.
  • Stopping before the ratio is fully simplified.
  • Treating 2 : 3 as 2/3 of the whole when it is really 2/5.

To skip the arithmetic, use our simplify ratio calculator. It shows each step. If one number is missing, try the proportion calculator.

Frequently asked questions

How do you calculate a ratio from two numbers?

Write the numbers in order with a colon between them, then divide both by their greatest common divisor. For 20 and 30 the ratio is 20 : 30, which simplifies to 2 : 3.

Can a ratio have decimals?

It can, but it is usually cleaner to multiply every number by 10, 100 or 1000 until they are whole, then simplify.

What if the two amounts have different units?

Convert them to the same unit first. A ratio only makes sense when both numbers measure things in the same unit.

Is a ratio the same as a fraction?

No. A ratio compares two amounts, while a fraction describes one amount as a part of a whole. They are related, and a ratio can be turned into fractions of the total.