Ratio to Fraction Calculator
Convert a ratio A:B into a simplified fraction — pick part-to-part (find the whole by adding) or part-to-whole (B is already the whole) — with full steps.
How to use this calculator
Type the two ratio terms into the A and B boxes, then choose the ratio type with the toggle:
- Part-to-part — A and B are two separate parts of an unstated whole (e.g. apples : bananas). The calculator adds them to find the whole, then shows each part as its own reduced fraction of that whole.
- Part-to-whole — B already IS the whole (e.g. apples : total fruit). The calculator converts A:B straight into a fraction and reduces it.
The answer band updates live as you type, and the step-by-step panel below always shows its working — including the decimal-clearing step when A or B has a fractional part.
Part-to-part vs. part-to-whole — what's the difference?
| Part-to-part | Part-to-whole | |
|---|---|---|
| What A:B compares | Two separate parts (e.g. boys:girls) | One part to the grand total (e.g. boys:all students) |
| Is the whole given? | No — you must add A + B | Yes — B already is the whole |
| Formula | whole = A + B; fractions = A/(A+B) and B/(A+B) | fraction = A/B, reduced |
| Example | 6:8 (apples:bananas) → whole 14 → 3/7 and 4/7 | 6:14 (apples:total fruit) → 6/14 = 3/7 |
The core distinction is where the denominator comes from. A part-to-part ratio never mentions the whole directly — you have to compute it by summing. A part-to-whole ratio already has the whole sitting in the second slot, so there's nothing to add; you convert and simplify in one move.
Worked examples
Example 1 — Part-to-part: 6 : 8
- Add the parts to find the whole:
6 + 8 = 14. - Each part over the whole:
6/14and8/14. - Reduce both:
6/14 = 3/7,8/14 = 4/7. - Result: the first part is 3/7 of the whole, the second part is 4/7.
Example 2 — Part-to-whole: 3 : 6
- The second term (6) is already the whole, so convert directly:
3:6 = 3/6. - Reduce:
3/6 = 1/2. - Result: 1/2.
Example 3 — Part-to-whole with decimals: 0.5 : 1.5
- Clear the decimal by multiplying both terms by 10:
0.5:1.5 → 5:15. - Reduce by the GCD (5):
5/15 = 1/3. - Result: 1/3.
Example 4 — Part-to-part: 3 : 9
- Add the parts:
3 + 9 = 12. - Each part over the whole:
3/12and9/12. - Reduce both:
3/12 = 1/4,9/12 = 3/4. - Result: 1/4 and 3/4.
Precision note
Every step uses exact integer (BigInt) arithmetic — decimals are cleared by a whole power of 10 before any reduction, never by dividing with a floating-point calculator. That keeps values like 0.07:0.29 exact instead of landing on 7.000000000000001-style rounding artifacts.
Related tools
If you just need A:B reduced to lowest terms without the "fraction of a whole" framing, use the ratio calculator or a ratio simplifier. If you're starting from a percent instead of a ratio, see the percent to fraction calculator.
Frequently asked questions
- How do you convert a ratio to a fraction?
- It depends on what the ratio compares. If A:B compares two separate parts (part-to-part, e.g. apples:bananas), add them to find the whole, then write each part over that whole: A/(A+B) and B/(A+B). If A:B already has the whole as the second term (part-to-whole, e.g. apples:total fruit), just write A/B and reduce.
- What is the difference between a part-to-part ratio and a part-to-whole ratio?
- A part-to-part ratio compares two categories to each other — neither term is the total (3 cats : 2 dogs). A part-to-whole ratio compares one category to the grand total, which IS one of the two terms (3 cats : 5 pets, where 5 is cats+dogs). The conversion to a fraction differs because of where the whole comes from.
- 6:8 as a part-to-part ratio — what fraction of the whole is each part?
- Add the parts to get the whole: 6 + 8 = 14. Each part becomes a fraction of 14: 6/14 reduces to 3/7, and 8/14 reduces to 4/7. So the first part is 3/7 of the whole and the second part is 4/7.
- 3:6 as a part-to-whole ratio — what fraction is that?
- Since the second term (6) already is the whole, convert directly: 3:6 = 3/6, which reduces to 1/2. No addition step is needed because the whole was already given.
- How do you convert a decimal ratio like 0.5:1.5 to a fraction?
- Multiply both terms by a power of 10 to clear the decimal first — here, by 10, giving 5:15 — then reduce by the GCD (5) to get 1:3. As a part-to-whole fraction that is 1/3; as a part-to-part ratio, the whole is 0.5+1.5=2, and the two fractions of that whole are 1/4 and 3/4.
- Can a ratio term be zero?
- Yes, as long as it does not create a division by zero. In part-to-whole mode, the second term is the denominator, so it cannot be zero. In part-to-part mode, the whole is the sum of both terms, so only "both terms are zero" is invalid — one term can still be zero (e.g. 4:0 means 100% of the whole is the first part).
- Why does my ratio-to-fraction answer look different from a ratio simplifier?
- A ratio simplifier just reduces A:B to lowest terms (e.g. 6:8 -> 3:4) — it never introduces a "whole". This calculator goes one step further and expresses the ratio AS a fraction of a whole, which only matches the simplified ratio directly when you are in part-to-whole mode.
- Does this calculator work with decimals as well as whole numbers?
- Yes. Any non-negative integer or decimal is accepted for A and B (e.g. 2.5, 0.75). Decimals are cleared by multiplying both terms by the same power of 10 before reducing, so the result is always an exact fraction — never a rounded approximation.