Aspect Ratio Calculator (Resolution, Letterbox, Named Ratios)

Aspect Ratio Calculator (Resolution, Letterbox, Named Ratios)

Reduce any resolution to lowest terms with a real greatest common divisor, find the nearest named ratio with its error, and size the letterbox bars. 1366×768 is 683:384 — and “21:9” is three different shapes, none of them 21:9.

Resolution to ratio, and the bars in between

Pixels → exact ratio, nearest name, bar sizes
Whole pixels. The default is 1366×768, the commonest laptop panel ever made and not quite 16:9.
Every entry is an exact integer pair. Three of them are sold as “21:9” and none of them is 21:9.
Only read when the dropdown is set to “My own ratio”. The default is the marketing 21:9, so you can see what it is not.
A geometry, not a circuit: a picture of one aspect ratio fitted inside a screen of another, with the wasted band dimensioned. One thing is deliberately NOT to scale and it is worth saying so plainly — the outer frame is drawn at a fixed shape rather than at your screen's shape, because the engine draws from fixed points and enumerating every pair of ratios would take thousands of cases. Everything inside the frame IS to scale: the inner rectangle's proportions and the bar's share of the frame are exactly the fractions your own two ratios give, which is what the calculation is about. Wider content than the screen fits to the width and leaves bars at the top and bottom — letterboxing. Narrower content fits to the height and leaves bars at the sides — pillarboxing. The numbers beneath are in pixels of your actual screen. When the two ratios match, the inner rectangle coincides with the frame and both bars vanish.
1.7786Example

1366 × 768 — the commonest laptop panel ever made

Advertisement

A fraction, reduced, and a rectangle fitted inside another

r = w / h  ·  lowest terms = w/gcd(w,h) : h/gcd(w,h)
letterbox bar = (hscreen − wscreen/rcontent) / 2  ·  pillarbox bar = (wscreen − hscreen × rcontent) / 2
gcd
greatest common divisor, computed by an unrolled Euclidean algorithm — 26 steps, which Lamé’s theorem proves is enough below 20,000
r
the aspect ratio as a decimal, width divided by height
letterbox
bars at top and bottom, when the content is WIDER than the screen
pillarbox
bars at left and right, when the content is NARROWER than the screen

Worked example

1366 × 768 — the commonest laptop panel ever made
Euclid on 1366 and 768: 1366 = 1×768 + 598, 768 = 1×598 + 170, 598 = 3×170 + 88, 170 = 1×88 + 82, 88 = 1×82 + 6, 82 = 13×6 + 4, 6 = 1×4 + 2, 4 = 2×2 + 0. The divisor is 2
So the ratio in lowest terms is 683:384, and as a decimal 1.778646
The nearest named ratio is 16:9 = 1.777778, so this panel is 0.0488% wider than true 16:9
The reason: 768 × 16/9 = 1365.33 pixels. Panels come in whole pixels, so the maker rounded up to 1366 and kept calling it 16:9
Show 16:9 content on it and you get pillarbox bars of 0.33 pixels each side — under a pixel, so in practice the scaler absorbs it. The arithmetic still says the panel is not the shape on the box

Named ratios, exactly

Name people useAs an integer pairIn lowest termsAs a decimalWhere it comes from
1:11:1—1.000000square; Instagram’s original crop
5:45:4—1.2500001280×1024, the old LCD panel size
4:34:3—1.333333SDTV, and every computer monitor until about 2004
3:23:2—1.50000035 mm still film, and Surface / Chromebook panels
16:1016:108:51.6000001920×1200; 8:5, back in favour on laptops
16:916:9—1.777778HDTV and UHD, 1920×1080 and 3840×2160
1.85:137:20—1.850000DCI Flat; 1998×1080 in the 2K container
1.90:1 (IMAX digital)4096:2160256:1351.896296the full DCI 4K container
64:27 (“21:9”)64:27—2.3703702560×1080 and 5120×2160; (4:3) cubed
2.39:1 (DCI Scope)1024:429—2.3869462048×858 in the 2K container
43:18 (“21:9”)43:18—2.3888893440×1440, the commonest 34-inch ultrawide
12:5 (“21:9”)12:5—2.4000003840×1600, and 2.40:1 “modern scope”
32:932:9—3.5555565120×1440, two 16:9 screens side by side
4:54:5—0.800000the tall Instagram crop
2:32:3—0.66666735 mm film turned upright
9:169:16—0.562500vertical video: Reels, Shorts, TikTok
Two of these names are not in lowest terms: “16:10” is 8:5 and IMAX digital’s 4096:2160 is 256:135. And the “21:9” problem is worse than a reduction — it is a marketing term covering three genuinely different shapes. Wikipedia is explicit: “21:9 is a consumer electronics marketing term to describe the ultra-widescreen aspect ratio of 64:27”, which is 2.3704. But a 3440×1440 monitor is 43:18, which is 2.3889, and a 3840×1600 one is 12:5, which is 2.4 exactly. True 21:9 would be 2.3333 and nothing is sold at it. 64:27 is at least principled: it is (4:3)³, the geometric continuation of 4:3 and 16:9 = (4:3)².

