Ratio Calculator
Simplify a ratio, find a missing value in an equivalent ratio, or calculate a ratio from two quantities — with exact, floating-point-free math.
This is A as a percentage of B (A ÷ B × 100) — not A’s share of A + B combined.
How ratios work
What is a ratio?
A ratio compares two (or more) quantities, showing how much of one thing there is relative to another. It’s written as A : B — for example, a recipe that uses 2 parts flour to 1 part sugar has a ratio of 2 : 1.
How to simplify a ratio
To simplify a ratio, divide both sides by their greatest common divisor (GCD) — the largest number that divides evenly into both values.
20 : 30 → GCD(20, 30) = 10 → 20 ÷ 10 : 30 ÷ 10 = 2 : 3Decimal ratios simplify the same way once both sides are scaled to whole numbers. For example, 1.5 : 2.5 scales to 15 : 25, then simplifies to 3 : 5.
How to find a missing value (cross multiplication)
For an equivalent ratio A : B = C : D, the two ratios describe the same proportion. Cross multiplication says A × D = B × C, so a missing value can be found by multiplying the two diagonally opposite known values and dividing by the third.
3 : 5 = 12 : ? → 5 × 12 ÷ 3 = 20Ratio formulas
- Simplify:
A ÷ GCD(A,B) : B ÷ GCD(A,B) - Find D:
D = (B × C) ÷ A - Find C:
C = (A × D) ÷ B - Ratio to decimal:
A ÷ B - Ratio to percentage:
(A ÷ B) × 100%— this is A as a percentage of B, not A’s share of the combined total A + B
Example calculations
20 : 30simplifies to2 : 33 : 5 = 12 : 20(missing value found by cross multiplication)25 : 40simplifies to5 : 8(0.625, or 62.5%)1.5 : 2.5simplifies to3 : 5
Frequently asked questions
What is a ratio?
A ratio compares two (or more) quantities, showing how much of one thing there is compared to another, written as A:B.
How do you simplify a ratio?
Divide both sides by their greatest common divisor (GCD) until no common factor remains, e.g. 20:30 simplifies to 2:3.
How do you calculate an equivalent ratio?
Multiply or divide both sides of a ratio by the same number, or use cross multiplication (A×D = B×C) to find a missing value.
How do you find a missing number in a ratio?
Use cross multiplication: for A:B = C:D, multiply the two known values that sit diagonally opposite each other and divide by the third known value.
Can ratios contain decimals?
Yes. This calculator handles decimal ratios accurately by scaling both sides to whole numbers before simplifying, avoiding floating-point rounding errors.
What is the difference between a ratio and a fraction?
A ratio compares two separate quantities (e.g. 3 boys : 5 girls), while a fraction represents a part of a single whole (e.g. 3/8 of the class are boys).
Related calculators
- Percentage Calculator — convert any ratio relationship into a percentage.
- Fraction Calculator — simplify, add, or convert fractions.