Aspect Ratio Calculator

Aspect ratio is the proportional relationship between width and height, simplified using the greatest common divisor (GCD). For example, 1920x1080 simplifies to 16:9 because GCD(1920, 1080) = 120, yielding 1920/120 : 1080/120 = 16:9. Enter dimensions to find the simplified ratio, or specify a ratio and one dimension to calculate the other.

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

Frequently Asked Questions

What aspect ratio is 1920x1080?
1920x1080 is a 16:9 aspect ratio. This is the standard widescreen format used for Full HD (1080p) displays, YouTube videos, and most modern monitors.
What is the best aspect ratio for social media images?
It varies by platform. Instagram feed posts use 1:1 (square) or 4:5 (portrait). Instagram Stories and TikTok use 9:16 (vertical). Facebook and Twitter link previews are approximately 1.91:1 (1200x628). YouTube thumbnails are 16:9 (1280x720).
How does the GCD algorithm work?
The Euclidean algorithm finds the greatest common divisor by repeatedly dividing the larger number by the smaller and taking the remainder. When the remainder reaches zero, the last non-zero remainder is the GCD. For example, GCD(1920, 1080): 1920 mod 1080 = 840, 1080 mod 840 = 240, 840 mod 240 = 120, 240 mod 120 = 0. So GCD = 120.
Why does my image ratio show something like 300:157 instead of a clean ratio?
If the width and height do not share a large common factor, the simplified ratio will have large numbers. For example, 1200x628 simplifies to 300:157 because GCD(1200, 628) = 4. This is still mathematically correct but not a standard named ratio. The closest standard ratio would be approximately 1.91:1.
How do I maintain aspect ratio when resizing images in CSS?
Use the 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;.