Aspect ratio calculator

Find the aspect ratio from width and height, work out the missing side from a ratio, resize proportionally and copy the CSS aspect-ratio.

Your data stays on your computer. Files are processed in your browser and are never uploaded.

Reduced ratio

16:9

As a decimal: 1.7778

It is exactly 16:9

Resize proportionally

1280 × 720 px

Even numbers and multiples of 8 are for video and codecs; with rounding the real ratio may differ slightly from the requested one.

CSS

aspect-ratio: 16 / 9;

Fallback for browsers without aspect-ratio

padding-top: 56.25%;

Keyboard shortcuts

In this tool

This tool has no keyboard actions.

Everywhere

Open this panel (outside text fields)
?
Closes panels and menus, never clears data
Esc
Search for a tool
/ or CtrlK

How to use it

  1. With “Find the ratio” enter width and height (for example 1920 and 1080): you get the reduced ratio, 16:9.
  2. To resize proportionally enter the new width: the height is worked out for you.
  3. With “Work out a side” pick a ratio (16:9, 4:3, A4…), enter the side you know and get the other.
  4. If needed, round to even numbers or multiples of 8; copy the CSS aspect-ratio ready to paste.

Frequently asked questions

What is an aspect ratio?

It is the ratio between the width and height of an image or screen, written like 16:9. You get it by dividing both sizes by their greatest common divisor.

What is the A4 (√2) ratio?

Sheets in the A series (A4, A3…) have a height equal to the width times the square root of 2 (about 1.4142): cutting a sheet in half gives a sheet with the same ratio.

Why round to multiples of 8 or even numbers?

Many video codecs require even sizes or multiples of 8 (or 16). Rounding changes the ratio slightly: the tool shows the difference.

How do I use aspect-ratio in CSS?

Add the property (for example aspect-ratio: 16 / 9) to an element with a defined width: the height follows the ratio. For very old browsers there is the fallback with a percentage padding-top.

Is my data sent to a server?

No: everything runs in your browser.

Tool chains

Link several tools into a path: after using a tool, “Send to…” offers the next step first. Saved chains keep only a name and the tools, never your data.

Saved chains

No saved chains.

New chain