Aspect Ratio Calculator

Width, height and ratio from any two.

Free tools that run in your browser. Nothing you type, open or create is uploaded to NerdBible or anyone else.

Find the ratio of a size

Work out the missing side

CSS


  

Common ratios

RatioDecimalCommon sizesUsed forApply

Ratios are reduced with the greatest common divisor. Sizes that do not reduce neatly, such as 1366 by 768, are also shown against the closest common ratio.

How to use it

  1. Type a width and height to see their ratio in its simplest form and as a decimal.
  2. To resize, pick a ratio and enter either a width or a height; the other side is filled in for you.
  3. Copy the CSS aspect-ratio line, or click Use on a common ratio to apply it.

Questions

How do I calculate an aspect ratio?

Divide the width and the height by their greatest common divisor. 1920 by 1080 share a divisor of 120, which gives 16 by 9.

What aspect ratio should I use for video?

16:9 for YouTube and most screens, 9:16 for Stories, Reels and Shorts, and 4:5 or 1:1 for feed posts on Instagram and Facebook.

What does the CSS aspect-ratio property do?

It keeps an element at a fixed shape while its width changes, so a video embed or image placeholder never jumps when the page loads. Set a width and aspect-ratio: 16 / 9 and the browser works out the height.

About this tool

Working out an aspect ratio

An aspect ratio is the shape of a rectangle: its width compared with its height. Type a width and height and this calculator reduces them to their simplest form, such as 1920 by 1080 becoming 16:9, and gives the decimal too. It divides both numbers by their greatest common divisor, here 120.

Some real sizes do not reduce neatly. 1366 by 768, a common laptop screen, reduces to 683:384, so the tool also shows the nearest common ratio, which is 16:9.

Resizing to a ratio

Pick a ratio and enter either a width or a height; the other side is filled in for you. That answers questions like how tall a 1200 pixel wide 4:5 image must be (1500 pixels).

Common ratios

  • 16:9: most screens, YouTube and video thumbnails.
  • 9:16: stories, reels and shorts.
  • 4:5 and 1:1: feed posts.
  • 4:3: older displays, tablets and many photos.
  • 3:2: most camera sensors.

For web developers

Copy the CSS aspect-ratio line to keep an element's shape fixed as its width changes, so a video embed or image placeholder never makes the page jump while loading.

All calculations run in your browser.

Related tools