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.
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?
What aspect ratio is 1920x1080?
What is the CSS aspect-ratio property?
Use the Aspect Ratio Calculator โ free, no signup required.
โก Open Aspect Ratio Calculator