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
1366 × 768 — the commonest laptop panel ever made
A fraction, reduced, and a rectangle fitted inside another
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 use | As an integer pair | In lowest terms | As a decimal | Where it comes from |
|---|---|---|---|---|
| 1:1 | 1:1 | — | 1.000000 | square; Instagram’s original crop |
| 5:4 | 5:4 | — | 1.250000 | 1280×1024, the old LCD panel size |
| 4:3 | 4:3 | — | 1.333333 | SDTV, and every computer monitor until about 2004 |
| 3:2 | 3:2 | — | 1.500000 | 35 mm still film, and Surface / Chromebook panels |
| 16:10 | 16:10 | 8:5 | 1.600000 | 1920×1200; 8:5, back in favour on laptops |
| 16:9 | 16:9 | — | 1.777778 | HDTV and UHD, 1920×1080 and 3840×2160 |
| 1.85:1 | 37:20 | — | 1.850000 | DCI Flat; 1998×1080 in the 2K container |
| 1.90:1 (IMAX digital) | 4096:2160 | 256:135 | 1.896296 | the full DCI 4K container |
| 64:27 (“21:9”) | 64:27 | — | 2.370370 | 2560×1080 and 5120×2160; (4:3) cubed |
| 2.39:1 (DCI Scope) | 1024:429 | — | 2.386946 | 2048×858 in the 2K container |
| 43:18 (“21:9”) | 43:18 | — | 2.388889 | 3440×1440, the commonest 34-inch ultrawide |
| 12:5 (“21:9”) | 12:5 | — | 2.400000 | 3840×1600, and 2.40:1 “modern scope” |
| 32:9 | 32:9 | — | 3.555556 | 5120×1440, two 16:9 screens side by side |
| 4:5 | 4:5 | — | 0.800000 | the tall Instagram crop |
| 2:3 | 2:3 | — | 0.666667 | 35 mm film turned upright |
| 9:16 | 9:16 | — | 0.562500 | vertical video: Reels, Shorts, TikTok |
“2K” and “4K” are not resolutions
| Format | Pixels | Ratio in lowest terms | Decimal | Megapixels | Note |
|---|---|---|---|---|---|
| DCI 2K container | 2048×1080 | 256:135 | 1.89630 | 2.212 | the cinema “2K”, from the DCI spec |
| DCI 2K Flat (1.85:1) | 1998×1080 | 37:20 | 1.85000 | 2.158 | the active image inside it |
| DCI 2K Scope (“2.39:1”) | 2048×858 | 1024:429 | 2.38695 | 1.757 | which is really 2.38695:1 |
| Full HD / 1080p | 1920×1080 | 16:9 | 1.77778 | 2.074 | NOT 2K in the cinema sense — it is 128 pixels narrower than the DCI 2K container |
| DCI 4K container | 4096×2160 | 256:135 | 1.89630 | 8.847 | the cinema “4K”. Also the IMAX digital 1.90:1 frame |
| UHD / consumer “4K” | 3840×2160 | 16:9 | 1.77778 | 8.294 | 256 pixels narrower than DCI 4K, and 16:9 rather than 1.896:1 |
| DCI 4K Scope | 4096×1716 | 1024:429 | 2.38695 | 7.029 | the widescreen active image in the 4K container |
| 8K UHD | 7680×4320 | 16:9 | 1.77778 | 33.178 | 16:9 again, four times the pixels of UHD |
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.
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
- 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.
- 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.
- 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.
- 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.
