ThisCalculator

Technology

Calculate Image Aspect Ratio From Its Dimensions

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Calculate Image Aspect Ratio From Its Dimensions

Calculate an image’s aspect ratio by dividing its width by its height, then express the result as a simplified width:height pair. Enter the image’s pixel width and height below to get both the ratio and its decimal form.

Formula

The aspect ratio is width divided by height. To write it as a whole-number ratio, divide both dimensions by their greatest common divisor:

  • Decimal ratio: r = w / h
  • Simplified ratio: w ÷ g : h ÷ g, where g is the greatest common divisor of w and h

Here, w is image width and h is image height, measured in the same unit, usually pixels. The calculator’s first result is the simplified width:height ratio; its second result is the decimal value of width divided by height. The dimensions must be positive numbers.

Worked Example

With the default dimensions, the image is 1920 pixels wide and 1080 pixels high.

  1. Find the greatest common divisor of 1920 and 1080: it is 120.
  2. Divide both dimensions by 120: 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9.
  3. Write the simplified ratio: 16:9.
  4. Divide the width by the height: 1920 ÷ 1080 = 1.777…, which rounds to 1.778 at three decimal places.

The calculator therefore returns 16:9 and 1.778.

What an Aspect Ratio Tells You

An aspect ratio describes an image’s shape, not its size, sharpness, file size, or pixel count. A 16:9 image is proportioned like any other 16:9 image, whether it measures 160 by 90 pixels or 3840 by 2160 pixels. The larger image contains more pixels, but the shape is the same.

Ratios are conventionally written width first and height second. For example, 4:3 means four units across for every three units tall. The decimal version, 4 ÷ 3 = 1.333…, means the width is about 1.33 times the height. A ratio below 1, such as 0.75, indicates a portrait-shaped image; a ratio above 1 indicates a landscape-shaped image. A square image has a ratio of 1:1 and a decimal value of 1.

How to Calculate It by Hand

Use the original image’s width and height in matching units. Pixel dimensions are convenient for digital files, but any common unit works: a print that is 8 inches wide and 10 inches high has the same ratio as one measuring 8 centimeters by 10 centimeters.

  • For a simplified whole-number ratio, find the greatest common divisor and divide both dimensions by it. For 1200 × 800 pixels, the divisor is 400, so the ratio is 3:2.
  • For a decimal ratio, divide width by height. For 1200 × 800, the result is 1.5.
  • If dimensions do not reduce neatly to small integers, keep the original pixel dimensions as a ratio or use a rounded decimal. Do not round the width and height separately before calculating.

Aspect-ratio calculators often display a colon-separated ratio and a decimal. These are two ways to describe the same proportions, though the decimal is typically rounded to a chosen number of places.

Common Image Ratios and Resizing

Some common proportions include 1:1 for square images, 4:3 for a traditional landscape frame, 3:2 for many still photographs, and 16:9 for widescreen video and displays. These are common formats, not rules: a particular platform, screen, or print layout may require different dimensions.

To resize an image without changing its shape, multiply both dimensions by the same factor. For example, reducing a 1920 × 1080 image by half produces 960 × 540, still 16:9. If you set a new width but keep the ratio, calculate the new height as new width ÷ decimal ratio. For a 1200-pixel width at 16:9, the height is 1200 × 9 ÷ 16 = 675 pixels.

Changing only one dimension distorts the image unless you deliberately crop, stretch, or add empty space. Cropping removes parts of the image to fit a target shape; stretching changes the proportions of objects; padding preserves the full image while adding blank margins. These operations can produce the same final canvas dimensions but different visual results.

Common Mistakes and Limits

The most frequent error is reversing the order. A 1200 × 800 image has a width-to-height ratio of 3:2, not 2:3. The reversed value describes the same dimensions in height:width order and can be useful when discussing portrait orientation, but it is not the standard width-first format.

Other points to check:

  • Use the displayed image dimensions: A photo may have been cropped or resized after capture, so camera sensor or original file dimensions may not match the current image.
  • Do not mix units: If width is in inches and height is in centimeters, convert them to the same unit before dividing.
  • Separate shape from resolution: Aspect ratio alone cannot tell you whether an image has enough pixels for a particular screen or print size.
  • Account for rounding: A displayed decimal such as 1.778 is an approximation of 16:9, not a different ratio.
  • Distinguish image from display pixels: Some video formats use non-square pixels or display metadata that affects the shown shape. In those cases, the file’s raw pixel dimensions may not fully describe its displayed aspect ratio.

The calculation assumes the width and height refer to the same rectangular image area and that the pixels are square. It does not identify a file’s intended crop, account for display metadata, or determine whether a target service will crop or pad the image.

Frequently Asked Questions

How do I calculate an image’s aspect ratio?
Divide the width by the height for a decimal, or divide both dimensions by their greatest common divisor to make a simplified width:height ratio.

What is the aspect ratio of a 1920 × 1080 image?
It is 16:9. Dividing 1920 by 1080 gives approximately 1.778.

Is aspect ratio the same as image resolution?
No. Aspect ratio describes the relationship between width and height. Resolution describes the number of pixels in the image, often given as width × height.

How do I resize an image without changing its aspect ratio?
Scale width and height by the same factor, or choose one dimension and calculate the other using the original ratio. Avoid changing just one dimension.

Does a larger aspect-ratio number mean a wider image?
For the width-divided-by-height decimal, yes: values above 1 are landscape-shaped, values below 1 are portrait-shaped, and 1 is square. The colon format is easier to interpret as a pair of proportions.

Related

Formula used
in w | Image width | px | 1920 | 1
in h | Image height | px | 1080 | 1
out ratio | Aspect ratio | : | w / gcd(w,h) | 0
out decimal | Width divided by height | - | w / h | 3

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.