← All how-to recipes

How to calculate a ratio like 16:9

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Reduce two numbers to their simplest ratio — aspect ratios, mixes, staffing.

The formula

AppFormulaNotes
Excel (desktop)=A2/GCD(A2,B2)&":"&B2/GCD(A2,B2)Whole numbers only (GCD needs integers).
Google Sheets=A2/GCD(A2,B2)&":"&B2/GCD(A2,B2)Identical.
LibreOffice Calc=A2/GCD(A2,B2)&":"&B2/GCD(A2,B2)Identical.

How it works

GCD finds the greatest common divisor (120 for 1920 and 1080); dividing both numbers by it reduces the pair to lowest terms, and & glues them with a colon: "16:9". For a "1 : n" style ratio instead, divide through by the first number: ="1:"&ROUND(B2/A2,2) gives 1:0.56. The result is text — keep the raw numbers in their own cells if you still need to calculate with them.

Verified, not just documented

We ran =A2/GCD(A2,B2)&":"&B2/GCD(A2,B2) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 16:9 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 16:9 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

GCD — see full Excel, Google Sheets & LibreOffice compatibility for each.