Skip to content
Ratilio

Aspect Ratios

How to Calculate Image Aspect Ratio from Width and Height

To calculate an image's aspect ratio, divide its width and height by their greatest common divisor (GCD). For example, a 1920 × 1080 image has a greatest common divisor of 120, so its simplified aspect ratio is 16:9.

By Ratilio Editorial Team · Published

You can also calculate an aspect ratio by dividing width by height to get a decimal value. However, the decimal alone doesn't always identify a unique simplified ratio.

This guide explains both methods, how to find a missing width or height, and how to check whether two images share the same proportions.

What is an aspect ratio?

An aspect ratio describes the proportional relationship between an image's width and height.

It is normally written as:

Width : Height

For example, an image measuring 1600 × 900 pixels has a 16:9 aspect ratio.

The first number represents width, and the second represents height.

Aspect ratio describes the image's shape, not its total number of pixels.

A 1600 × 900 image and a 3840 × 2160 image both have a 16:9 ratio, even though their resolutions are different.

If you already have an image file, Ratilio's Image Aspect Ratio Checker can identify its dimensions and ratio.

How to calculate aspect ratio using the GCD method

The most accurate way to simplify an integer pixel ratio is to find the greatest common divisor of its width and height.

The GCD is the largest whole number that divides both dimensions exactly.

Example 1: Calculate 1920 × 1080

Original dimensions:

1920 × 1080

Greatest common divisor:

120

Divide both dimensions by 120:

1920 ÷ 120 = 16

1080 ÷ 120 = 9

Result: 16:9

This is one of the most common landscape aspect ratios.

Example 2: Calculate 1080 × 1350

Original dimensions:

1080 × 1350

Greatest common divisor:

270

1080 ÷ 270 = 4

1350 ÷ 270 = 5

Result: 4:5

This is a portrait ratio commonly used for social media images.

Example 3: Calculate 3000 × 2000

Original dimensions:

3000 × 2000

Greatest common divisor:

1000

3000 ÷ 1000 = 3

2000 ÷ 1000 = 2

Result: 3:2

This ratio is common in photography.

Simplifying 1920:1080 to 16:9

How to calculate aspect ratio using division

You can also divide an image's width by its height.

For example:

1920 ÷ 1080 ≈ 1.7778

This means the image is approximately 1.7778 times as wide as it is tall.

That decimal corresponds to 16:9.

Other examples include:

DimensionsWidth ÷ heightSimplified ratio
1080 × 108011:1
1200 × 15000.84:5
1080 × 14400.753:4
3000 × 20001.53:2
1600 × 12001.3333…4:3
1920 × 10801.7778…16:9

The decimal method is useful for comparing image shapes.

However, a rounded decimal cannot always reveal the exact original ratio.

For example, ratios of 16:9 and 1.78:1 are close but not mathematically identical.

Use the GCD method when you need the exact simplified ratio of integer pixel dimensions.

How to find a missing image height

If you know the width and target aspect ratio, you can calculate the matching height.

Example: Find the height for a 16:9 image

Suppose the required width is 1280 pixels.

Target ratio: 16:9

Height = 1280 × 9 ÷ 16

Height = 720 pixels

Result: 1280 × 720

Example: Find the height for a 4:5 image

Suppose the required width is 1200 pixels.

Target ratio: 4:5

Height = 1200 × 5 ÷ 4

Height = 1500 pixels

Result: 1200 × 1500

These calculations are useful when preparing images for websites, social media and design layouts.

How to find a missing image width

If you know the height and target aspect ratio, use the reverse formula.

Example: Find the width for a 9:16 image

Suppose the target height is 1920 pixels.

Width = 1920 × 9 ÷ 16

Width = 1080 pixels

Result: 1080 × 1920

Example: Find the width for a 3:2 image

Suppose the height is 2000 pixels.

Width = 2000 × 3 ÷ 2

Width = 3000 pixels

Result: 3000 × 2000

Ratilio's Aspect Ratio Calculator can perform these calculations automatically.

How to tell whether two images have the same aspect ratio

Two images share the same aspect ratio if their widths and heights are proportional.

For example:

Image A: 1920 × 1080

Image B: 1280 × 720

Both simplify to 16:9.

But you don't have to simplify both ratios separately.

You can compare them using cross multiplication.

If the results are equal, the aspect ratios match exactly.

Example: Compare 1920 × 1080 and 1280 × 720

1920 × 720 = 1,382,400

1080 × 1280 = 1,382,400

The values are equal.

Result: Both images have the same aspect ratio.

Example: Compare 1920 × 1080 and 1200 × 800

1920 × 800 = 1,536,000

1080 × 1200 = 1,296,000

The values are different.

Result: The aspect ratios do not match.

The first image is 16:9, while the second is 3:2.

Common image dimensions and their aspect ratios

Here is a quick-reference chart.

Image dimensionsAspect ratioOrientation
500 × 5001:1Square
1080 × 10801:1Square
1080 × 13504:5Portrait
1080 × 14403:4Portrait
1080 × 19209:16Portrait
1200 × 8003:2Landscape
1600 × 12004:3Landscape
1920 × 108016:9Landscape
2560 × 144016:9Landscape
3840 × 216016:9Landscape
4000 × 30004:3Landscape
6000 × 40003:2Landscape

