What it does
The aspect ratio calculator works two ways:
- Find the ratio: enter a width and height to get the ratio in whole numbers, such as 1920 × 1080 → 16:9.
- Resize to a ratio: enter a ratio, the side you know and its size to get the other side, such as 16:9 at a width of 1,280 → a height of 720.
The answer updates as you type. For a ratio you also get the decimal ratio and, when it is close to a common one, its name. For a resize you get the other side to 2 decimals, and in whole pixels when it isn’t a whole number.
How to use it
- Under Mode, choose Find the ratio or Resize to a ratio.
- For Find the ratio, type the width and the height. For Resize to a ratio, type the ratio’s two parts, choose whether the width or the height is the side you know, and type its size.
- Select Copy result to put the answer on your clipboard.
Use any one unit for both sides: pixels, inches or centimetres. Sizes go from 0.01 to 100,000, and ratio parts from 0.01 to 10,000, in steps of 0.01. The calculator remembers your mode and numbers on this device.
How it’s calculated
To find the ratio, both sides are divided by their greatest common divisor, the biggest whole number that goes into both. For 1920 × 1080 it reads:
16:9 = 1920 ÷ 120 : 1080 ÷ 120 (120 is the greatest common divisor)
A side with decimals is scaled to hundredths first, so no rounding comes into the ratio:
1920.5 : 1080 = 192,050 : 108,000 in hundredths = 3,841 : 2,160
To resize, the other side is the known size times the other ratio part, divided by the known side’s part. For 16:9 at a width of 1,280 it reads:
Height = 1,280 × 9 ÷ 16 = 720
When the other side isn’t whole, it is shown to 2 decimals, with = when that is exact and ≈ when it is rounded:
Height = 1,000 × 9 ÷ 16 = 562.5
Height = 1,000 × 9 ÷ 21 ≈ 428.57
The calculation rests on these assumptions. Any one unit works for both sides: pixels, inches or centimetres. Sizes with decimals are scaled to hundredths before simplifying. The decimal ratio is rounded half up to 2 decimals. A common name is shown when the ratio is within 2% of one of 14 common ratios. The other side is rounded half up to 2 decimals, and to a whole number for pixels.
Good to know
- The 14 common ratios are 1:1, 5:4, 4:3, 3:2, 16:10, 16:9, 1.85:1, 2:1, 21:9, 2.39:1, 4:5, 3:4, 2:3 and 9:16. The name shown is the nearest one in the list, measured by how far the ratio is from it in percent. 2560 × 1080 is nearest to 2.39:1 (0.82% off), a little closer than 21:9.
- A ratio such as 1366 × 768 is close to 16:9 but not equal to it, so the result shows both the exact ratio, 683:384, and the nearest name.
- A whole-pixels row is shown only when the other side isn’t a whole number. It is rounded from the exact value, not from the 2-decimal one.
Privacy
Everything is worked out in your browser, on your device. Nothing you type is uploaded. Only your chosen mode and numbers are kept, in this browser’s storage, so the page can show them again.