CSSMar 10, 2026 ยท 2 min read

How to Calculate Aspect Ratio for Images and Video

Aspect ratio is the proportional relationship between width and height. A 1920ร—1080 image has a 16:9 aspect ratio. Understanding and calculating aspect ratios is essential for responsive images, video embeds, CSS aspect-ratio property usage, and ensuring content displays correctly across devices.

Man, photographer, hobby โ€” illustrating How to Calculate Aspect Ratio for Images and Video
๐Ÿ“
Try the Aspect Ratio Calculator
Free, no signup
โ†’
DG
Derek Giordano
Designer & Developer
In this guide
01Calculating Aspect Ratio02Common Aspect Ratios03CSS aspect-ratio Property04Aspect Ratios for Responsive Images

Calculating Aspect Ratio

To find the aspect ratio of any dimensions, divide both width and height by their greatest common divisor (GCD). For 1920ร—1080: GCD is 120, so 1920/120 = 16 and 1080/120 = 9. The ratio is 16:9. For 1200ร—630 (common OG image): GCD is 30, ratio is 40:21. The Aspect Ratio Calculator does this instantly โ€” enter any dimensions and get the simplified ratio plus equivalent sizes at common widths.

Common Aspect Ratios

16:9 โ€” HD video, YouTube, desktop monitors. 4:3 โ€” traditional TV, iPad, presentations. 1:1 โ€” Instagram posts, profile pictures. 9:16 โ€” vertical video (TikTok, Stories, Reels). 21:9 โ€” ultrawide monitors, cinema. 4:5 โ€” Instagram portrait posts. 3:2 โ€” DSLR photos, MacBook screens.

CSS aspect-ratio Property

CSS has a native aspect-ratio property:

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

This replaces the old padding-bottom hack for responsive embeds. The element maintains 16:9 proportions at any width. Supported in all modern browsers since 2021.

Aspect Ratios for Responsive Images

Set width and height attributes on <img> tags to reserve space before the image loads (prevents layout shift): <img alt='Example image with 1200x630 aspect ratio' width='1200' height='630'> tells the browser the aspect ratio before download. Combined with CSS width: 100%; height: auto, the image scales responsively while the browser reserves the correct space from the start.

Frequently Asked Questions

How do I calculate aspect ratio?+
Divide both width and height by their greatest common divisor. 1920ร—1080 โ†’ 1920/120 : 1080/120 = 16:9. Or use the Aspect Ratio Calculator for instant results.
What aspect ratio is 1920x1080?+
16:9. This is the standard HD/Full HD ratio used by most monitors, TVs, and YouTube videos.
What is the CSS aspect-ratio property?+
A CSS property that maintains an element's proportions: aspect-ratio: 16 / 9 keeps the element at 16:9 regardless of its width. It replaces the old padding-bottom percentage hack.
Try it yourself

Use the Aspect Ratio Calculator โ€” free, no signup required.

โšก Open Aspect Ratio Calculator
DG
Derek Giordano
Written by the creator of Ultimate Design Tools. BA in Business Marketing.