Aspect Ratio Calculator
Work out the dimension you are missing. Set a ratio — 16:9, 4:3, or anything you type — enter either the width or the height, and the other is calculated. It also runs the other way: enter a real size and see what ratio it reduces to, which is how you find out whether an image is actually 16:9.
Design Tools
Private by default
This tool runs entirely in your browser. Your data is never uploaded to a server.
How it works
Scaling and reducing a ratio
height = width × h ÷ w · simplified ratio = w ÷ gcd, h ÷ gcd
A ratio is a single number — width divided by height — so finding a missing side is one multiplication. Reducing a size to its ratio is the reverse: divide both sides by their greatest common divisor until no whole number divides them both.
- 16:9 is 1.778, 4:3 is 1.333, 21:9 is actually 2.333, and 3:2 is 1.5.
- Some common resolutions are not exactly their advertised ratio. 1366×768 reduces to 683:384, which is 1.779 rather than 1.778.
- Calculated dimensions are rarely whole pixels. Rounding either side changes the ratio very slightly, which is unavoidable and usually invisible.
- CSS accepts the ratio directly as `aspect-ratio: 16 / 9`, so there is no need to compute a percentage.
For reference
Ratios and the sizes that use them
| Ratio | Decimal | Common sizes |
|---|---|---|
| 16:9 | 1.778 | 1920×1080, 1280×720, 3840×2160 |
| 4:3 | 1.333 | 1024×768, 2048×1536 |
| 3:2 | 1.5 | 6000×4000, most camera sensors |
| 21:9 | 2.333 | 3440×1440, 2560×1080 |
| 1:1 | 1.0 | 1080×1080, avatars |
| 9:16 | 0.5625 | 1080×1920, vertical video |
21:9 is a marketing name — 3440×1440 is really 43:18, and 2560×1080 is 64:27. Neither is exactly 2.333.
How to use
4 clear steps.
Pick a ratio preset or type your own two numbers.
Enter the width or the height you already have.
Read the calculated dimension and the simplified ratio.
Copy the CSS aspect-ratio declaration if you need it.
Good to know
Frequently asked questions
- How do I calculate the missing side?
- Multiply or divide by the ratio. For 16:9, height = width × 9 ÷ 16, so a 1920px width gives 1080px. Going the other way, width = height × 16 ÷ 9.
- How do I reduce a size to its ratio?
- Divide both numbers by their greatest common divisor. 1920 and 1080 share 120, giving 16:9. 1366 and 768 share 2, giving 683:384 — which is why that resolution is not quite 16:9.
- Should I use the CSS aspect-ratio property?
- Yes, where you can. It reserves the right amount of space before an image loads, which prevents layout shift, and it is supported everywhere current. The old padding-top percentage hack is no longer needed.