1. Find the ratio of a width and height
2. Keep a ratio and find the missing side
Typing in the width field updates the height (and the other way round) as you type.
About this tool
An aspect ratio is the proportion between a picture's width and its height, written as two numbers separated by a colon, such as 16:9. It says nothing about size: a 1280 × 720 video and a 3840 × 2160 video have the same 16:9 shape even though the second has nine times as many pixels. This aspect ratio calculator does the two jobs people need most often. It reduces any width and height to the simplest whole-number ratio, and it takes a ratio plus one side and works out the other side, so you can resize an image or set a video canvas without stretching it. Nothing is uploaded; the math runs in your browser.
How to use the aspect ratio calculator
- To find a ratio, type the width and height in pixels in section 1 and click Calculate ratio. You get the simplified ratio, the decimal ratio (for example
1.778:1) and, when the size is within 3% of a familiar ratio, the name people usually use for it. - To find a missing side, pick a preset in section 2 (16:9, 9:16, 4:3, 3:2, 21:9, 1:1, 4:5 or 2:1) or type your own ratio such as
2.39:1. Enter a width and click Calculate height, or enter a height and click Calculate width. - Check the rounding note. Pixels are whole numbers, so when the exact answer has a fraction the tool shows the nearest whole pixel and the ratio that rounded size really has.
- To actually resize a photo to the new size, use the Image Resizer, which has an aspect lock so the picture is never squashed.
How to calculate aspect ratio: the formula
Simplifying a size. Find the greatest common divisor (GCD) of the width and height, the largest whole number that divides both evenly, and divide each side by it. The tool uses Euclid's algorithm: replace the larger number with the remainder of dividing it by the smaller, and repeat until the remainder is 0. The last non-zero value is the GCD. The decimal ratio is simply width ÷ height, shown as a number to 1.
Finding a missing side. For a ratio a:b, width and height must satisfy W ÷ H = a ÷ b. Solving for each side gives:
H = W × b ÷ a W = H × a ÷ b
Worked example
The tool opens with 1920 × 1080 in section 1. The GCD of 1920 and 1080 is 120, so 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9: the ratio is 16:9, and 1920 ÷ 1080 = 1.778:1.
Section 2 opens with the 16:9 preset and a width of 1366. The height is 1366 × 9 ÷ 16 = 768.375, which is not a whole pixel, so the tool suggests 768. That explains a common puzzle: 1366 × 768 is usually described as 16:9, but it reduces to 683:384, or 1.7786:1, against 1.7778:1 for true 16:9. The difference is too small to see, which is why it is still called 16:9.
Common 16:9 resolutions
Every size below reduces to exactly 16:9; the GCD column shows the divisor used. Each step up the list from 1080p to 4K and on to 8K doubles both the width and the height, so the pixel count goes up four times.
| Resolution | GCD | Ratio | Pixels | Common name |
|---|---|---|---|---|
| 1,280 × 720 | 80 | 16:9 | 921,600 | 720p HD (SMPTE ST 296) |
| 1,920 × 1,080 | 120 | 16:9 | 2,073,600 | 1080p Full HD (ITU-R BT.709) |
| 2,560 × 1,440 | 160 | 16:9 | 3,686,400 | QHD, often sold as “1440p” |
| 3,840 × 2,160 | 240 | 16:9 | 8,294,400 | 4K UHD (ITU-R BT.2020) |
| 7,680 × 4,320 | 480 | 16:9 | 33,177,600 | 8K UHD (ITU-R BT.2020) |
Sources for the names: 1280 × 720 progressive is defined in SMPTE ST 296; 1920 × 1080 at 16:9 in ITU-R BT.709; and 3840 × 2160 and 7680 × 4320 at 16:9 in ITU-R BT.2020. The US Consumer Electronics Association (now CTA) set “Ultra High-Definition” in 2012 as at least 3840 × 2160 pixels. “1440p” is an informal name rather than a broadcast standard.
Is “21:9” ultrawide really 21:9?
Usually not. 21:9 is a marketing label. The two most common ultrawide monitor sizes reduce to different ratios, both slightly wider than 21:9 (2.333:1):
| Resolution | GCD | Exact ratio | Decimal | vs 21:9 |
|---|---|---|---|---|
| 2,560 × 1,080 | 40 | 64:27 | 2.370:1 | 1.6% wider |
| 3,440 × 1,440 | 80 | 43:18 | 2.389:1 | 2.4% wider |
So if you are sizing a wallpaper or a video for an ultrawide screen, use the screen's actual pixel size rather than the 21:9 preset, or the edges will be cropped or letterboxed.
Vertical video: 9:16
Phone-first video is the 16:9 frame turned on its side, so the ratio flips to 9:16: a 1080 × 1920 video reduces to 9:16. The order matters. Ratios are always written width first, so 9:16 is tall and 16:9 is wide. Choose the 9:16 preset in section 2 and enter a width of 1080 to get a height of 1920.
Common mistakes
- Swapping width and height. 4:5 is a portrait shape and 5:4 is landscape. Use the Swap button to check a size both ways.
- Assuming “16:10” and “8:5” are different. They are the same ratio; 1920 × 1200 reduces to 8:5, which is usually written as 16:10 so it can be compared with 16:9.
- Rounding too early. Calculate the missing side from the exact ratio first and round only the final pixel value. Rounding the decimal ratio to 1.78 and multiplying gives slightly different answers on large sizes.
- Resizing by width and height separately. Changing one side without the other stretches the picture. Keep the ratio, or crop to the new ratio first.
- Using an odd number of pixels for video. Video stored with 4:2:0 chroma subsampling, the usual setting for H.264, needs an even width and height, so if the rounding note gives an odd number, pick the nearest even one.
Common use cases
- Checking whether a photo will fill a 16:9 slide or screen without bars
- Working out the height of a thumbnail or banner from a fixed width
- Setting a 9:16 canvas for short vertical videos
- Converting a ratio to a percentage, for example for responsive embed padding (9 ÷ 16 = 56.25%); the Percentage Calculator helps with similar sums
Frequently asked questions
1920 × 1080 is 16:9. The greatest common divisor of 1920 and 1080 is 120, and dividing both numbers by 120 gives 16 and 9. As a decimal the ratio is about 1.778 to 1, the same shape as 1280 × 720, 2560 × 1440 and 3840 × 2160.
Choose the new width, then multiply it by the original height and divide by the original width to get the new height. Use the second calculator with your ratio to do this, then resize with an image editor or resizer that locks the aspect ratio so both sides change together.
They are the same shape rotated by 90 degrees. Aspect ratios list the width first, so 16:9 is a wide landscape frame used by TVs and most monitors, while 9:16 is a tall portrait frame used for vertical video recorded and watched on phones.
Yes. Some ratios, especially in film, are written with a decimal and a 1, such as 1.85:1 or 2.39:1. They mean the width is that many times the height. You can type them into the ratio field, and the calculator solves the missing side the same way as for whole-number ratios.
For a simplified ratio a:b, the height is a whole number only when the width is a multiple of a. For 16:9 that means widths divisible by 16, such as 1280 or 1920. Pixels cannot be split, so round to the nearest whole number; the shape changes by far less than a pixel.
Put the width in A1 and the height in B1, then use =A1/GCD(A1,B1)&":"&B1/GCD(A1,B1). GCD returns the greatest common divisor, so the formula divides both sides by it and joins them with a colon. For the decimal ratio, use =A1/B1 and format the cell to three decimal places.