Aspect Ratio Calculator
Reduce any width and height to its exact ratio, see the nearest named ratio, and get a new width or height that keeps the shape, with the rounding error shown.
How to Use
- Enter the original Width and Height. Whole pixels or decimals both work, so 2.39 and 1 is a valid cinema ratio.
- Read the exact ratio, its decimal value and the nearest named ratio in the readouts. A dashed outline shows the named shape when yours is not an exact match.
- Choose what to solve, then type a new width (or height). Pick the rounding: nearest pixel, even numbers for video, or round down to fit inside a box.
- Click a preset such as Full HD to 720p or the 1366 × 768 laptop screen, or a standard size from the list under the picture.
- Check every step in Show Work, and use Copy CSS for the matching
aspect-ratiorule.
Worked Example
A 1920 × 1080 video scaled to 1280 wide. Euclid's algorithm finds the greatest common divisor: 1920 = 1 × 1080 + 840, 1080 = 1 × 840 + 240, 840 = 3 × 240 + 120 and 240 = 2 × 120 + 0, so the GCD is 120 and the ratio is 1920 ÷ 120 : 1080 ÷ 120 = 16:9, or 1.7778 : 1. The new height is 1280 × 1080 ÷ 1920 = 720, a whole number, so 1280 × 720 has exactly the same shape.
The 1366 × 768 laptop screen. Here the GCD is only 2, so the exact ratio is 683:384 = 1.7786 : 1. That is 0.05% wider than 16:9: a true 16:9 picture 1366 px wide would be 768.375 px tall. Scaling the screen up to 1920 wide gives 1920 × 768 ÷ 1366 = 1079.47, which rounds to 1079, not 1080.
The common mistake: trusting the name on the box. A monitor sold as 21:9 at 2560 × 1080 has a GCD of 40, so it is really 64:27 (2.370 : 1). Working from "21:9" gives a height of 2560 × 9 ÷ 21 = 1097.14 px, 17 px taller than the real screen. Always reduce the actual pixel numbers instead of the marketing ratio.
Show Work
Formulas
Where the Common Ratios Come From
The 4:3 shape (1.33 : 1) comes from early 35 mm motion-picture film, and it carried over to television. When sound was added to film, the Academy of Motion Picture Arts and Sciences standardised a 1.375 : 1 frame in 1932, the "Academy ratio". Widescreen cinema later settled on two shapes that are still used: 1.85 : 1 ("flat") and the anamorphic 2.39 : 1 ("scope"). In digital cinema these are 1998 × 1080 (exactly 37:20 = 1.85) and 4096 × 1716 (1024:429, about 2.387).
16:9 was proposed by Kerns H. Powers of SMPTE in the early 1980s as a compromise between those shapes: it is close to the geometric mean of 4:3 and 2.35 : 1, √(1.333 × 2.35) ≈ 1.77, so either kind of material fits with only modest bars. It became the shape of HDTV, and most screens and video sites use it. Computer displays added 16:10 (8:5), and phones turned the picture on its side with 9:16 video.
About This Calculator
This calculator reduces any width and height to its exact ratio with Euclid's algorithm, including decimal ratios such as 2.39 : 1 (which becomes 239:100), names the nearest common ratio and how far off it is, and solves a new width or height with a choice of rounding. Every Euclid step and the rounding error are shown, and the matching standard resolutions are listed.
Everything runs in your browser; nothing is sent anywhere. Settings can go in the page address, for example ?w=3440&h=1440&nw=2560.
Related tools: Image Resizer, Image Cropper, and Social Media Image Sizer.
Frequently Asked Questions
How do I find the aspect ratio of a resolution?
Divide the width and the height by their greatest common divisor. For 1920 × 1080 the GCD is 120 (Euclid: 1920 = 1 × 1080 + 840, 1080 = 1 × 840 + 240, 840 = 3 × 240 + 120, 240 = 2 × 120), so the ratio is 1920 ÷ 120 : 1080 ÷ 120 = 16:9.
Is 2560 × 1080 really 21:9?
No. Its GCD is 40, so the exact ratio is 64:27, about 2.370 : 1. 21:9 is 2.333 : 1, and a true 21:9 screen 2560 px wide would be 1097 px tall. 3440 × 1440 is 43:18 (2.389). Both are sold as "21:9" because it is an easy name.
Is 1366 × 768 a 16:9 resolution?
Almost. 1366 × 768 reduces to 683:384, which is 1.7786 : 1 against 1.7778 for 16:9, about 0.05% wider. An exact 16:9 picture 1366 px wide would be 768.375 px tall, which is why many players add a thin bar or crop a pixel.
Why should video dimensions be even numbers?
Most video is stored with 4:2:0 chroma subsampling, where colour is kept at half resolution in both directions, so H.264 and H.265 encoders normally need even widths and heights. The "even numbers" rounding gives 1080 × 1920 → 720 × 1280 exactly, and 1280 wide at 2.39 : 1 becomes 536 tall instead of 535.56.
How do I use the ratio in CSS?
Use the aspect-ratio property with the reduced numbers, for example aspect-ratio: 16 / 9;. The box then keeps that shape as its width changes, which reserves space for an image or video before it loads. Copy CSS puts the rule for the current ratio on your clipboard.
How do I use the Aspect Ratio Calculator?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Do I need to install or sign up for anything?
Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.
Is my information private?
Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.
Common Use Cases
Video exports
Scale a 3840 × 2160 master to 1280 wide: 1280 × 2160 ÷ 3840 = 720 exactly, so 1280 × 720 keeps 16:9 with no bars.
Monitor shopping
An "ultrawide 21:9" 3440 × 1440 screen is really 43:18, so a 21:9 film shows with thin bars above and below.
Photo prints
A 6000 × 4000 camera file is 3:2, the same shape as a 6 × 4 in print, so it prints with no cropping.
Responsive embeds
A 1080 × 1350 Instagram portrait reduces to 4:5, which becomes aspect-ratio: 4 / 5 in CSS.
Last updated: