Aspect ratio calculator
Enter a width or a height and I will compute the other, rounded to the nearest whole pixel.
Aspect Ratio Calculator
Pick a preset ratio or type your own, enter one pixel dimension, and get the other instantly.
How it works
An aspect ratio W:H just means width divided by height is constant. So when you know the width, the height is width times (H / W), and when you know the height, the width is height times (W / H). Because pixel counts must be whole numbers, the result is rounded to the nearest whole pixel, and the exact unrounded value is shown in the message so nothing is hidden.
Everything runs locally in your browser with plain JavaScript: no account, no upload, and it works on a slow connection. Need to solve a full proportion instead? Theratio solver on the homepage handles A : B = C : D.
Common pixel dimensions, computed exactly
| Ratio | Width x Height (pixels) |
|---|---|
| 16:9 | 1280 x 720, 1920 x 1080, 2560 x 1440, 3840 x 2160 |
| 4:3 | 640 x 480, 800 x 600, 1024 x 768, 1600 x 1200 |
| 64:27 (marketed as 21:9) | 2560 x 1080, 3440 x 1440 (see the note below) |
An honest note on 21:9: monitors marketed as 21:9 are almost never exactly 21:9, since a true 21:9 is 7:3 (about 2.333:1). They are usually 64:27 (about 2.370:1). Of the examples above, 2560 x 1080 is exactly 64:27, because 2560/1080 reduces by 40 to 64/27. But 3440 x 1440 reduces by 80 to 43/18 (about 2.389:1), which is close to 64:27 but not exactly equal. The preset button on this page uses the honest 64:27.
Frequently asked questions
Are 21:9 monitors really 21:9?
Usually not. A true 21:9 would be 7:3, about 2.33:1. Most screens sold as 21:9 are actually 64:27, about 2.37:1. For example, 2560x1080 reduces to exactly 64:27, while 3440x1440 reduces to 43:18, which is close to 64:27 but not identical.
Why are results rounded to whole pixels?
Screens are made of whole pixels, so a fractional result like 1079.5 cannot be displayed exactly. This tool rounds to the nearest whole pixel and also shows the exact unrounded value so you can judge the difference yourself.
Which dimension should I enter?
Either one. Type a width and the height is computed, or type a height and the width is computed. If both boxes are filled, whichever box you edited most recently drives the calculation.
Is my data sent anywhere?
No. The math runs locally in your browser with plain JavaScript. Nothing you type leaves your device.