Aspect Ratio Calculator

Enter width and height in pixels (or cm, inches …): the calculator simplifies the aspect ratio and shows its decimal value and the nearest standard ratio. Add a new width or height and it works out the missing side – resize without distortion.

px
px
px
Leave empty if you only need the ratio.
Your inputs are saved in this browser only.

Result

Aspect ratio (simplified)
16:9
New dimensions
1280 × 720 px
Decimal value (width ÷ height)
1.778 : 1
Standard ratio
exactly 16:9
CSS
aspect-ratio: 16 / 9;
Same ratio at common widths
WidthHeightWhole pixels?
640 px360 pxyes
1080 px608 pxrounded
1280 px720 pxyes
1920 px1080 pxyes
2560 px1440 pxyes
3840 px2160 pxyes

How it is calculated

How the aspect ratio is calculated

The aspect ratio is width to height, divided by the greatest common divisor (GCD). Example 1920 × 1080: the GCD of 1920 and 1080 is 120. 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9 – so 16:9. The decimal value is 1920 ÷ 1080 = 1.778 : 1.

Finding the missing side

To resize an image or video proportionally, use the rule of three: new height = new width × height ÷ width. 1920 × 1080 at a new width of 1280 gives 1280 × 1080 ÷ 1920 = 720, i.e. 1280 × 720 px. The other way round: new width = new height × width ÷ height. If the result is not a whole number of pixels, the calculator rounds it and shows the exact value.

Common aspect ratios

The nearest standard ratio is found by the smallest relative distance. That shows, for example, that 1366 × 768 (simplified 683:384) is practically 16:9.

Aspect ratio in CSS

aspect-ratio: 16 / 9; keeps an element's proportions as it scales – handy for videos, cards and image placeholders so the page does not jump while loading. The property is defined in the CSS Box Sizing Module Level 4 and supported by all current browsers.

Which tool for which question?

This calculator answers general ratio questions. Exact pixel sizes for Instagram, YouTube and co. are listed under social media image sizes; your own display is measured by What is my screen resolution?

Frequently asked questions

How do I calculate an aspect ratio?

Divide width and height by their greatest common divisor. 1920 × 1080: GCD 120, so 16:9. 1080 × 1350: GCD 270, so 4:5.

What is the height of 16:9 at 1280 pixels wide?

1280 × 9 ÷ 16 = 720 pixels. Other 16:9 sizes: 1920 × 1080, 2560 × 1440 and 3840 × 2160.

Is 1366 × 768 really 16:9?

Almost: it simplifies to 683:384, and its decimal value of 1.779 is only 0.05% above 16:9 (1.778). That is why it is sold as 16:9.

What aspect ratio is a 3440 × 1440 “21:9” monitor?

It simplifies to 43:18, i.e. 2.39 : 1. “21:9” is a marketing label; exactly 21:9 would be 2.33 : 1. 2560 × 1080 is 64:27 (2.37 : 1).

How do I set an aspect ratio in CSS?

Use aspect-ratio: 16 / 9; on the element. If only the width is set, the browser derives the height from it.

Does it work with cm or inches?

Yes. A ratio has no unit – just enter both sides in the same unit. Decimals such as 2.35 × 1 are turned into whole numbers before simplifying (47:20).

Sources and legal basis

As of:

Related tools