Skip to content

Math

Ratio Calculator

Enter two whole numbers, A and B, and the calculator simplifies the ratio by dividing both by their greatest common divisor (GCD). It also reports A divided by B as a decimal and A as a percentage of the total. Use it for screen sizes, recipes, mixes, and map scales.

Updated 2026-11-12 Editorial estimate Calccc Editorial Team Free · No sign-up

Loading calculator…

What this calculator does

A ratio compares two quantities without saying how large either one is. The pair 16:9 describes the shape of a screen whether it is a phone or a projector. This calculator reduces any whole-number ratio to its smallest whole-number form, then shows two other views of the same relationship: the decimal value of A divided by B, and A as a percentage of the combined total. Those forms answer different questions, which makes a spec sheet or a recipe easier to check.

How to use it

  1. Enter the first whole number, A, in the left field.
  2. Enter the second whole number, B, in the right field.
  3. Select Calculate to see the simplified ratio, decimal, and percentage.
  4. Read the simplified ratio as the smallest whole-number pair with the same relationship.
  5. Change either number to compare a different pair.

How it works

Find the greatest common divisor (GCD) of A and B, which is the largest whole number that divides both evenly. Divide both parts by that factor to get the simplified ratio: A:B becomes (A divided by the factor) to (B divided by the factor). The decimal value is A divided by B. The percentage is A divided by (A plus B), multiplied by 100. Because B appears in the denominator of both the decimal and the percentage, B must be greater than zero.

Example calculations

Example 1: a screen resolution

1920:1080 has a GCD of 120. Dividing both parts by 120 gives 16:9, the familiar widescreen shape. The decimal is 1920 divided by 1080, or about 1.778, and 1920 is 64% of the total of 3000.

Example 2: a simple ratio

12:18 has a GCD of 6, so it simplifies to 2:3. The decimal is 12 divided by 18, or about 0.667, and 12 is 40% of the total of 30. The simplified ratio and the percentage agree: 2 out of every 5 parts is 40%.

Example 3: an invalid ratio

5:0 cannot be simplified into a meaningful comparison. Dividing by zero is undefined, so the decimal and the percentage have no value. The calculator flags the entry instead of returning a misleading number.

What the result means

The simplified ratio is the cleanest way to describe a relationship, but it hides the actual size. Two recipes in a 2:3 ratio could make one cup or one hundred cups. The decimal value tells you how many times larger A is than B, which is useful when comparing to a target, such as an aspect ratio near 1.778 or a mix near 2.0. The percentage of the total tells you the share, which is useful for budgets and blends. All three describe the same pair, so they should never disagree. When both numbers are large, the simplified ratio may expose a familiar standard.

Common mistakes

  • Entering zero for B and expecting a number instead of an error.
  • Simplifying by only one common factor instead of the GCD.
  • Confusing the ratio A:B with the fraction A divided by the total.
  • Entering decimals when the tool expects whole numbers.
  • Reading a simplified ratio as an exact quantity rather than a proportion.

Assumptions and limits

  • Both inputs are whole numbers, including zero for A.
  • B is greater than zero, because division by zero is undefined.
  • The ratio is simplified by the GCD, not any smaller factor.
  • The percentage is A's share of A plus B, not A's share of B alone.
  • The decimal is rounded for display, while the simplified ratio stays exact.

Frequently asked questions

What does a simplified ratio mean?

It is the smallest whole-number pair that keeps the same relationship. Dividing 1920 and 1080 by 120 gives 16:9, which describes the same shape with smaller numbers.

Why is a ratio with B equal to zero invalid?

The decimal and percentage both divide by B, and division by zero has no defined result. A comparison also needs a second quantity, so there is nothing to simplify against.

How is the GCD found?

It is the largest number that divides both A and B with no remainder. The Euclidean algorithm is a reliable method: divide the larger number by the smaller, then repeat with the remainder until it reaches zero.

What is the difference between a ratio and a fraction?

A ratio compares two parts of a whole, such as 2:3. A fraction compares one part to the whole, such as 2/5. The ratio 2:3 corresponds to 2/5 for the first part and 3/5 for the second.

Can I use decimals in a ratio?

This tool accepts whole numbers. To simplify a ratio with decimals, multiply both parts by the same power of ten to clear the decimal points, then simplify the resulting whole numbers.

How do I turn a ratio into a percentage?

Add the two parts to get the total, then divide the part you want by the total and multiply by 100. For 12:18, the total is 30, and 12 divided by 30 is 0.4, or 40%.

Sources

Editorial review completed 2026-11-06. This is an educational estimate, not professional advice.

2026 update

How to use the professional output

This page is not just a formula box. The result is designed to be checked, compared, and taken away.

  • Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
  • A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
  • Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.

The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.

Go deeper

Guides that explain the math

Ratio Calculator: Simplify, Scale, and Solve Proportions
Math

Ratio Calculator: Simplify, Scale, and Solve Proportions

A ratio compares two quantities. Learn to simplify with the greatest common divisor, scale recipes and maps, tell part-to-part from part-to-whole, and solve proportions.

8 min read

Calccc Editorial Team · Updated 2026-11-12

Prepared by Calccc Editorial Team as an educational estimate. This page is not a licensed professional review and is not financial, medical, legal, or tax advice.

Editorial estimate prepared by the Calccc Editorial Team; not a licensed professional review.