Skip to content

Aspect ratio calculator

Solve any missing width or height for a ratio, simplify W:H with the GCD, read the megapixels and preview the shape. Presets for 16:9, 4:5 and 9:16.

  • Runs in your browser
  • Nothing you enter is sent
  • Free, no account
Aspect ratio
Type a ratio and one dimension — the other is solved as you type.
Ratio
Dimensions in pixels

Whichever box you type in is treated as fixed; the other one is recalculated from the ratio.

Result
Width
1,280
pixels
Height
720
pixels
Simplified ratio
16:9
exact integer ratio
Decimal ratio
1.7778
width ÷ height
Megapixels
0.92
width × height ÷ 1,000,000
Orientation
Landscape
1.778 : 1
height = width × (ratio height ÷ ratio width)
       = 1,280 × (9 ÷ 16)
       = 1,280 × 0.562500
       = 720 px
The same proportion, rearranged — this is all an aspect-ratio calculator ever does.
1280 : 720
  ÷ 80 both sides
= 16:9
Greatest common divisor of 1280 and 720 is 80.
Shape preview

16:9 · 1,280 × 720 px

16:9 — HD and 4K video, most monitors and TVs

1,280 × 720 (16:9)

The whole calculation, once

An aspect ratio is a single number: width divided by height. Everything a ratio calculator does is one of two rearrangements of that.

ratio  = width ÷ height
height = width ÷ ratio
width  = height × ratio

Type into the width box and the height is solved; type into the height box and the width is solved. The page prints the substituted arithmetic with your own numbers, so you can check it by hand rather than trusting the box.

Simplifying a ratio

To reduce 1920 × 1080 to 16:9, divide both sides by their greatest common divisor. Euclid's algorithm finds it in a few steps: gcd(1920, 1080) → gcd(1080, 840) → gcd(840, 240) → gcd(240, 120) → gcd(120, 0) = 120. Then 1920 ÷ 120 = 16 and 1080 ÷ 120 = 9. Dimensions that do not reduce neatly — 1366 × 768, for instance, which is 683:384 — are reported as a decimal ratio instead, because a huge integer pair tells you nothing useful.

Ratios worth knowing

RatioDecimalWhere it is used
16:91.778HD and 4K video, most monitors and televisions, YouTube
9:160.563Stories, Reels, Shorts, TikTok
4:50.800Instagram portrait — the tallest allowed in the feed
1:11.000Square posts, avatars, album art
4:31.333Classic television, iPad, Micro Four Thirds, most projectors
3:21.50035 mm film and almost every DSLR and mirrorless sensor
64:27 (“21:9”)2.370Ultrawide monitors — 2560 × 1080 and 3440 × 1440
2.39:12.390Anamorphic cinema scope
√2:11.414ISO paper: A0 through A6, which is why halving A4 gives A5

Why “21:9” is not 21:9

A literal 21:9 is 2.333. No ultrawide panel is that shape: 2560 × 1080 and 3440 × 1440 both reduce to 64:27, which is 2.370. The name stuck because it sits neatly next to “16:9” on a spec sheet. The preset button on this page uses the real 64:27, so the dimensions it produces actually match hardware. The same caution applies to “18:9” phones (really 2:1) and “19.5:9” (2.167).

Common resolutions at a glance

ResolutionRatioMegapixels
1280 × 72016:90.92
1920 × 108016:92.07
2560 × 144016:93.69
3840 × 216016:98.29
1080 × 13504:51.46
1080 × 19209:162.07
1024 × 7684:30.79
3440 × 144064:274.95

Letterboxing, pillarboxing and cropping

When source and destination ratios differ you have three choices and no fourth. Fit keeps everything and adds bars — horizontal bars (letterboxing) when the source is wider, vertical bars (pillarboxing) when it is taller. Fill covers the frame and crops the overflow. Stretch distorts, and is essentially never right. Work out how much you would lose before deciding: fitting 16:9 video into a 9:16 frame means bars over 68% of the height, which is why vertical video is usually reshot rather than converted.

Megapixels

Megapixels are simply width × height ÷ 1,000,000, and they scale with the square of the linear size. Doubling both dimensions quadruples the pixel count — and roughly quadruples the memory a browser needs to hold the image, which is worth remembering before building a collage from twenty 24-megapixel photos.

Related tools

Screen Size Calculator turns a diagonal into real width and height, Resize Image applies the dimensions you calculated here, Crop Video has the social ratios as presets, and Combine Images is useful once you know the output shape you want.

Questions

How do I keep an image proportional when resizing?

Enter the original width and height as the ratio, then type the new width — the height is solved as you type from newHeight = newWidth × ratioHeight ÷ ratioWidth. The page shows that arithmetic with your own numbers substituted.

What ratio is 1920 × 1080?

16:9. The greatest common divisor of 1920 and 1080 is 120, and dividing both by it gives 16:9. Type any pair of dimensions into the width and height boxes and the simplified ratio appears immediately.

Why is 21:9 shown as 64:27?

Because “21:9” is marketing shorthand. Real ultrawide panels are 2560 × 1080 or 3440 × 1440, both of which reduce to 64:27 — that is 2.370:1, not the 2.333:1 that a literal 21:9 would give.

What are the common social media ratios?

1:1 for a square feed post, 4:5 for the tallest allowed in-feed portrait, 9:16 for Stories, Reels, Shorts and TikTok, and 16:9 for YouTube and most landscape video. All of them are preset buttons on this page.

Does a ratio have to use whole numbers?

No. Cinema scope is 2.39:1 and ISO paper is √2:1 (about 1.414:1). Type decimals into the ratio boxes and the calculator will report a decimal ratio rather than forcing a misleading integer pair.