Aspect Ratio Calculator
Calculate the simplified aspect ratio of a width and height, and scale to any target width.
Enter your values to calculate your result.
About this calculator
The Aspect Ratio Calculator reduces a width and height to their simplest ratio, such as 16:9, and can find the height that keeps the same proportions at a new width.
Use it to resize images or video without stretching them, or to check whether two screen sizes share a ratio.
What each field means
- Width (px)
The width in pixels.
With the height it defines the ratio.
1 to 100,000; decimals are rounded.
- Height (px)
The height in pixels.
With the width it defines the ratio.
1 to 100,000; decimals are rounded.
- Target Width (optional, 0 to skip)
An optional new width you want to scale to. Leave 0 to skip.
It is used to compute the matching height.
0 to 100,000.
How it is calculated
- Find the greatest common divisor (GCD) of width and height.
- Divide both by the GCD to get the simplest ratio.
- Decimal ratio = width ÷ height.
- Height at a new width = new width × height ÷ width.
Simplified Ratio = Width ÷ GCD : Height ÷ GCD Calculated Height = Target Width × (Height ÷ Width)
The greatest common divisor (GCD) of the width and height is used to reduce both to the smallest whole-number ratio that represents the same proportions (e.g. 1920×1080 simplifies to 16:9). If a target width is entered, the matching height that preserves the same proportions is also calculated.
Symbols used
- GCD
- the largest whole number that divides both dimensions
Assumptions
- Width and height are whole pixel counts.
- The proportions are kept exactly.
- The scaled height may be a decimal that you need to round.
Example
1920×1080 divides by their greatest common divisor, 120, to give 16:9, which is a decimal ratio of 1.7778. Scaling to a target width of 1280 gives a height of 1280 × 1080 ÷ 1920 = 720.
Step by step
- Inputs: 1920 × 1080 and a target width of 1280.
- GCD of 1920 and 1080 is 120, so the ratio is 16:9.
- Decimal ratio: 1920 ÷ 1080 = 1.7778.
- Height at width 1280: 1280 × 1080 ÷ 1920 = 720.
Reading your result
- Aspect Ratio (Decimal)
- Width divided by height.
- Ratio Width
- The width part of the simplified ratio.
- Ratio Height
- The height part of the simplified ratio.
- Calculated Height for Target Width
- The height that keeps the same proportions at the target width.
What you can conclude
- The simplest form of a ratio.
- The size that preserves proportions.
What you cannot conclude
- Which standard a size belongs to.
- Whether cropping or padding is better for your layout.
Limitations
- Unusual sizes may not simplify to small numbers.
- Rounded pixels can slightly change the ratio.
Frequently Asked Questions
What is the GCD and why does it matter here?
The greatest common divisor is the largest number that divides both the width and height evenly. Dividing both by it gives the simplest equivalent ratio, like reducing a fraction.
Why does my ratio not look like 16:9?
Many sizes are only close to a standard ratio. If the GCD is small the simplified numbers stay large, for example 1366×768 reduces to 683:384, which is nearly but not exactly 16:9.
Can I scale the height from a target height instead?
Yes, the same idea works the other way: new width = target height × width ÷ height. This tool takes a target width, so swap the two values if you know the height you want.

