How to Calculate Ratio in Excel
Generate a formula that reduces two integer cells with Excel's GCD function and returns a readable a:b ratio. A second formula gives the decimal quotient.
Written and checked by TheToolNet Editorial Team · Last reviewed: September 20, 2026 · Editorial method
Generate an Excel ratio formula
Excel ratio formula
=A2/GCD(A2,B2)&":"&B2/GCD(A2,B2)If A2 contains 24 and B2 contains 36, GCD returns 12. Excel divides each cell by 12 and joins 2 and 3 with a colon, returning 2:3.
Ratio as a number or percentage
Use =A2/B2 for the decimal comparison. Format that result as Percentage only when “first value as a percentage of second value” matches the question. For part of a combined total, use =A2/(A2+B2).
Common Excel errors
- #DIV/0!: the second value or combined total is zero.
- #VALUE!: one cell contains text rather than a usable number.
- #NUM!: Microsoft documents limits and negative-value restrictions for GCD.
- Decimal inputs: scale both values to integers before using GCD.
Frequently asked questions
Does this formula work in current Excel versions?
Yes. Microsoft documents GCD for Microsoft 365, Excel 2024, 2021, 2019, and 2016.
Can I simplify more than two cells?
GCD accepts multiple arguments, but the displayed ratio must divide every listed cell by the same GCD.
Can I calculate the ratio outside Excel?
Use the online ratio calculator.