1. Home
  2. Design tools
  3. Aspect Ratio & Screen Dimension Calculator

Aspect Ratio & Screen Dimension Calculator

Reduce a size to its ratio, scale it to a new width, or find out how big a monitor really is.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Aspect Ratio & Screen Dimension Calculator

  1. Choose a task.
  2. Enter the numbers.
  3. Read the ratio, size or density.

Features

  • Ratio reduced by the greatest common divisor
  • Closest common ratio with its typical use
  • Height from width (or width from height) for any ratio
  • Screen width, height and PPI from diagonal and resolution
  • CSS aspect-ratio and padding values
  • Table of twelve common ratios

Supported formats

Input

  • Width and height
  • Ratio
  • Diagonal

You get

  • Ratio
  • Dimensions
  • PPI

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Aspect Ratio & Screen Dimension Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Screen sizes assume square pixels and the stated diagonal.
  • Ratios of odd resolutions may not reduce to small numbers.

Guide

Aspect ratios: finding, resizing and converting screen sizes

An aspect ratio is the shape of a rectangle written as width to height. It decides whether a video fits a player, whether a photo will crop on a social network, and how much vertical space a hero image reserves before it has loaded. People often know one dimension and need the other, or have an odd resolution and want to know which standard it matches. This calculator handles the three common cases and gives the CSS.

Finding the ratio

Divide both numbers by their greatest common divisor. For 1920 by 1080 the divisor is 120 and the result is 16:9. The page shows the decimal value, 1.7778, the CSS declaration aspect-ratio: 16 / 9; and the older padding-top: 56.25%;, which is 1080 ÷ 1920 expressed as a percentage. Next to these it names the closest common ratio and how far off it is: for 1920 by 1080 it is 16:9, “HD and 4K video, most screens”, off by 0%.

Odd sizes

Not every size reduces to something tidy. 1366 by 768 reduces to 683:384, and the page notes that this is probably not a standard shape because the reduced ratio has large numbers. The closest common ratio is 16:9, off by 0.05%. A 2560 by 1080 ultrawide reduces to 64:27 and is closest to 21:9, off by about 1.6%. This matters when you design for several devices: treat such sizes as their nearest standard and test the tiny difference.

Resizing to a ratio

On the Resize tab enter a ratio and the one side you know. With 16:9 and a width of 1280 the height is 720. With 4:5, the portrait format common for feeds, and a width of 1080 the height is 1350. The page shows the exact values and a rounded pair, because heights do not always come out as whole pixels. Use the rounded pair when you export images.

Screen size and density

The screen tab converts a diagonal, a ratio and a resolution into physical dimensions. For a 27 inch 16:9 monitor the width is 27 × 16 ÷ √(16² + 9²) = 23.53 inches (59.8 cm) and the height is 13.24 inches (33.6 cm). At 2560 by 1440 pixels the density is the pixel diagonal, about 2937, divided by 27 inches, which is 108.8 pixels per inch. The same panel at 3840 by 2160 gives 163.2 PPI. Marketing diagonals are rounded, so real panels differ slightly.

Common ratios

The reference table covers 1:1 for squares and avatars, 5:4 and 4:3 for older monitors and tablets, 3:2 for many cameras, 16:10 for laptops, 16:9 for video and most screens, 21:9 and 32:9 for ultrawides, 2:1 for banners, 4:5 for portrait feed images, 9:16 for vertical video and 2:3 for portrait photos and posters. Use them as targets when you crop.

Using the CSS

Set aspect-ratio: 16 / 9; on a container with a width, and the browser calculates the height. It works with object-fit to keep images from stretching, and it reserves space so the page does not shift when media loads. The padding hack puts the percentage on a wrapper with height: 0 and positions the content absolutely, a technique from before the property existed.

Edge cases

An element with an explicit height ignores the ratio. Content that is taller than the box can force the ratio to give way unless min-height: 0 or an overflow rule applies. Ratios are not changed by device pixel ratio: a 1920 by 1080 and a 3840 by 2160 screen share 16:9 while differing four times in pixels.

Limits

The tool computes numbers and CSS; it does not crop or resize files. It assumes square pixels. The closest common ratio is chosen from the twelve in the table only.

Checked against the current version of the Aspect Ratio & Screen Dimension Calculator on .

Frequently asked questions

Why does 1366 by 768 not give a clean 16:9?

Because 1366 and 768 share only a factor of 2, so the exact ratio reduces to 683:384. That is 0.05% away from 16:9, which is why laptop screens with that resolution are sold as 16:9. The page shows both the exact and the closest common ratio.

Should I use aspect-ratio or the padding-top hack?

Use the aspect-ratio property: all current browsers support it and it needs no wrapper element. The padding hack only matters for very old browsers or for locking an element that cannot take the property.

Why does 1366 × 768 not come out as 16:9?

Its exact ratio is 683:384, which is very close to 16:9 but not equal. The page shows the closest common ratio with the small difference.

How accurate is a computed screen size?

It follows from the diagonal and the ratio. Advertised diagonals are rounded and panels have small bezels, so real measurements differ slightly.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.