ClickNote
ClickNote
Try the live demoStart free trial

The demo needs no sign-up. The trial needs no card.

Open dashboard
Choose a plan
Dashboard
Start free trial

The trial needs no card.

Aspect ratio calculator

Type a width and a height to get the aspect ratio in its simplest form. Change one side to get the other, and copy the CSS that holds the shape.

Width and height

Aspect ratio

16:9

As a decimal: 1.7778 (1.78:1). Landscape.

A box drawn 16 wide for every 9 high.

Or start from a common one

Common ratios

Common sizes

Resize and keep the ratio

Type one side and the other follows.

1280 x 720 is the same shape as 1920 x 1080.

The CSS for it

aspect-ratio: 16 / 9;
padding-top: 56.25%;

The first line works in every current browser. The second is the older way to hold the same shape: there is more on both further down.

Runs in your browser. Nothing you open or type is sent anywhere.

How to use it

  1. Type a width and a height

    In pixels or any other unit: only the proportion counts. Or press a common ratio or size to start from.

  2. Read the ratio

    It is given in its simplest form, such as 16:9, and as a decimal, with a box drawn to the same shape.

  3. Resize without stretching

    Type a new width to get the height that keeps the shape, or a new height to get the width.

  4. Copy the CSS

    Take the aspect-ratio line for current browsers, or the padding-top percentage for the older technique.

What an aspect ratio is, and where the common ones are used

An aspect ratio is the shape of a rectangle, written as its width against its height. A picture 1920 pixels wide and 1080 high has the ratio 1920:1080, which divides down to 16:9: for every 16 units across there are 9 down. The size can change while the ratio stays the same, and that is the whole use of it. 1280 x 720, 1920 x 1080 and 3840 x 2160 are three sizes of one shape, so a video made at one of them fills a frame made for another with nothing cropped and nothing stretched.

How the sums work

To simplify a ratio, divide both sides by the largest number that goes into both. For 1920 and 1080 that number is 120, which gives 16 and 9. To resize, multiply: the new height is the new width times the old height, divided by the old width. When the answer is not a whole number of pixels the calculator rounds it and says so, because half a pixel cannot be drawn.

Where the common ratios are used

  • 16:9 is video, television, presentation slides and most laptop and desktop screens.
  • 4:3 is older screens and video, many tablets, and most photographs taken on a phone.
  • 3:2 is photographs from most cameras with changeable lenses, and some laptop screens.
  • 1:1 is a square: profile pictures, product grids and square posts.
  • 4:5 is an upright post in a social feed.
  • 9:16 is 16:9 turned on its end: stories, reels and other full-screen video on a phone.
  • 21:9 is ultrawide monitors and wide, cinema-style banners.

Aspect ratio in CSS

A web page often has to hold a space for an image or a video before it has loaded, or everything under it jumps when it arrives. The aspect-ratio property does that in one line: give an element a width and aspect-ratio: 16 / 9, and the browser works out the height. Every current browser supports it.

Before it existed, the same effect came from padding. A percentage of padding-top is measured against the element’s width, so padding-top: 56.25% (9 divided by 16) on an element with no height of its own makes a 16:9 box, with the content placed over it. You will still meet that in older themes and in the embed codes of video players, which is why the calculator gives both.

Aspect ratio calculator

Questions people ask

What is an aspect ratio?

The shape of an image, a video or a screen: its width compared with its height, written as two numbers with a colon between them, such as 16:9. It says nothing about size. A video on a phone and a film on a cinema screen can have the same aspect ratio.

How do I calculate an aspect ratio?

Divide the width and the height by the largest number that divides both exactly. 1920 and 1080 both divide by 120, which leaves 16 and 9, so the ratio is 16:9. Or type the two numbers into the calculator above and read the answer.

How do I find the aspect ratio of an image?

Find its size in pixels first. On a computer the file’s properties (Get Info on a Mac) show it, and so does any image editor. Type the width and the height into the calculator and it gives the ratio: an image of 1200 x 800 pixels is 3:2.

Which resolutions are 16:9?

Any size that is 16 parts wide for every 9 high. The common ones are 1280 x 720 (HD), 1920 x 1080 (Full HD), 2560 x 1440 and 3840 x 2160 (4K). For another, press 16:9 above and type the width you need under “Resize and keep the ratio”.

How do I resize an image without stretching it?

Keep its aspect ratio: change the width and the height by the same proportion. Type the image’s size into the calculator, then the new width, and it gives the height to use with it.

How do I set an aspect ratio in CSS?

Give the element a width and the aspect-ratio property, for example aspect-ratio: 16 / 9, and the browser sets the height to match. The calculator writes that line for the size you type, and the padding-top percentage for code written before the property existed.

Live demo

Try the live demo

We will set up a demo account for you.