If you need to decide which ratio to use, read How to Choose the Right Aspect Ratio for Photos, Videos & Social Media.

What if the calculated dimensions are not whole numbers?

Pixels are discrete units, so exported raster image dimensions must be whole numbers.

Sometimes an aspect-ratio calculation produces a fractional result.

For example, suppose you want a 16:9 image with a width of 1000 pixels.

Height = 1000 × 9 ÷ 16

Height = 562.5 pixels

You cannot export an image that is exactly 562.5 pixels high.

You must choose a whole number, such as 562 or 563 pixels.

Neither produces an exact 16:9 ratio, but both are close.

How can you get an exact ratio?

For a simplified ratio A:B, choose dimensions that are whole-number multiples of A and B.

For example, exact 16:9 dimensions include:

  • 960 × 540
  • 1280 × 720
  • 1600 × 900
  • 1920 × 1080
  • 2560 × 1440

In general, an exact 16:9 integer-pixel image has dimensions 16k × 9k, where k is a positive whole number.

If your requested width isn't divisible by 16, an exact 16:9 height may not be possible with that fixed width.

Exact vs rounded 16:9 dimensions

How to calculate aspect ratio for portrait images

The same formulas work for portrait images.

For example:

1080 × 1920

Greatest common divisor = 120

1080 ÷ 120 = 9

1920 ÷ 120 = 16

Result: 9:16

If you rotate the image by 90 degrees without cropping or distortion, its dimensions become:

1920 × 1080

The ratio becomes 16:9.

The numbers reverse because width and height exchange positions.

For more examples, read 9:16 Aspect Ratio: Sizes, Vertical Video & How to Convert 16:9.

How to calculate aspect ratio for print sizes

Aspect ratios also apply to physical dimensions.

For example, a 6 × 4-inch landscape print has a 3:2 aspect ratio.

An 8 × 10-inch portrait print has a 4:5 ratio.

You can simplify physical width and height in the same way, provided both measurements use the same units.

However, aspect ratio and print resolution are separate.

A 6 × 4-inch print at 300 PPI requires:

1800 × 1200 pixels in landscape orientation.

The aspect ratio is 3:2.

The PPI determines how many pixels are needed for the chosen physical size.

Use Ratilio's Print Size Calculator for print-resolution calculations.

Can two different aspect ratios look almost identical?

Yes.

For example, a 1920 × 1080 image has an exact ratio of 16:9.

A 1919 × 1080 image has a slightly different ratio.

The visual difference is small, but the mathematical ratios are not identical.

This matters when you need exact dimensions for a design specification or automated image-processing workflow.

For ordinary display, small rounding differences may be visually negligible.

Always follow the exact requirements of the destination when those requirements are specified.

Common mistakes when calculating aspect ratio

  • Reversing width and height. Aspect ratios are normally written width first.
  • Confusing ratio with pixel dimensions. 16:9 describes shape; 1920 × 1080 describes dimensions.
  • Rounding too early. Use full precision during calculations and round final pixel dimensions only when needed.
  • Assuming a decimal is an exact ratio. Rounded decimals can hide small differences.
  • Forgetting to simplify. 1920:1080 is mathematically correct but simplifies to 16:9.
  • Ignoring orientation. 16:9 and 9:16 describe different orientations.
  • Stretching to force an exact ratio. Cropping or padding may be better when the original ratio differs.

Frequently asked questions

How do I calculate aspect ratio from pixels?

Find the greatest common divisor of the image's width and height, then divide both dimensions by it.

What is the aspect ratio of 1920 × 1080?

16:9.

What is the aspect ratio of 1080 × 1350?

4:5.

What is the aspect ratio of 1080 × 1920?

9:16.

How do I calculate a 16:9 height from width?

Multiply the width by 9 and divide by 16.

For example, 1280 × 9 ÷ 16 = 720.

How do I calculate a 4:5 width from height?

Multiply the height by 4 and divide by 5.

For example, 1500 × 4 ÷ 5 = 1200.

Is aspect ratio the same as resolution?

No. Aspect ratio describes shape. Resolution commonly describes pixel dimensions or pixel density, depending on context.

Can I calculate aspect ratio without a calculator?

Yes. You can simplify width and height by their greatest common divisor or divide width by height to compare their proportions.

Aspect Ratio CalculatorWant to calculate an image's ratio or find a missing width or height? Use Ratilio's Aspect Ratio Calculator for instant results.

Key takeaways

  • Aspect ratio is the proportional relationship between width and height.
  • Divide both pixel dimensions by their greatest common divisor to get the exact simplified ratio.
  • Use width ÷ height for a decimal comparison.
  • Calculate missing height with Width × Ratio height ÷ Ratio width.
  • Calculate missing width with Height × Ratio width ÷ Ratio height.
  • Compare ratios exactly using cross multiplication.
  • Exact integer-pixel dimensions require compatible multiples of the target ratio.
  • Avoid stretching images when changing their proportions.