Find the exact shape behind any width and height
LOCALAspect ratio describes the relationship between width and height, not the number of pixels. A 1920 × 1080 frame and a 1280 × 720 frame are both 16:9, which is why one scales to the other without stretching. This calculator works in both directions. Enter two dimensions and it reduces them to the smallest whole numbers, with the decimal value, orientation and total pixel count beside the result. Switch tabs, pick a ratio and type one side, and the missing side is calculated in whole pixels. The presets cover widescreen video, vertical video, square posts, photo prints and ultrawide monitors. All arithmetic runs in your browser, so no file is uploaded and no account is needed.
How it works
- 01
Enter the two dimensions
Type the pixel width and height of the image, video frame or layout you already have. Both fields accept positive whole numbers only, because a screen cannot draw half a pixel. The simplified ratio, decimal value and total pixel count update as you type, so you can compare a 1366 × 768 laptop panel with a 1920 × 1080 monitor in a few seconds.
- 02
Read the reduced ratio
The calculator divides both numbers by their greatest common divisor. 1920 × 1080 becomes 16:9, 1080 × 1350 becomes 4:5, and 1366 × 768 becomes 683:384 rather than the familiar 16:9. That last result is not a bug: 1366 and 768 only share a factor of two, so the exact ratio really is 683:384, and the decimal value shows how close it sits to 16:9.
- 03
Calculate the missing side
Open the second tab, choose or type a ratio, then state which side you already know. If you know the width, the height is width × ratio height ÷ ratio width; if you know the height, the width follows the opposite formula. The result is rounded to a whole pixel and a short note tells you when rounding happened, which matters when a ratio such as 21:9 produces a fraction.
- 04
Copy the numbers or the CSS
Copy result puts a plain “width × height px” line on the clipboard for a brief or a spreadsheet. Copy CSS writes an aspect-ratio declaration such as aspect-ratio: 16 / 9; which reserves the correct space for an image in a responsive layout before the file loads. Both buttons only touch your clipboard and never send the numbers anywhere.
When to use it
Planning a crop instead of a stretch
A 3:2 camera photo placed in a 16:9 video frame will look squashed if it is simply stretched. Use the calculator to see both shapes as numbers, then decide whether to crop the top and bottom or to pad the sides with a background colour. Our image crop tool does the actual cut once you know which side you can afford to lose.
Social posts in the right frame
Instagram feed posts are 4:5 at 1080 × 1350, square avatars are 1:1, and Reels or TikTok are 9:16 at 1080 × 1920. When a client sends one photo for three placements, the ratio view shows immediately that the tall format needs a different crop, not just a smaller copy of the same rectangle.
Print sizes without surprises
A 4 × 6 inch print is 2:3, while an 8 × 10 inch print is 4:5, and those two shapes cannot share the same uncropped image. Enter the print dimensions in the same unit, read the ratio, then multiply inches by the lab's DPI to get the pixel size the file needs. At 300 DPI a 4 × 6 print requires 1200 × 1800 pixels.
Reserving space in a web layout
Images without fixed dimensions push content down while they load, which hurts layout stability. Calculate the ratio once, then copy the CSS declaration into the image wrapper. The browser reserves a box with the right shape, the image fills it without distortion, and the text below stops jumping when the network is slow.
Questions
How is the aspect ratio calculated?
Width and height are divided by their greatest common divisor. For 1920 and 1080 the divisor is 120, so the ratio becomes 16:9. The decimal value is simply width ÷ height, and it is useful when you need to compare shapes that do not reduce to short numbers, such as 683:384, which is 1.779 : 1.
Why does 1366 × 768 not show as 16:9?
Because it is not exactly 16:9. 1366 and 768 share only the factor 2, giving 683:384, or 1.7786 : 1 against 16:9's 1.7778 : 1. The difference is tiny and invisible at normal viewing distance, but the calculator reports the exact value instead of rounding it to a familiar name. The same happens with 2560 × 1080, which is 64:27, not 21:9.
How do I find the missing dimension?
Use the second tab. With a ratio of 16:9 and a known width of 1280, the height is 1280 × 9 ÷ 16 = 720. With a known height of 1080, the width is 1080 × 16 ÷ 9 = 1920. The calculator rounds to the nearest whole pixel because fractional pixels cannot be stored in an image file.
What is the difference between aspect ratio and resolution?
Resolution is the absolute pixel count, while aspect ratio is only the shape. 1280 × 720, 1920 × 1080 and 3840 × 2160 are all 16:9 but different resolutions. Changing resolution without keeping the ratio stretches the picture; keeping the ratio without enough resolution leaves it soft when printed or enlarged.
What is 4:5 in pixels?
The common social size is 1080 × 1350, used for portrait feed posts. Any multiple of 4:5 works: 800 × 1000, 1200 × 1500 or 1440 × 1800. Enter 4 and 5 as the ratio, then type one of those widths, and the height is calculated for you. A 4:5 photo is taller than square, so a square original must be cropped or padded.
Can I use inches or centimetres instead of pixels?
Yes, as long as both numbers use the same unit. The ratio is unitless: a 10 × 15 cm print and a 4 × 6 inch print are both 2:3. The pixel output fields are labelled px for clarity, but the ratio result does not care whether you typed pixels, millimetres or inches.
Why do video encoders ask for even numbers?
Many video codecs store colour information at half resolution in both directions, so an odd width or height forces the encoder to duplicate or drop a column. H.264 and similar codecs usually accept even numbers without complaint. After calculating a side, round it to the nearest even value if your encoder rejects the first result.
Does this tool resize or crop my image?
No. It works only with numbers and never opens an image file. It tells you the shape and the missing side; the actual crop, resize or export happens in a separate image tool. That separation is deliberate, because a calculator that silently re-encodes a photo would change quality without telling you.
What about ultrawide monitors and cinema ratios?
Ultrawide screens sold as 21:9 are often 2560 × 1080 (64:27) or 3440 × 1440 (43:18). Cinema ratios such as 2.39:1 also do not land on simple whole-number pairs. Type the real dimensions and trust the decimal value when comparing two displays, or use the ratio tab with 21:9 as an approximation for layout work.
Is anything uploaded or stored?
No. The page contains no upload field and makes no request with your numbers. Calculations use plain JavaScript arithmetic in the current tab; reloading the page clears everything. You can open the browser's Network panel and confirm that typing dimensions sends nothing.