Ratio Calculator

Solve A : B = C : D for a missing value, check whether two ratios are proportional, and simplify a ratio to lowest terms, with its decimal and percent forms.

How we test our calculators
Missing value (or proportion check) —
Working —
A : B in simplest form —
A ÷ B as a decimal —
A ÷ B as a percent —%
A as a share of A + B —%

What is a ratio calculator?

A ratio compares two quantities, such as 3 cups of flour for every 4 servings, written 3 : 4 or 3/4. A proportion says two ratios are equal, for example 3 : 4 = 6 : 8. This ratio calculator does three jobs with a ratio A : B.

  • Solve a proportion. Enter A, B and one of C or D, and it finds the missing value so that A : B = C : D. The Working line shows the calculation.
  • Check a proportion. Enter all four values and the Working line says whether the ratios are equal, using cross products.
  • Simplify and convert. It always shows A : B in simplest form, plus A ÷ B as a decimal, A ÷ B as a percent and A as a share of A + B.

Decimal ratios are simplified too: 1.5 : 2.25 becomes 2 : 3. That makes the tool handy for scaling recipes, reading map scales, resizing images to an aspect ratio, unit prices and mixing instructions, anywhere two amounts must grow or shrink together.

Ratios and proportional reasoning are a core part of middle school math. The Common Core standards introduce ratio language, unit rates and tables of equivalent ratios in grade 6 (6.RP.A.1 to 6.RP.A.3), and in grade 7 students decide whether two quantities are in a proportional relationship (7.RP.A.2).

Formula

Solving a proportion

A : B = C : D means the fractions are equal: A/B = C/D. Multiplying both sides by B × D gives the cross-product rule:

A × D = B × C

Rearranging it gives the two formulas the calculator uses:

  • C known, D blank: D = B × C ÷ A
  • D known, C blank: C = A × D ÷ B

If you enter all four values, the calculator compares A × D with B × C. Equal cross products mean the ratios are proportional. Tiny differences caused by computer rounding, such as 0.1 × 3 coming out as 0.30000000000000004, are ignored, so 0.1 : 0.3 and 1 : 3 are correctly reported as equal.

Simplifying a ratio

To write A : B in lowest terms, divide both numbers by their greatest common factor (GCF). For 18 : 24 the GCF is 6, so the ratio is 3 : 4. When A or B has decimals, the calculator first multiplies both by the same power of 10 to make them whole numbers: 1.5 : 2.25 becomes 150 : 225, and dividing by the GCF of 75 gives 2 : 3. It handles up to ten decimal places.

Decimal, percent and part-to-whole

  • A ÷ B as a decimal and as a percent (× 100) compare A with B. For 3 : 4 that is 0.75, or 75%.
  • A as a share of A + B = A ÷ (A + B) × 100. It treats A and B as the two parts of a whole. For 3 : 4, A is 3 of 7 parts, or 42.86%.

The difference matters. In a class with 3 boys for every 4 girls, the number of boys is 75% of the number of girls, but boys make up only 42.86% of the class.

Worked example

Example 1: scaling a recipe

A recipe uses 3 cups of flour for 4 servings. How much flour do you need for 9 servings? Keep the units in the same order on both sides: flour : servings = flour : servings.

  1. Enter A = 3 (cups) and B = 4 (servings).
  2. The unknown is flour, which sits in the C position, so leave C blank and enter D = 9 (servings).
  3. Working: C = A × D ÷ B = 3 × 9 ÷ 4 = 6.75. You need 6.75 cups, or 6¾ cups.

A common slip is to type the 9 in C instead. The calculator then answers a different question, 3 : 4 = 9 : D, and gives D = 12: the servings that 9 cups of flour would make.

Example 2: resizing to an aspect ratio

An image must keep a 16 : 9 shape and be 1,920 pixels wide. Enter A = 16, B = 9, C = 1920 and leave D blank. Working: D = B × C ÷ A = 9 × 1920 ÷ 16 = 1080, so the height is 1,080 pixels. The same method reads a map scale: at 1 inch : 25 miles, enter A = 1, B = 25 and C = 3.5 to find that 3.5 inches on the map is 87.5 miles (D = B × C ÷ A = 25 × 3.5 ÷ 1 = 87.5).

Example 3: is it a proportion?

Is 4 : 6 equal to 10 : 15? Enter all four values. Working reads Yes: cross products A × D = 60 and B × C = 60 are equal. Change D to 14 and it reads No: cross products A × D = 56 and B × C = 60 differ. Either way, A : B in simplest form shows 2 : 3.

Example 4: simplifying a decimal ratio

