ThisCalculator

Technology

Aspect Ratio Calculator: Calculate Width and Height

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.

Aspect Ratio Calculator: Calculate Width and Height

Calculate an aspect ratio by dividing an image or screen’s width and height by their greatest common divisor; the simplified ratio is width:height. Enter the width and height to get that ratio, plus its decimal form for comparing proportions.

Formula

For whole-number dimensions, simplify the ratio by dividing both measurements by their greatest common divisor (GCD): aspect ratio = (width ÷ GCD) : (height ÷ GCD). Width and height must use the same unit. The calculator inputs are w, the width in pixels, and h, the height in pixels. Its result is the pair of reduced dimensions, not a unit of measurement.

A decimal comparison is also useful: width ÷ height. For example, a 16:9 ratio is approximately 1.78. The required calculator output here is the simplified width-to-height pair. The GCD is the largest whole number that divides both dimensions without a remainder.

Worked Example

Using the calculator’s default width of 1,920 px and height of 1,080 px:

  1. Find the greatest common divisor of 1,920 and 1,080: it is 120.
  2. Divide the width by 120: 1,920 ÷ 120 = 16.
  3. Divide the height by 120: 1,080 ÷ 120 = 9.
  4. Write the reduced width-to-height ratio: 16:9.

The decimal form is 1,920 ÷ 1,080 = 1.777…, or about 1.78. The ratio itself is 16:9.

What Aspect Ratio Describes

An aspect ratio describes the relative proportions of a rectangle. It compares width with height while ignoring the rectangle’s overall size. A 1,920 × 1,080 image and a 640 × 360 image are different sizes, but both have a 16:9 aspect ratio because their dimensions scale by the same factor.

Ratios are conventionally written width first and height second. Thus, 4:3 means four units across for every three units tall. It does not mean the image is four inches wide or that its total dimensions are 4 by 3 pixels. The numbers can represent any consistent unit, including pixels, inches, centimetres, or millimetres.

How to Calculate It for Any Dimensions

For positive whole-number dimensions, the GCD method gives an exact, fully reduced ratio. You can find the GCD by listing common factors for small numbers or by using the Euclidean algorithm for larger ones: repeatedly divide the larger number by the smaller and replace the pair with the smaller number and the remainder. When the remainder reaches zero, the last nonzero divisor is the GCD.

For example, a 1,200 × 800 image has a GCD of 400. Divide both dimensions by 400 to get 3:2. If the dimensions are not whole numbers, such as 12.5 cm by 7.5 cm, divide both by a common scale factor or first convert them to comparable whole-number units: 125 mm by 75 mm reduces to 5:3.

In some contexts, a decimal ratio is enough. Divide width by height; if the result is 1, the rectangle is square. A result greater than 1 indicates a landscape shape, while a result less than 1 indicates a portrait shape. These labels describe orientation, not image quality.

Use the Ratio to Find a Missing Dimension

Once you know the ratio, you can resize an image or rectangle without changing its proportions. If the ratio is width:height = a:b, then width ÷ height = a ÷ b. To calculate a new height from a chosen width, use height = width × b ÷ a. To calculate a new width from a chosen height, use width = height × a ÷ b.

For example, a 16:9 image resized to 1,280 pixels wide should be 1,280 × 9 ÷ 16 = 720 pixels tall. This preserves the ratio exactly. A device or file may require whole-pixel dimensions, so a calculation that produces a fraction of a pixel must be rounded; that can make the resulting ratio very slightly different.

Choosing and Comparing Ratios

The right ratio depends on the shape of the material or display area you need to fill. Common examples include 16:9 for many widescreen video frames, 4:3 for older television and many traditional image formats, 1:1 for a square, and 3:2 for some still photographs. These are common formats, not rules: the intended platform, layout, or physical object determines what fits.

When comparing two ratios, compare their width-to-height values or cross-multiply. For ratios a:b and c:d, they match when a × d = b × c. For instance, 1920:1080 and 16:9 match because 1920 × 9 equals 1080 × 16. Their dimensions need not be identical; they only need to have the same proportions.

Common Mistakes and Limits

  • Reversing the order: 16:9 and 9:16 describe different orientations. Keep width first and height second.
  • Mixing units: Do not compare a width in inches with a height in centimetres as though their values shared a unit. Convert first. The ratio is unitless only after the units match.
  • Confusing ratio with resolution: Resolution gives actual pixel dimensions, such as 1,920 × 1,080. Aspect ratio gives their relative proportions, such as 16:9.
  • Rounding too early: Keep full precision while calculating, then round a decimal display or a required pixel dimension at the end.
  • Assuming every display uses square pixels: The simple width-to-height calculation describes the supplied dimensions. Some video systems can use non-square pixels, so displayed proportions may also depend on pixel aspect ratio.

Aspect ratio alone cannot tell you image sharpness, file size, or whether a picture will fit a particular frame without cropping. A mismatch is usually handled by cropping, adding blank space around the image, or stretching it; stretching changes the proportions of the content. Choose the method based on whether preserving the full image or filling the frame matters more.

Frequently Asked Questions

How do I calculate aspect ratio from width and height?
Divide both whole-number dimensions by their greatest common divisor and write the results as width:height. For a decimal comparison, divide width by height.

What is the aspect ratio of 1920 × 1080?
It is 16:9. Both dimensions divide evenly by 120: 1,920 ÷ 120 = 16 and 1,080 ÷ 120 = 9.

Does aspect ratio have a unit?
No. It is a proportion, so matching units cancel. You can calculate it from pixels, inches, or metric measurements, provided width and height use the same unit.

How do I find height from aspect ratio and width?
For a width:height ratio of a:b, calculate height as width × b ÷ a. For a 16:9 ratio and a width of 1,280 pixels, the height is 720 pixels.

Is 16:9 the same as 1.78:1?
They are approximately the same. Dividing 16 by 9 gives 1.777…, which rounds to 1.78. The fraction 16:9 is the exact ratio; 1.78:1 is rounded.

Related

Formula used
in w | Width | px | 1920 | 0
in h | Height | px | 1080 | 0
out ratio | Aspect ratio (width:height) | - | w / gcd(w,h) | 0

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.