To calculate an aspect ratio, divide the width and the height by their greatest common divisor, the largest whole number that divides both evenly. For 1920 × 1080 that number is 120, and 1,920 ÷ 120 = 16 and 1,080 ÷ 120 = 9, so the ratio is 16:9. Written width first, the ratio tells you the shape of a picture and nothing about its size.

This guide shows the steps, lists the common ratios, gives the formula for resizing without distortion and compares the three ways to fit a picture into a frame of a different shape.

Finding the ratio in three steps

An aspect ratio compares width to height. CSS writes it with a slash, as in 16 / 9, where the first number is the width and the second is the height. In text it is usually written with a colon.

  1. Write down the width and the height in pixels.
  2. Find their greatest common divisor (GCD).
  3. Divide both numbers by it.

Euclid's method finds the GCD by repeated division, keeping the remainder each time. Example for 1920 and 1080: 1,920 ÷ 1,080 leaves a remainder of 840. Then 1,080 ÷ 840 leaves 240. Then 840 ÷ 240 leaves 120. Then 240 ÷ 120 leaves 0. The last non-zero remainder, 120, is the GCD.

Dividing the width by the height gives the same shape as a decimal: 1,920 ÷ 1,080 = 1.7778, which matches 16 ÷ 9. The decimal is handy when the reduced numbers are awkward. For 1366 × 768 the GCD is 2, so the exact ratio is 683:384. Its decimal, 1.7786, is very close to the 1.7778 of 16:9, which tells you it is a near miss and not an exact match.

The aspect ratio calculator does the reduction for you.

Common ratios and where they come from

Ratio Decimal Example dimensions Note
1:1 1.0 1080 × 1080 Width equals height
4:3 1.3333 1024 × 768 Described as the traditional television format of the twentieth century
3:2 1.5 3000 × 2000 Three units wide for every two tall
16:9 1.7778 1920 × 1080 Described as the modern widescreen television format
9:16 0.5625 1080 × 1920 The 16:9 shape turned on its side

The descriptions of 4:3 and 16:9 come from a web-platform reference. The same page lists two cinema shapes as decimals: 1.85, the most common movie format since the 1960s, and 2.39, an anamorphic widescreen movie format. A value of 1.85 means 1.85 units of width for every 1 unit of height. The international recommendation for HDTV parameters (ITU-R BT.709) lists a 16:9 aspect ratio with 1,920 samples per line, 1,080 active lines and square pixels.

Square pixels explain why the pixel dimensions alone give the screen shape. The PNG specification covers the other case: it can store a pixel aspect ratio, so an image whose pixels are not square can be displayed in the intended shape.

Resizing without distortion

When you change one dimension, the other must follow the ratio:

new height = new width × height ÷ width

new width = new height × width ÷ height

Worked example. Example: resize 1920 × 1080 to a width of 1280.

  1. New height = 1,280 × 1,080 ÷ 1,920.
  2. 1,280 × 1,080 = 1,382,400, and 1,382,400 ÷ 1,920 = 720.
  3. The result is 1280 × 720, which reduces to 16:9 again.

Try a width of 1000 instead. 1,000 × 1,080 ÷ 1,920 = 562.5, which is not a whole number of pixels. Rounding to 562 or 563 leaves a ratio of 1.7794 or 1.7762 instead of 1.7778, a small mismatch.

You can avoid rounding by choosing widths that suit the ratio. For 16:9, any width that is a multiple of 16 gives a whole-number height, because the height is the width times 9 ÷ 16. The widths 640, 960 and 1280 give heights 360, 540 and 720.

Resize one side and compute the other. If you scale width and height by independent percentages, the picture is stretched. When you need to know how many pixels the result has, see what is a megapixel.

When the frame has a different shape

Sometimes the picture and the frame do not share a ratio. Example: place a 1920 × 1080 picture in a 4:3 frame of 1440 × 1080. There are three options.