“2K” and “4K” are not resolutions

FormatPixelsRatio in lowest termsDecimalMegapixelsNote
DCI 2K container2048×1080256:1351.896302.212the cinema “2K”, from the DCI spec
DCI 2K Flat (1.85:1)1998×108037:201.850002.158the active image inside it
DCI 2K Scope (“2.39:1”)2048×8581024:4292.386951.757which is really 2.38695:1
Full HD / 1080p1920×108016:91.777782.074NOT 2K in the cinema sense — it is 128 pixels narrower than the DCI 2K container
DCI 4K container4096×2160256:1351.896308.847the cinema “4K”. Also the IMAX digital 1.90:1 frame
UHD / consumer “4K”3840×216016:91.777788.294256 pixels narrower than DCI 4K, and 16:9 rather than 1.896:1
DCI 4K Scope4096×17161024:4292.386957.029the widescreen active image in the 4K container
8K UHD7680×432016:91.7777833.17816:9 again, four times the pixels of UHD
The DCI Digital Cinema System Specification requires support for two image containers, “either 4096 x 2160 or 2048 x 1080”. Those are what 4K and 2K mean in a cinema, and neither is a shape you will find on a television. Consumer UHD is 3840×2160 — 1.0667 times narrower than DCI 4K — and it is 16:9, while DCI 4K is 1.8963:1. Calling UHD “4K” is a marketing rounding of 3840 up to “about four thousand”; calling 1080p “2K” is the same rounding applied to 1920, and it is a different shape again from DCI 2K. Both terms name ranges of horizontal pixel counts, not specific formats.

A real greatest common divisor, without a loop

An aspect ratio is a fraction, and reducing a fraction is the one operation this calculator’s engine cannot normally do. Reducing 1366:768 to lowest terms needs a greatest common divisor, and a GCD normally needs a loop. This page has no loop available, so it does the honest alternative: it unrolls the Euclidean algorithm 26 times. That is provably enough. Lamé’s theorem says the algorithm’s worst case is a pair of consecutive Fibonacci numbers, and the largest such pair below this page’s 20,000-pixel input ceiling is 17,711 and 10,946, which takes 20 steps; the next Fibonacci number, 28,657, is outside the range. So 26 unrolled steps covers every pair the page will accept, with room to spare, and the answer is an exact reduction rather than a guess. The reduction was checked against every pair of integers below 2000 and against 400,000 random pairs up to 20,000.

So 1366×768 is 683:384, and that is the page’s first useful answer. It is not 16:9. It is 1.778646 against 16:9’s 1.777778 — 0.0488 per cent wider — because 768 × 16/9 is 1365.33 and you cannot have a third of a pixel. The page therefore gives you both: the exact reduction, and the nearest NAMED ratio with the error attached, chosen by smallest logarithmic distance over the sixteen ratios in the table below. Both are true statements and they answer different questions — “what is my panel’s ratio” and “what was it trying to be”.

“21:9” is three different shapes and none of them is 21:9. It is a marketing term. Wikipedia’s article on ultrawide formats puts it plainly: 21:9 “is a consumer electronics marketing term to describe the ultra-widescreen aspect ratio of 64:27”, which is 2.3704. A 2560×1080 or 5120×2160 monitor is genuinely 64:27. A 3440×1440 one — by far the commonest 34-inch ultrawide — is 43:18, 2.3889. A 3840×1600 one is 12:5, exactly 2.4. True 21:9 would be 2.3333 and is not sold. 64:27 is the one with a reason behind it: it is (4:3)³, so 4:3, 16:9 and 64:27 form a geometric sequence, each a third wider than the last.

Letterbox and pillarbox bars are the calculation people actually come for. Put content of one ratio on a screen of another and one pair of edges fits while the other pair leaves black. Wider content than the screen fits to the width and leaves bars top and bottom — letterboxing. Narrower content fits to the height and leaves bars left and right — pillarboxing. The arithmetic is one division either way, and the page gives the bar size in pixels, both bars together, the share of the screen they take, and the picture’s own dimensions. A 2.39:1 film on a 1920×1080 screen gets a picture 804 pixels high and bars of 138 pixels each, wasting 25.5 per cent of the panel — which is why cinema films look small on a television and why ultrawide monitors exist.

“2K” and “4K” are ranges, not resolutions. The DCI Digital Cinema System Specification defines two containers, 2048×1080 and 4096×2160. Those are the cinema’s 2K and 4K. Consumer UHD is 3840×2160, which is narrower than DCI 4K by 256 pixels and a different shape — 16:9 rather than 1.896:1. And 1080p is not 2K in the cinema sense either: 1920 is 128 pixels short of the DCI 2K container. Both terms are rounded descriptions of a horizontal pixel count, which is why they cover several formats each.

