Aspect Ratio Calculator

Enter a width and height to get the simplified ratio, or lock a ratio and type one side to get the other.

Enter your dimensions

Ratio unlocked. Width and height change independently.

Your aspect ratio

n/a

Pick a ratio to lock

Ratio presets (also locks the ratio)
Custom ratio

Scale to a new size

Type a new width or a new height. The other side follows the ratio above.

n/a

Shape preview

Common resolutions

Press Use to load a size into the calculator.

NameSizeExact ratioLoad

How to use the aspect ratio calculator

  1. Type a Width and a Height. The simplified ratio appears at once, with its decimal value.
  2. Press a preset such as 16:9 or 4:3, or type a Custom ratio like 2.39 : 1 and press Use ratio. Either one locks the ratio.
  3. With Lock ratio on, typing a width updates the height, and typing a height updates the width.
  4. Under Scale to a new size, type a New width or New height to get the matching side.
  5. Press Use on a row of Common resolutions to load that size.

How the ratio is found

Ratio = width ÷ GCD : height ÷ GCD

The greatest common divisor (GCD) comes from the Euclidean algorithm. To scale, new height = new width × ratio height ÷ ratio width. Sizes are rounded to a whole pixel when you type a whole number, and the exact value is shown when rounding changed it. CSS uses the same idea in the aspect-ratio property.

Worked example

The calculator opens with 1920 × 1080. The GCD of 1920 and 1080 is 120, and 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9, so the result is 16:9, or 1.7778 as a decimal (1.78:1). Under Scale to a new size, a new width of 1280 gives 1280 × 9 ÷ 16 = 720, so the scaled size is 1280 × 720.

Limits and edge cases

Aspect ratio FAQ

How do I calculate the aspect ratio of an image?

Divide the width and the height by their greatest common divisor. For 1920 × 1080 the greatest common divisor is 120, so 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9, which gives 16:9.

What aspect ratio is 1366 x 768?

1366 × 768 reduces to 683:384, or 1.7786. That is within 0.05% of 16:9 (1.7778), so it is sold as a 16:9 screen. The calculator shows the closest common ratio whenever the exact one is within 3% of it.

Is 21:9 a real aspect ratio?

It is mostly a marketing label. A 2560 × 1080 monitor is 64:27 (2.37:1) and a 3440 × 1440 monitor is 43:18 (2.39:1), both close to 21:9 (2.33:1). Cinema widescreen is usually 2.39:1.

How do I resize an image without stretching it?

Keep the same aspect ratio. Lock the ratio, type the new width, and read the height, or work it out as new width × original height ÷ original width. A 1920 × 1080 image scaled to 1280 wide is 1280 × 720. If you need a different shape, crop instead of stretching.

What aspect ratio should I use for YouTube and Instagram?

YouTube's standard player is 16:9, and vertical Shorts use 9:16. Instagram feed photos accept ratios from 1.91:1 (landscape) to 3:4 (portrait), and 4:5 (1080 × 1350) is a popular portrait choice. Stories and Reels use 9:16 (1080 × 1920). Platforms change their rules, so check the current help page before you export.

Sources: Aspect ratio (image); MDN, CSS aspect-ratio; Buffer Help Center, Instagram aspect ratio ranges.