Aspect Ratio Calculator
Image/screen aspect ratio.
Formula
W/GCD : H/GCD
Example
1920×1080 → 16:9.
Embed this calculator on your site
Add this free calculator to your own website with one line of code. The embedded version is responsive, ad-free, and includes a small attribution link back to CalcNest AI.
<iframe src="https://calcnestai.com/embed/aspect-ratio-calculator.html" width="100%" height="700" frameborder="0" style="border: 1px solid #e5e5e5; border-radius: 12px; max-width: 720px;" loading="lazy" title="Aspect Ratio Calculator — Free Tool by CalcNest AI"></iframe>
Understanding the Aspect Ratio Calculator
An aspect ratio calculator reduces width and height to their simplest whole-number ratio using the greatest common divisor. It also gives the decimal, which is often the more useful figure since many standard ratios do not reduce to memorable whole numbers.
How it actually works
Enter width and height in pixels. The calculator finds their greatest common divisor using the Euclidean algorithm, divides both by it, and also reports the decimal ratio. A resolution of 1920 by 1080 has a greatest common divisor of 120, giving 16:9 and a decimal of 1.7778.
| Ratio | Decimal | Typical use |
|---|---|---|
| 16:9 | 1.778 | HD and 4K video, most displays |
| 4:3 | 1.333 | Older displays, some cameras |
| 21:9 | 2.333 | Ultrawide monitors, cinema |
| 1:1 | 1.000 | Square social formats |
The deeper context most people miss
The 21:9 label is a marketing approximation rather than a true ratio. Common ultrawide resolutions including 2560 by 1080 and 3440 by 1440 reduce to 64:27 and 43:18, with decimals of 2.370 and 2.389 respectively, neither of which is exactly 2.333. Checking the decimal is more reliable than trusting a marketed ratio.
How the Euclidean algorithm finds the ratio
Reducing a ratio to lowest terms requires the greatest common divisor of the two numbers, and the Euclidean algorithm computes it efficiently. The method dates to Euclid's Elements around 300 BC and remains one of the oldest algorithms still in everyday use. It works by repeatedly replacing the larger number with the remainder of dividing it by the smaller, until the remainder is zero, at which point the last non-zero value is the greatest common divisor. For 1920 and 1080: 1920 divided by 1080 leaves 840, then 1080 divided by 840 leaves 240, then 840 divided by 240 leaves 120, then 240 divided by 120 leaves zero, so the answer is 120. Dividing both original numbers by 120 gives 16 and 9. The algorithm is remarkably efficient, requiring a number of steps proportional to the logarithm of the smaller input, which means even very large numbers resolve in a handful of iterations. Its efficiency and simplicity are why it appears throughout computing, including in cryptography where the extended version computes modular inverses used in RSA key generation. The practical consequence for aspect ratios is that any resolution reduces cleanly, though not always to a memorable pair: 1366 by 768, a common older laptop resolution, reduces to 683:384, which is why it is usually described as approximately 16:9 despite having a decimal of 1.779 rather than 1.778.
A worked example: scaling and letterboxing
Knowing the ratio lets you compute a missing dimension. To fit a 16:9 video into a frame 1280 pixels wide, height is 1280 divided by 1.7778, which is 720. To fit the same content into a 1200 pixel height, width is 1200 times 1.7778, which is 2133. Mismatches between content ratio and display ratio produce one of three outcomes. Letterboxing adds black bars above and below, which happens when content is wider than the display, such as 21:9 cinema content on a 16:9 screen. Pillarboxing adds bars at the sides, which happens when content is narrower, such as 4:3 archive footage on a widescreen display. Stretching distorts the image to fill the frame, which is visually obvious once you know to look for it and remains distressingly common on televisions where someone has selected a fill mode. Cropping fills the frame by discarding parts of the image, which preserves proportions at the cost of content, and is what happens when a 16:9 video is displayed in a 9:16 vertical format. The last of these has become the dominant problem in social video, where content shot horizontally is consumed vertically, and it is why filming with the eventual format in mind matters more than it used to.
Deciding which ratio to use for what
Format choice depends on where content will be seen. Widescreen 16:9 remains the default for most video, being the standard for broadcast, streaming, and virtually all televisions and monitors. Vertical 9:16 dominates mobile-first platforms, and content produced for those platforms should be shot vertically rather than cropped from horizontal footage, since cropping loses the sides of every frame and typically the composition with it. Square 1:1 works across contexts and was the historical social default, still useful where content may appear in mixed feeds. Cinema uses wider ratios, with 2.39:1 being the modern anamorphic standard and 1.85:1 the flat standard, both of which letterbox on a 16:9 display. Photography commonly uses 3:2 from 35mm film heritage, 4:3 from medium format and most phone cameras, and increasingly 16:9 for video-oriented work. For web and print, the practical consideration is often that content will be displayed at multiple ratios, which argues for composing with a safe area in mind so that cropping to different formats does not destroy the composition. Many platforms publish their exact expected dimensions, and using those rather than approximating avoids the platform doing its own crop unpredictably.
Pixel aspect ratio, and why some resolutions look wrong
There is a second aspect ratio most people never encounter and which explains several confusing legacy formats: pixel aspect ratio, meaning whether individual pixels are square. Modern displays and formats use square pixels, so the display aspect ratio equals the pixel dimensions ratio. Several older standards did not. Standard definition digital video used 720 by 480 in NTSC regions and 720 by 576 in PAL, and neither of those pixel ratios is 4:3, because the pixels themselves were non-square, being taller than wide in NTSC and wider than tall in PAL, so both displayed correctly as 4:3 despite different pixel counts. Anamorphic widescreen encoded 16:9 content into the same pixel grid using even wider pixels. This is why converting legacy footage without accounting for pixel aspect ratio produces content that looks horizontally squashed or stretched, and why video editing software carries pixel aspect ratio settings that confuse people encountering them for the first time. Cinema anamorphic lenses do the same thing optically, squeezing a wide image onto a standard film frame and unsqueezing it in projection, which is where the characteristic lens flares and bokeh of anamorphic cinematography come from. For anyone working with archive material, checking pixel aspect ratio before assuming a resolution implies a display shape avoids a great deal of confusion.
Variations: resolution versus ratio, and common formats
Resolution and aspect ratio are distinct: 1920 by 1080, 1280 by 720, and 3840 by 2160 all share 16:9 while differing enormously in detail. Ratio determines shape, resolution determines how much information fills that shape. Standard resolutions at 16:9 include 1280 by 720 as HD, 1920 by 1080 as Full HD, 2560 by 1440 as QHD, and 3840 by 2160 as 4K UHD, with true DCI 4K at 4096 by 2160 being slightly wider at 1.9:1. Ultrawide monitors typically use 2560 by 1080 or 3440 by 1440, and super ultrawide 3840 by 1080 or 5120 by 1440 at roughly 32:9. Mobile displays have drifted taller than 16:9, with many phones now around 19.5:9 or 20:9, which is why 16:9 video letterboxes slightly on modern phones held horizontally. Print uses physical dimensions rather than pixels, with common photo sizes including 4 by 6 at 3:2 and 8 by 10 at 4:5, which is why cropping is usually required when printing camera images at standard sizes. Paper sizes in the ISO A series use a ratio of the square root of two, approximately 1.414, chosen so that halving the long side preserves the ratio.
Working with aspect ratios
Check the decimal rather than trusting a marketed ratio, since 21:9 ultrawide displays are commonly 2.370 or 2.389 rather than 2.333 and the label is an approximation. Distinguish ratio from resolution, since 1280 by 720 and 3840 by 2160 share the same shape while differing enormously in detail. Shoot in the format the content will be consumed in, particularly for vertical platforms, since cropping horizontal footage to vertical discards the sides of every frame along with the composition. Compose with a safe area when content will appear at multiple ratios, so cropping does not destroy the framing. Use platforms' published dimensions rather than approximating, which avoids unpredictable automatic cropping. Watch for stretching rather than letterboxing on displays, which distorts the image and remains common where a fill mode has been selected. And check pixel aspect ratio when working with standard definition or anamorphic archive material, since non-square pixels mean the resolution does not imply the display shape.
What people get wrong
- Assuming a marketed ratio is exact, when 21:9 ultrawide resolutions actually reduce to 64:27 and 43:18 with decimals of 2.370 and 2.389.
- Confusing aspect ratio with resolution, when 1280 by 720 and 3840 by 2160 share the same 16:9 shape while carrying nine times the pixel count.
- Cropping horizontal footage to vertical for mobile platforms, which discards the sides of every frame and usually the composition along with them.
- Ignoring pixel aspect ratio on legacy standard definition footage, where non-square pixels mean 720 by 480 displays as 4:3 despite that pixel ratio being 3:2.
Where the math comes from
The greatest common divisor of width and height is found using the Euclidean algorithm, repeatedly replacing the larger value with the remainder of dividing it by the smaller until the remainder is zero. Dividing both dimensions by that divisor gives the ratio in lowest terms. The decimal ratio is simply width divided by height, and is often more useful since many standard ratios do not reduce to memorable whole numbers.
Questions and answers
DPI vs PPI?
DPI (dots per inch) is print resolution. PPI (pixels per inch) is screen/file resolution. Often used interchangeably in casual usage.
What resolution for web vs print?
Web: 72-96 PPI is typical; high-DPI displays may serve 2x. Print: 300 DPI for photos, 600+ for line art and small text.
RGB or CMYK?
RGB for screens (additive color, light). CMYK for print (subtractive, inks). Color conversion between them is lossy; design in the destination color space when possible.
What is bleed?
Print area extending past the trim line so cut artwork has no white edges from imperfect cutting. Standard bleed is 0.125 inch (3mm) all around.
How big should source images be?
Always work at the largest size and resolution you might need, then export down. Going up rarely works.
How is the aspect ratio calculated?
By finding the greatest common divisor of width and height using the Euclidean algorithm, then dividing both by it. For 1920 by 1080 the divisor is 120, giving 16:9. The algorithm dates to Euclid around 300 BC and resolves even very large numbers in a handful of steps.
Is 21:9 actually 21:9?
Usually not. Common ultrawide resolutions of 2560 by 1080 and 3440 by 1440 reduce to 64:27 and 43:18, with decimals of 2.370 and 2.389 rather than the 2.333 that 21:9 implies. The label is a marketing approximation, and checking the decimal is more reliable.
What's the difference between aspect ratio and resolution?
Aspect ratio is the shape and resolution is how much detail fills it. 1280 by 720, 1920 by 1080, and 3840 by 2160 all share 16:9 while carrying very different pixel counts, so two displays can have identical shape and vastly different sharpness.
Why does my video have black bars?
Because the content ratio differs from the display ratio. Letterboxing adds bars above and below when content is wider than the display, such as cinema content on a 16:9 screen. Pillarboxing adds side bars when content is narrower, such as 4:3 archive footage on a widescreen display.
Should I shoot vertically for social media?
For mobile-first platforms, yes, rather than cropping horizontal footage afterwards. Cropping 16:9 to 9:16 discards the sides of every frame and usually the composition with it. Filming with the eventual format in mind is considerably better than fixing it in post.
How do I calculate a missing dimension?
Multiply or divide by the decimal ratio. For 16:9 with a decimal of 1.7778, a width of 1280 gives a height of 1280 divided by 1.7778, which is 720. A height of 1200 gives a width of 1200 times 1.7778, which is 2133.
What is pixel aspect ratio?
Whether individual pixels are square. Modern formats use square pixels so the pixel dimensions ratio equals the display ratio, but standard definition video did not: 720 by 480 displays as 4:3 because its pixels are taller than wide. Ignoring this makes legacy footage look squashed or stretched.
Related calculators
GSM Paper Weight · Pixels to Inches · DPI Image · Screen DPI · Screen Time