Aspect ratio calculator: find the ratio or the missing width or height

Reduce any size to its simplest ratio, or scale an image, video or box to a new width or height without stretching it.

  • Free, no sign-up
  • Your files and data stay on your device
  • No watermarks or limits

0 bytes uploaded. Everything happens in this tab.

How to use it

  1. In “Ratio of a size”, enter the Width and Height in pixels to get the ratio.
  2. In “Find the other side”, pick a ratio such as 16:9 (or Custom), choose whether you know the Width or the Height, and enter the Value.
  3. Copy the new size, or copy the ready CSS line aspect-ratio: 16 / 9;.

Example

Two quick checks:

1920 x 1080 → 16:9 (decimal 1.7778)
Ratio 4:5, width 1080 px → height 1350 px

About this tool

An aspect ratio describes the shape of a rectangle as width to height, regardless of its size. A 1920 by 1080 picture and a 1280 by 720 picture have the same ratio, 16:9, so one is just a bigger copy of the other. To find it the tool divides both sides by their greatest common divisor, and it also shows the decimal value, which is handy when a tool asks for 1.78 instead of 16:9.

The second mode solves the opposite problem. If a design needs a 4:5 portrait image that is 1080 pixels wide, the height must be 1350. Choose from common ratios such as 1:1, 4:3, 3:2, 16:9, 21:9, 9:16, 4:5 and 1.91:1, or enter your own Custom ratio, then give either the width or the height. A small box next to the result previews the shape.

Results are rounded to two decimals, so for some ratios and sizes you get a fraction of a pixel. Round to a whole number yourself, and remember that some video encoders require even dimensions. Real-world sizes also may not match a clean ratio exactly: a size of 1000 by 750 reduces to 4:3, but a size such as 1366 by 768 only comes close to 16:9 and reduces to an unusual ratio. The tool works locally and uploads nothing.

Frequently asked questions

How do I calculate an aspect ratio?

Divide width and height by their greatest common divisor. For 1920 by 1080 that divisor is 120, which gives 16:9.

How do I resize an image and keep its proportions?

Use the second mode: choose the image ratio, say which side you know and enter its value. The other side is calculated.

Why is my ratio something odd like 683:384?

Because the pixel size is not an exact common ratio. Many screens round 16:9 to a size that does not divide cleanly, such as 1366 by 768.

What is the CSS aspect-ratio property?

It lets an element keep a set shape, for example aspect-ratio: 16 / 9, so you do not have to calculate padding or height by hand.

Are my files uploaded?

You do not give the tool any file at all, only numbers, and they stay in your browser.

Often used next