A mix calls for 1.5 parts of one liquid to 2.25 parts of another. Enter A = 1.5 and B = 2.25 and leave C and D blank. The results are:

  • A : B in simplest form: 2 : 3 (150 : 225 divided by 75).
  • A ÷ B as a decimal: 0.666667, and as a percent: 66.67.
  • A as a share of A + B: 40.00, because 1.5 ÷ 3.75 = 0.4. The first liquid is 40% of the mix.

How to use this calculator

  1. Enter the ratio you know as A and B, for example 3 and 4 for 3 : 4. Neither can be 0.
  2. To solve a proportion, enter the one other value you know in C or D, in the position that matches its unit, and leave the other box blank.
  3. Read the answer in Missing value (or proportion check) (rounded to 4 decimal places) and the calculation in Working.
  4. To test whether two ratios are equal, fill in all four boxes and read the Yes or No in Working.
  5. Use A : B in simplest form, A ÷ B as a decimal, A ÷ B as a percent and A as a share of A + B for other ways to express the ratio.

Common mistakes

  • Mixing up the order. If A is cups and B is servings, C must be cups and D servings. Swapping them gives a confident but wrong answer, as Example 1 shows.
  • Mixing units. Convert first: 2 feet : 6 inches is 24 inches : 6 inches, or 4 : 1, not 2 : 6.
  • Reading A ÷ B as a share of the total. 3 : 4 means 3 out of every 7, not 3 out of 4. Use A as a share of A + B for the part-to-whole percentage.
  • Rounding the answer too early. 2 : 3 = C : 10 gives C = 6.6667 in the result and 6.666667 in Working; the exact value is 6⅔.

What the calculator does not do

  • It solves for C or D only. To find A or B, swap the two ratios (see the questions below).
  • It handles two-term ratios. For a three-part ratio such as 1 : 2 : 3, work with one pair of terms at a time.
  • Simplification works to ten decimal places. Longer decimals are rounded first: 1.23456789012 : 1 is simplified as if it were 1.2345678901 : 1, giving 12345678901 : 10000000000.

For more practice, read ratios, proportions and rates: what is the difference? and how to scale any recipe up or down. The GCF and LCM calculator shows the factor used to simplify, and the percentage calculator handles other percent questions.

Sources

Frequently asked questions

What is the difference between a ratio and a proportion?

A ratio compares two quantities, such as 3 : 4. A proportion is a statement that two ratios are equal, such as 3 : 4 = 6 : 8. Because a proportion has four numbers tied together by A × D = B × C, you can find any one of them when you know the other three.

How do I solve for A or B instead of C or D?

Swap the two sides. A : B = C : D says the same thing as C : D = A : B, so enter the complete ratio you know as A and B. For ? : 4 = 9 : 12, enter A = 9, B = 12 and D = 4, and leave C blank. Working shows C = A × D ÷ B = 9 × 4 ÷ 12 = 3, so the missing value is 3.

How does the calculator simplify a ratio with decimals?

It multiplies both terms by the same power of 10 so that both are whole numbers, then divides by their greatest common factor. 1.5 : 2.25 becomes 150 : 225, and 150 ÷ 75 = 2 and 225 ÷ 75 = 3, so the simplest form is 2 : 3. Multiplying or dividing both terms by the same number never changes a ratio.

How do I find a unit rate or unit price?

A unit rate is A ÷ B: the amount of A for one unit of B. If 3 pounds cost $4.50, enter A = 4.5 and B = 3. A ÷ B as a decimal shows 1.500000, which is $1.50 per pound. To price 5 pounds, enter D = 5: Working shows C = A × D ÷ B = 4.5 × 5 ÷ 3 = 7.5, or $7.50.

Why can't A or B be zero?

A ratio with 0 in it cannot be scaled to a proportion in any useful way, and the formulas divide by A or B. If A or B is 0 or blank, the calculator shows no results. C or D can be 0; the answer is then 0.

What is the difference between A ÷ B as a percent and A as a share of A + B?

A ÷ B as a percent compares one part with the other part. A as a share of A + B compares one part with the whole. For a 12 : 8 ratio, the first is 150 (A is 150% of B) and the second is 60 (A is 60% of the total of 20). Which one you need depends on whether the question says "compared with" or "out of".

Can I use the calculator for a three-part ratio like 1 : 2 : 3?

Not in one step, because it takes two terms at a time. Scale each term by the same factor instead. To make a total of 12 parts from 1 : 2 : 3 (6 parts), each part is 12 ÷ 6 = 2, giving 2 : 4 : 6. You can check any pair in the calculator, for example 1 : 2 = 2 : D gives D = 4.