Method Calculation What changes
Fit with bars Scale by 1,440 ÷ 1,920 = 0.75, giving 1440 × 810 Empty bands totaling 1,080 − 810 = 270 pixels, 135 at the top and 135 at the bottom
Fill by cropping Keep the full height; a 4:3 width is 1,080 × 4 ÷ 3 = 1,440 1,920 − 1,440 = 480 pixels of width are cut, 240 per side, which is 25% of the width
Stretch Width scaled by 0.75, height by 1.0 Nothing is cut, but every shape is squeezed and circles become ovals

Fitting keeps the whole picture, cropping keeps the whole frame filled, and stretching damages the content. Choose between the first two by what you can afford to lose. The same reasoning applies to prints, as shown in PPI vs. DPI.

To crop to a target ratio, compare the decimals. If the picture is wider than the target, cut width. If it is taller, cut height. Keep the full length of the side that limits the fit and calculate the other side from the ratio.

Example: a 4000 × 3000 picture (4:3, decimal 1.3333) cropped to 16:9 (1.7778). The picture is narrower than the target, so cut height. Keep the full width of 4,000, and the new height is 4,000 × 9 ÷ 16 = 2,250. That removes 3,000 − 2,250 = 750 rows, 375 at the top and 375 at the bottom. What remains is 4,000 × 2,250 = 9,000,000 pixels, which is 75% of the original 12,000,000.

Example: a 3000 × 2000 picture cropped to a square keeps 2,000 × 2,000 pixels and cuts 1,000 columns, 500 from each side.

Aspect ratio on a web page

The CSS aspect-ratio property sets the desired width-to-height ratio of an element's box. For images, giving the width and height attributes lets the browser calculate the aspect ratio before the file loads and reserve the space, which reduces layout shift. Example: a box 800 pixels wide with aspect-ratio: 16 / 9 is 450 pixels tall, because 800 × 9 ÷ 16 = 450. If the box narrows to 600 pixels, the height follows to 337.5, and the shape stays the same. Details are in choosing image dimensions for the web.

Common mistakes

  • Writing the ratio height first. The convention is width:height. A landscape picture that comes out as 9:16 means the numbers were swapped.
  • Rounding a height without checking. Non-integer results like 562.5 distort slightly. Pick a width that divides evenly.
  • Resizing both sides independently. Stretched pictures come from changing width and height by different amounts. Change one side and compute the other.
  • Assuming the same ratio means the same size. 1280 × 720 has 921,600 pixels and 1920 × 1080 has 2,073,600, yet both are 16:9.
  • Treating a near miss as exact. 1366 × 768 looks like 16:9 but reduces to 683:384. Compare decimals before assuming.
  • Confusing portrait and landscape. 1080 × 1920 is 9:16, not 16:9.

FAQ

What is the aspect ratio of 1920 × 1080?

It is 16:9. The greatest common divisor of 1,920 and 1,080 is 120, and dividing both by 120 gives 16 and 9.

How do I resize an image without changing its aspect ratio?

Pick the new width and multiply it by the original height, then divide by the original width. That result is the new height.

Can I turn a 4:3 image into 16:9 without cropping?

Not without adding bands or stretching. A different ratio means a different shape, so something must be cut, padded or distorted.

Does aspect ratio affect file size?

Indirectly. File size follows the pixel count, and the ratio only describes the shape of those pixels. Use the image file size calculator to see the effect of any dimensions.

Sources

  1. Mozilla (MDN Web Docs), <ratio> CSS type. Accessed November 6, 2026.
  2. Mozilla (MDN Web Docs), aspect-ratio CSS property. Accessed November 6, 2026.
  3. Mozilla (MDN Web Docs), <img> HTML image embed element. Accessed November 6, 2026.
  4. ITU-R, Recommendation ITU-R BT.709-6: Parameter values for the HDTV standards for production and international programme exchange. Accessed November 6, 2026.
  5. W3C, Portable Network Graphics (PNG) Specification (Third Edition). Accessed November 6, 2026.