Where this page stops. It works in pixels and ratios. For pixels to a physical print size at a given DPI, the DPI and print size calculator owns that conversion. For a screen’s physical width, height, area and pixel density from its diagonal — and for how far away to sit — see the screen size and viewing distance calculator. For why the same number of bytes is two different numbers of gigabytes, the kB vs KiB converter. And for the other place a ratio has to be reduced to a recognisable fraction, the inch fraction converter.

Advertisement

Frequently asked questions

What aspect ratio is 1366×768?

Exactly 683:384, which is 1.77865. It is sold as 16:9 and it is 0.049 per cent wider than true 16:9, because 768 × 16/9 is 1365.33 pixels and panels come in whole pixels. The page gives the exact reduction and the nearest named ratio with its error, because those are two different questions.

Is 21:9 a real aspect ratio?

No. It is a marketing name for three different shapes: 64:27 (2.3704) on 2560×1080 and 5120×2160 panels, 43:18 (2.3889) on the common 3440×1440, and 12:5 (2.4 exactly) on 3840×1600. Literal 21:9 is 2.3333 and nothing is sold at it. Enter your actual pixel count and the page will tell you which of the three you have.

How do I work out letterbox bar height?

If the content is wider than the screen, the picture fits the screen width and its height is screen width ÷ content ratio; each bar is half the difference from the screen height. A 2.39:1 film on a 1920×1080 panel gives a picture 804.4 pixels tall, so each bar is 137.8 pixels and the bars take 25.5 per cent of the screen. If the content is narrower you get pillarbox bars at the sides instead, by the same arithmetic turned sideways.

Is 4K the same as UHD?

No. DCI 4K, the cinema container, is 4096×2160. Consumer UHD is 3840×2160 — 256 pixels narrower, and 16:9 rather than 1.896:1. “4K” in a shop means UHD. “4K” in a cinema means the DCI container. Both are rounded descriptions of “about four thousand pixels wide”, which is why the term covers more than one format.

Is 1080p the same as 2K?

Not in the cinema sense. The DCI 2K container is 2048×1080 and 1920×1080 is 128 pixels narrower. The two are often used interchangeably in consumer marketing, which is defensible as shorthand and wrong as a specification — a 2K DCP will not fit a 1920-wide frame without cropping or scaling.

Does this page really compute the greatest common divisor?

Yes, exactly — it does not match against a table of ratios and hope. The Euclidean algorithm is unrolled 26 times, which Lamé’s theorem shows is more than enough for any pair of integers below 20,000: the worst case is consecutive Fibonacci numbers, and 17,711 with 10,946 takes 20 steps. The reduction was verified against every pair below 2000 and 400,000 random pairs up to the ceiling. The nearest-named-ratio match is a separate, additional answer.

What is the widest aspect ratio in normal use?

32:9 (3.5556) on “super ultrawide” monitors like 5120×1440, which is two 16:9 screens side by side. In cinema the widest common release format is anamorphic scope at about 2.39:1 — the DCI container puts it at 2048:858, which is 2.3869. Ultra Panavision 70 reached 2.76:1 in the 1960s and is not in use.

Why does 16:10 appear as 8:5?

Because 8:5 is the same ratio in lowest terms, and 16:10 is not. The page prints both: the name people search for and the reduced pair. The same is true of IMAX digital’s 4096:2160, which reduces to 256:135. Reducing does not change the shape; it just makes it comparable with other reduced pairs.

Related calculators

References

  1. Wikipedia, Ultrawide formats and 21:9 aspect ratio. “21:9 is a consumer electronics (CE) marketing term to describe the ultra-widescreen aspect ratio of 64:27”, and it covers 64:27 (2.370), 43:18 (2.389) and 12:5 (2.400) — three different shapes sold under one name. 64:27 is (4:3) cubed, which this page checks rather than quotes, and it is the geometric continuation of 4:3 and 16:9.
  2. Digital Cinema Initiatives, LLC. Digital Cinema System Specification (documents.dcimovies.com). Fetched. Requires support for two image containers, “either 4096 x 2160 or 2048 x 1080”, which is what “4K” and “2K” mean in a cinema and why neither is a resolution you will find on a television. Consumer UHD is 3840×2160 — 256 pixels narrower than DCI 4K.
  3. ANSI PH22.106-1971, the anamorphic projector aperture issued in June 1971, via the Wikipedia article on anamorphic format. It specified a projector aperture 0.700 inches high, which after unsqueezing gives “c. 2.397:1” and superseded the 1957 2.35:1 standard. The change was made to hide splices. The standard itself was not fetched; what is verified here is the arithmetic of the DCI Scope container, 2048×858, which is 2.38695:1.
  4. Recommendation ITU-R BT.2022 (08/2012), General viewing conditions for subjective assessment of quality of SDTV and HDTV television pictures on flat panel displays. Fetched. Its table gives 1920×1080 an optimal horizontal viewing angle of 31° at 3.2 picture heights, and 720×576 13° at 6 picture heights. It defines the design viewing distance as the distance at which adjacent pixels subtend one minute of arc. Both rows are reproduced here from that criterion alone, to within a quarter of a degree — provided the 720×576 row is taken at its 4:3 DISPLAY ratio rather than the 5:4 of its pixel array.