Aspect ratio calculator

Enter a width and a height to get the exact aspect ratio, or a ratio and one side to get the missing size. 1080 x 1350 px reduces to 4:5, and 7:9 at 3500 px high is 2722 px wide.

Enter the pixel width and height of any image or screen. The ratio is reduced exactly, never rounded.

Aspect ratio of 1280 x 720 px

16:9

1280 x 720 px is 16:9, or 1.78:1, landscape.

Decimal
1.78:1
Width / height
1.7778
Orientation
Landscape
GCD
80

1280 mod 720 = 560, 720 mod 560 = 160, 560 mod 160 = 80, 160 mod 80 = 0, so gcd = 80. 1280 / 80 = 16 and 720 / 80 = 9.

Nearest standard ratio:16:9exact match (0%)

How to calculate an aspect ratio

An aspect ratio is the width compared with the height, written as two whole numbers with nothing left to cancel. To get there, divide both sides by their greatest common divisor (GCD), the largest number that divides both without a remainder:

ratio = (W / gcd(W, H)) : (H / gcd(W, H))
decimal = W / H, written as decimal:1

Euclid's method finds the GCD: divide the larger side by the smaller, keep the remainder, and repeat with the smaller side and that remainder until the remainder is 0. The last number you divided by is the GCD.

Example 1: 1080 x 1350 px

1350 mod 1080 = 270, 1080 mod 270 = 0, so gcd(1080, 1350) = 270. Then 1080 / 270 = 4 and 1350 / 270 = 5, so the ratio is 4:5. As a decimal that is 1080 / 1350 = 0.8, written 0.80:1, a portrait shape. See the 4:5 ratio guide and the 1080 x 1350 size page.

Example 2: 1220 x 190 px

1220 mod 190 = 80, 190 mod 80 = 30, 80 mod 30 = 20, 30 mod 20 = 10, 20 mod 10 = 0, so gcd(1220, 190) = 10. Dividing gives 122:19, which cannot be reduced further. The decimal is 1220 / 190 = 6.4211, or 6.42:1. No common standard ratio is close: the nearest, 4:1, is 37.7% off, so use the exact ratio when you crop or resize.

Example 3: 7:9 at 3500 px high

To find a missing side, scale the known side by the ratio. The width is the height times 7 divided by 9: 3500 x 7 / 9 = 2722.22, which rounds to 2722 px. The finished size is 2722 x 3500 px. Because of the rounding its exact ratio is 1361:1750, <0.01% from 7:9, a difference of 0.22 px in width. For a height from a width, swap the two: height = width x H / W.

Common aspect ratios

Each decimal is the width divided by the height. Every example is a real size from the PixelSpec dataset with exactly that shape.

Common aspect ratios with their decimal value, orientation and an example size
RatioDecimalShapeExample size
1:11.00:1square640 x 640, Instagram Profile picture
4:50.80:1portrait1080 x 1350, Instagram Post (portrait)
3:40.75:1portrait1080 x 1440, Instagram Post (portrait), Tallest (3:4)
2:30.67:1portrait1000 x 1500, Pinterest Standard pin
9:160.56:1portrait1080 x 1920, Instagram Story
16:91.78:1landscape3840 x 2160, YouTube Thumbnail
2:12.00:1landscape2160 x 1080, Eventbrite Event banner
3:13.00:1landscape1500 x 500, X (Twitter) Header
4:14.00:1landscape1584 x 396, LinkedIn Personal banner

Frequently asked questions

What ratio is 1220 pixels wide by 190 pixels high?
1220 pixels wide by 190 pixels high is a 122:19 aspect ratio, or 6.42:1 as a decimal. The greatest common divisor of 1220 and 190 is 10, and dividing both sides by it gives 122 and 19. No common standard ratio is close: the nearest, 4:1, is 37.7% off, so use the exact ratio when you crop or resize.
For aspect ratio 7:9 and height 3500 pixels, what is the width?
The width is 2722 pixels. Multiply the height by 7 and divide by 9: 3500 x 7 / 9 = 2722.22, which rounds to 2722 px because an image file can only store whole pixels. The full size is 2722 x 3500 px.
How do I calculate the aspect ratio from width and height?
Find the greatest common divisor (GCD) of the width and the height, then divide both by it. For 1920 x 1080 the GCD is 120, so the ratio is 16:9. For the decimal form, divide the width by the height: 1920 / 1080 = 1.7778, written 1.78:1.
How do I determine the aspect ratio of an image in pixels?
Read its pixel dimensions first. On Windows, right-click the file, open Properties and look under Details; on a Mac, use Get Info or open the image in Preview and show the Inspector. Any image editor shows the same two numbers. Then enter the width and height in the calculator above, which reduces them to the exact ratio, or divide both by their greatest common divisor yourself.
How do I find the missing width or height for a ratio?
Multiply the side you know by the matching side of the ratio and divide by the other one: width = height x W / H, and height = width x H / W. For 16:9 at 1280 px wide, the height is 1280 x 9 / 16 = 720 px.
What does nearest standard ratio mean?
It is the closest shape from a fixed list of common ratios (1:1, 4:5, 3:4, 2:3, 9:16, 5:4, 4:3, 3:2, 16:10, 16:9, 1.91:1, 2:1, 21:9, 3:1, 4:1), measured as the percentage difference between your width divided by height and the standard one. 1200 x 630, the Facebook feed post size, reduces exactly to 40:21 and sits 0.28% from 1.91:1, the label its spec page uses.

Read the full aspect ratio guide for where each ratio is used, or resize an image to the size you just worked out.