Quick Answer
A resolution of 1920x1080 has an aspect ratio of 16:9 (decimal 1.7778). To scale a 16:9 ratio to 1280px wide: height = 1280 x 9 / 16 = 720px.
Calculate Aspect Ratio
Scale to Aspect Ratio
Common Examples
| Input | Result |
|---|---|
| 1920 x 1080 | 16:9 (1.7778) |
| 1080 x 1080 | 1:1 (1.0) |
| 1200 x 628 | 300:157 (1.9108) |
| Width 1280, ratio 16:9 | 1280 x 720 |
| Height 600, ratio 4:3 | 800 x 600 |
How It Works
Calculating an aspect ratio from width and height uses the Euclidean algorithm to find the greatest common divisor (GCD), then divides both dimensions by it:
GCD = the largest number that divides both width and height evenly
Simplified Ratio = (Width / GCD) : (Height / GCD)
Decimal Ratio = Width / Height
The Euclidean algorithm works by repeatedly replacing the larger number with the remainder of dividing the larger by the smaller, until the remainder is zero. The last non-zero value is the GCD.
Scaling to a target aspect ratio calculates the missing dimension:
- If the width is known: Height = Width x (Ratio Height / Ratio Width)
- If the height is known: Width = Height x (Ratio Width / Ratio Height)
Common aspect ratios in web and media:
- 16:9 - Standard widescreen (1920x1080, 1280x720)
- 4:3 - Traditional screen and photo format (1024x768)
- 1:1 - Square format (Instagram posts, profile images)
- 21:9 - Ultrawide cinema format
- 3:2 - Classic photo ratio (1080x720)
- 1.91:1 - Facebook and Twitter link preview images (1200x628)
Worked Example
For a 1920x1080 resolution: GCD(1920, 1080) starts with 1920 mod 1080 = 840, then 1080 mod 840 = 240, then 840 mod 240 = 120, then 240 mod 120 = 0. GCD = 120. Simplified: 1920/120 = 16, 1080/120 = 9. Ratio = 16:9, decimal = 1920/1080 = 1.7778.
To scale 16:9 to a width of 1280px: Height = 1280 x 9 / 16 = 720px. The result is 1280x720, which is the standard 720p HD resolution.
Related Calculators
CSS Clamp Calculator
Generate CSS clamp() values for fluid typography and spacing between two viewport widths.
Flexbox Gap Calculator
Calculate item widths for flexbox layouts given container width, number of items, and gap size.
PX to REM Converter
Convert between pixel (px) and rem CSS units based on any root font size.
Frequently Asked Questions
What aspect ratio is 1920x1080?
What is the best aspect ratio for social media images?
How does the GCD algorithm work?
Why does my image ratio show something like 300:157 instead of a clean ratio?
How do I maintain aspect ratio when resizing images in CSS?
aspect-ratio property: aspect-ratio: 16 / 9; combined with a width setting. Alternatively, set only one dimension (width or height) and let the browser calculate the other using height: auto;.
CalculateY