Aspect Ratio Calculator
Simplify any width × height to its ratio, or keep a ratio and solve the missing side.
Width and height
Pixels, millimetres, inches — any unit, as long as both sides use the same one. Pasting “1920x1080” or “16:9” fills both boxes.
Read the ratio of an image or video
Resize at this ratio
16:9Type a new width or height; the other side keeps the ratio above.
Common sizes at 16:9
| Width | Height | Note |
|---|
Fit into a frame
How a picture at the ratio above fits a screen or canvas of another shape.
Fit (contain)
Fill (cover)
About the Aspect Ratio Calculator
Type a width and height — in pixels, millimetres or any unit — and get the simplified ratio (1920 × 1080 → 16:9), its decimal (1.7778:1) and the nearest standard with what it is used for. Then keep that ratio and type a new width or height to get the other side, rounded to whole pixels or to even numbers for video.
The ratio is reduced with Euclid’s algorithm for the greatest common divisor, so it is exact, and decimal ratios such as cinema’s 1.85:1 and 2.39:1 work too. Presets cover 16:9, 4:3, 21:9, 1:1, 4:5, 9:16, 3:2, 1.85:1, 2.39:1 and the ISO paper ratio 1:√2. Drop a photo or video to read its size (phone photos are measured upright), copy the CSS aspect-ratio, and see how a picture fits a screen: the letterbox or pillarbox bars, or how much is cropped to fill it.
How to use it
- Enter the width and height (or paste a size such as
1920x1080or a ratio such as16:9into either box), pick a preset ratio, or drop an image or video onto the page to read its size. - Read the simplified ratio, the decimal and the nearest standard. Select Copy to copy the ratio or the CSS.
- Under Resize, type a new width or height; the other side is worked out at the same ratio. Choose Even numbers for video, or multiples of 8 or 16.
- Under Fit into a frame, enter a screen or canvas size to see the picture size and bars when it fits inside, or the crop when it fills the frame.
Examples
1920 × 1080
16:9 (1.7778:1)
The greatest common divisor of 1920 and 1080 is 120: 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9.
16:9, new width 1280
Height 720
height = width × 9 ÷ 16 = 1280 × 9 ÷ 16 = 720.
4:5, width 1080
Height 1350
2560 × 1080
64:27 (2.3704:1)
Sold as 21:9 (2.3333:1), but mathematically 64:27 — closer to the 2.39:1 cinema ratio.
210 × 297 mm
70:99 ≈ 1:√2
ISO paper sizes use 1:√2 (1:1.4142); the whole-millimetre A4 size is within 0.01 % of it.
2.39:1 in a 1920 × 1080 frame
1920 × 803.3 picture, 138.3 px bars above and below
Common uses
- Checking that a photo, banner or video export has the ratio a platform expects before uploading it.
- Working out the height of a resized image or video so it is not stretched.
- Writing responsive CSS:
aspect-ratio: 16 / 9for video embeds, cards and image placeholders. - Planning how a 4:3 or cinema-scope clip will look on a 16:9 screen.
How the ratio is worked out
An aspect ratio is width : height in its simplest form. Both sides are divided by their greatest common divisor (GCD), found with Euclid’s algorithm: replace the larger number by the remainder of dividing it by the smaller, until the remainder is 0. For 1920 and 1080: 1920 mod 1080 = 840, 1080 mod 840 = 240, 840 mod 240 = 120, 240 mod 120 = 0, so the GCD is 120 and the ratio is 16:9.
Decimal sides are first scaled to whole numbers (1.85 : 1 → 185 : 100 → 37:20). The decimal form is width ÷ height (16 ÷ 9 = 1.7778), written as 1.7778:1. Some ratios have no whole-number form: ISO paper is 1 : √2, and √2 is irrational, so it is shown as 1:1.4142.
Where the standard ratios come from
- 16:9 — HD and Ultra HD television: 1920 × 1080 in ITU-R BT.709, and 3840 × 2160 and 7680 × 4320 in ITU-R BT.2020.
- 1.85:1 and 2.39:1 — digital cinema’s “flat” and “scope” formats in the DCI Digital Cinema System Specification: 1998 × 1080 and 2048 × 858 in 2K, 3996 × 2160 and 4096 × 1716 in 4K.
- 1:√2 — ISO 216 paper (A4, A3 …): halving a sheet across its long side gives the same ratio, which only works for 1 : √2.
- 21:9 is a marketing name. 2560 × 1080 monitors are 64:27 (2.37:1) and 3440 × 1440 ones are 43:18 (2.39:1); exact 21:9 would be 2.33:1.
- A size within 0.5 % of a standard counts as that standard: 1366 × 768 laptop screens are 683:384, only 0.05 % wider than 16:9.
Rounding for video and images
Pixels are whole numbers, so a new size often has to be rounded, which changes the ratio very slightly; the calculator shows by how much. Video in the common 4:2:0 format (yuv420p) needs an even width and height — encoders such as x264 refuse odd sizes — so choose Even numbers for video. Video codecs split the picture into blocks of 8 or 16 pixels, so multiples of 8 or 16 avoid padding at the edges.
Letterbox, pillarbox and crop
When a picture and a screen have different ratios, there are two choices. Fit scales the picture until it touches the frame on two sides and leaves bars on the others: bars above and below (letterbox) for a wider picture, at the sides (pillarbox) for a narrower one. Fill scales it until the frame is covered and crops what sticks out. These are CSS’s object-fit: contain and object-fit: cover.
Limitations
- The calculator assumes square pixels, as in almost all photos and web video.
- A video’s size is the display size the browser reports; for MP4 and MOV files the browser cannot play, it is read from the file header instead. Other video formats it cannot open need the size typed in.
- Photos are measured as displayed (their EXIF rotation is applied). HEIC photos open natively in Safari; other browsers first download a free HEIC decoder (about 1.4 MB, once). SVG files are measured by the width, height or viewBox written in them.
- Ratios without a whole-number form, such as 1:√2, are rounded to 4 decimals in the CSS.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
How do I calculate an aspect ratio?
Divide the width and the height by their greatest common divisor. For 1920 × 1080 the GCD is 120, so the ratio is 1920 ÷ 120 : 1080 ÷ 120 = 16:9. As a decimal it is 1920 ÷ 1080 = 1.7778, written 1.7778:1.
How do I get the height for a width at 16:9?
Multiply the width by 9 and divide by 16: a 1280 px wide 16:9 image is 1280 × 9 ÷ 16 = 720 px high. For the width from a height, multiply by 16 and divide by 9: 1080 px high is 1920 px wide.
Is a 21:9 monitor really 21:9?
Not exactly. 21:9 (2.33:1) is the name they are sold under; 2560 × 1080 screens are 64:27 (2.37:1) and 3440 × 1440 screens are 43:18 (2.39:1).
What is the aspect ratio of A4 paper?
ISO paper sizes such as A4 use 1 : √2, about 1 : 1.4142, so a sheet cut in half keeps the same shape. A4 is 210 × 297 mm, which is 70:99 in whole millimetres — within 0.01 % of 1 : √2. For sizes in pixels, see the paper size converter.
What is the CSS for a 16:9 box?
aspect-ratio: 16 / 9; on an element with a width (for example width: 100%) makes the browser work out its height. Every current browser supports it (Chrome 88, Firefox 89 and Safari 15 onwards). The older fallback is padding-top: 56.25% on an empty element with height: 0.
Are my photos or videos uploaded?
No. The file is read by your browser to measure it and is never sent anywhere. The page also works offline once it has loaded.