Aspect ratio calculator

To find an aspect ratio, divide the width and the height by their greatest common divisor: 1920 × 1080 simplifies to 16:9. To resize, keep the ratio and solve for the missing side: new height = new width × height ÷ width.

Find the simplified ratio of any width and height, or resize to 16:9, 4:3, 1:1, 9:16 and more, then copy the CSS aspect-ratio value.

Ratio 16:9 (decimal 1.7778)

aspect-ratio: 16 / 9;
padding-top: 56.25%;

Preview

Scaled preview of a 16:9 box drawn with aspect-ratio: 16 / 9;

Common aspect ratios and sizes

Size (px)RatioTypical use
1920×108016:9Full HD video, YouTube
1280×72016:9HD video, YouTube thumbnails
3840×216016:94K UHD video, YouTube
1080×10801:1Instagram square feed post
1080×13504:5Instagram portrait feed post
1080×19209:16Instagram Stories and Reels, TikTok, YouTube Shorts
2560×108064:27Ultrawide monitors (sold as 21:9)

2560×1080 reduces exactly to 64:27 (about 2.37:1). Monitor makers round it and sell it as 21:9.

How to calculate aspect ratio

Divide the width and the height by their greatest common divisor (GCD). For 1920×1080 the GCD is 120, so 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9, giving 16:9. The decimal form is width ÷ height: 1920 ÷ 1080 ≈ 1.7778.

To find a missing side, keep the ratio constant:

height = width × ratio height ÷ ratio width
width  = height × ratio width ÷ ratio height

16:9 at 1280px wide → 1280 × 9 ÷ 16 = 720px tall

Use aspect-ratio in CSS

Set a width and let aspect-ratio work out the height. It keeps video embeds, image cards and hero media in proportion at every screen width and reserves the space before the media loads, which helps prevent layout shift.

.video {
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* Fallback for very old browsers */
.video-wrap { position: relative; padding-top: 56.25%; }
.video-wrap > iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

The padding-top percentage is height ÷ width × 100, because vertical padding is measured against the element's width. Pair it with object-fit: cover on images so they fill the box without stretching.

Size media for real layouts

See how live sites frame images and video in their hero sections, then size type to match.

Frequently asked questions

What is the aspect ratio of 1920×1080?

1920×1080 is 16:9. The greatest common divisor of 1920 and 1080 is 120, and 1920 ÷ 120 = 16 while 1080 ÷ 120 = 9. The same 16:9 ratio covers 1280×720 (HD) and 3840×2160 (4K UHD), which is why video made for one of these sizes scales cleanly to the others.

How do I find the height for a 16:9 image at a given width?

Multiply the width by 9 and divide by 16. At 1280px wide that is 1280 × 9 ÷ 16 = 720px tall. For any other ratio, multiply the width by the ratio height and divide by the ratio width, then round to a whole pixel. The calculator does this for you in the Resize to a ratio mode.

Should I use aspect-ratio or the padding-top trick in CSS?

Use the aspect-ratio property. It is supported in all current major browsers, it works on any element, and the box keeps its height when you change the width. The padding-top percentage trick (56.25% for 16:9) is only needed for very old browsers, and it needs an extra wrapper with absolutely positioned content.

More typography & unit tools

Color tools

Image tools

CSS generators

Image & SVG tools

More free tools

All free tools