ThisCalculator

Math

Calculating Ratios: Formula and Worked Example

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Calculating Ratios: Formula and Worked Example

Calculating a ratio means comparing two or more quantities by division, usually to show how much of one quantity there is relative to another. Enter two nonnegative quantities in the calculator to get their simplified ratio and the value of the first quantity divided by the second.

Formula

For two quantities a and b, their ratio is written a:b and means a divided by b. To simplify a ratio of whole numbers, divide both parts by their greatest common divisor (GCD):

Simplified ratio = (a ÷ GCD(a,b)) : (b ÷ GCD(a,b))

Ratio value = a ÷ b

  • a is the first quantity; it has no specific unit in this general calculator.
  • b is the second quantity, in the same unit as a when the ratio is a direct comparison.
  • The ratio value is dimensionless when both quantities use the same unit.

The calculator’s simplified-ratio output displays the first part; the second part is obtained by applying the same divisor to b. For the defaults, GCD(6,4) is 2, so the simplified ratio is 3:2. The ratio value is 6 ÷ 4 = 1.50. A ratio written with a colon is a pair of numbers, not a single decimal; the decimal output is an additional way to express the comparison.

Worked Example

Using the default quantities, a = 6 and b = 4:

  1. Find the greatest common divisor: GCD(6,4) = 2.
  2. Divide both quantities by 2: 6 ÷ 2 = 3 and 4 ÷ 2 = 2.
  3. Write the simplified ratio: 3:2.
  4. Divide the first quantity by the second: 6 ÷ 4 = 1.5, or 1.50 to two decimal places.

Thus, 6:4 simplifies to 3:2, and the first quantity is 1.50 times the second.

How Ratios Work

A ratio describes a relative relationship, rather than simply listing two amounts. A recipe containing 2 cups of flour for every 3 cups of water has a flour-to-water ratio of 2:3. If the recipe is doubled, 4:6 describes the same relationship and simplifies back to 2:3. The order matters: 2:3 is not the same as 3:2.

Ratios can compare parts with one another or a part with a whole. If a group has 3 red objects and 5 blue objects, the red-to-blue ratio is 3:5. There are 8 objects altogether, so the red-to-total ratio is 3:8. These answer different questions; be clear about which quantities you are comparing.

In a ratio such as 3:2, the numbers are often called parts. It does not necessarily mean there are exactly 3 items and 2 items: it could describe 30 and 20, or 300 and 200, because those pairs have the same proportion.

When to Use a Ratio

Ratios are useful when the relationship between quantities matters more than their individual sizes. Common examples include comparing ingredients, map distances, mixture components, classroom counts, and dimensions. If comparing unlike units, first decide whether the relationship is meaningful and convert units when needed. For example, comparing 1 metre with 50 centimetres directly as 1:50 is misleading; convert both to the same unit, giving 100:50, or 2:1.

To scale a ratio for a larger or smaller quantity, multiply or divide both parts by the same number. Suppose a paint mixture uses 2 parts pigment to 7 parts binder. For 27 total parts, each original part is multiplied by 3, giving 6 parts pigment and 21 parts binder. The ratio remains 2:7.

For percentages, use the part-to-whole ratio and multiply its decimal value by 100. If 15 of 60 entries meet a condition, the ratio is 15:60 = 1:4; its decimal value is 15 ÷ 60 = 0.25, or 25%. A percentage is not interchangeable with every ratio: it specifically expresses a part relative to 100.

Choosing the Right Form and Avoiding Mistakes

Use the format that answers the question: a simplified colon ratio for a compact comparison, a decimal for “how many times as much,” or a percentage when the comparison is part-to-whole. For more than two quantities, divide every quantity by the same common factor. For example, 12:18:30 simplifies to 2:3:5 by dividing each number by 6.

  • Keep the order consistent. “A to B” means A comes first; reversing the quantities reverses the comparison.
  • Compare compatible units. Convert units before calculating when they differ, such as feet and inches or litres and millilitres.
  • Distinguish ratio from difference. The ratio of 10 to 5 is 2:1; the difference is 5.
  • Do not round too early. Keep exact values while simplifying or scaling, then round a decimal only for presentation.
  • Check zero values. A ratio can include zero in one part, but division by a zero second quantity has no defined finite value.

For whole-number ratios, the greatest common divisor gives the simplest equivalent integer ratio. If the quantities are measured values with decimals, you can divide by a common factor or scale them to manageable integers, but retain enough precision to avoid changing the relationship through premature rounding.

What the Calculator Does Not Tell You

A ratio summarizes a comparison; it does not explain why the quantities have that relationship or whether the comparison is useful. Two groups with a 1:2 ratio may have 10 and 20 members or 1,000 and 2,000, so the ratio alone does not reveal scale. It also does not establish causation, quality, or a required amount.

This simple calculator accepts nonnegative numbers and is intended for a two-quantity comparison. It simplifies the first part for whole-number inputs and gives the quotient to two decimal places. For decimal quantities, the displayed quotient remains useful, but a simplified integer ratio may require choosing an appropriate precision and scaling both values. If the second quantity is zero, the quotient cannot be calculated.

Frequently Asked Questions

How do you calculate a ratio?
Write the quantities in the stated order, then divide both by their greatest common divisor to simplify a whole-number ratio. For 12 and 8, the GCD is 4, so 12:8 becomes 3:2.

How do you simplify a ratio?
Find the largest whole number that divides every part evenly, then divide each part by it. For 15:25, divide both numbers by 5 to get 3:5.

Can a ratio be written as a fraction?
Yes. The ratio a:b can be written as the fraction a/b when you want its numerical value. The fraction keeps the order clear, but a colon ratio is often easier to read when comparing several parts.

What is the difference between a ratio and a proportion?
A ratio compares quantities, such as 2:3. A proportion states that two ratios are equal, such as 2:3 = 4:6.

Do units matter when calculating a ratio?
They matter whenever the quantities use different units. Convert both to the same unit before comparing; otherwise the numerical ratio can be misleading. If both values share the same unit, that unit cancels in the quotient.

Related

Formula used
in a | First quantity | - | 6 | 0
in b | Second quantity | - | 4 | 0
out ratio | Simplified ratio a:b | - | a / gcd(a,b) | 0
out value | First quantity divided by second | - | a / b | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.