Aspect Ratio Calculator: 16:9 vs 9:16 Resolution Formulas

PublishedToolAspect Ratio Calculator

Contents
  1. A History and Specs Guide to Standard Aspect Ratios
  2. The Reduced Ratio Algorithm Using the Greatest Common Divisor (GCD)
  3. Under the Hood: CSS aspect-ratio and the Math of Pixel Resizing
  4. Standard Aspect Ratios and Pixel Resolutions by Platform
  5. 5 Common Mistakes When Adjusting Aspect Ratios
  6. A 5-Step Workflow for Perfect Resolution Resizing
  7. 7 Practical Tips for Working With Screen Ratios
  8. Final Decision Tree: Which Aspect Ratio Should You Choose?
  9. Cheat Sheet of Key Aspect Ratio and Resolution Terms
  10. Frequently Asked Questions

Every screen we look at — phones, monitors, YouTube videos, banner ads, digital cameras — has its own width-to-height relationship: an aspect ratio.

If you're a designer, video editor, or frontend developer, you constantly hit moments where you need the vertical pixel count that matches a width of 1920px in 16:9, or you need to work out exactly what simplified ratio an odd resolution like 2560x1080 really is. Get the ratio math wrong and you end up with ugly black bars (letterboxing) above and below your video, or a distortion disaster where people get stretched wide.

Here's the full rundown: the geometry behind aspect ratios, the formula for finding the reduced ratio using the Euclidean algorithm, and tips for optimizing responsive CSS on the web.

Key Takeaways ① Aspect ratio: the proportional relationship between width and height, usually written as a whole-number ratio of "width : height." ② Reduced ratio formula: find the greatest common divisor (GCD) of the width and height resolution, then divide each side by the GCD to get the simplest whole-number ratio. ③ Pixel resolution conversion: for a target ratio of X : Y, height is Height = Width × (Y / X) and width is Width = Height × (X / Y). ④ Preventing web CLS: setting CSS 'aspect-ratio' on an image tag completely blocks layout shift (Cumulative Layout Shift) while the page loads.

A History and Specs Guide to Standard Aspect Ratios

Screen standards have evolved along with the times and display hardware.

  • 16 : 9 (widescreen, High Definition): This is the global standard for digital video worldwide, long-form YouTube, TV, and PC monitors. 1920x1080 (FHD), 2560x1440 (QHD), and 3840x2160 (4K UHD) are all exactly 16:9.
  • 9 : 16 (vertical short-form): The standard ratio for TikTok, YouTube Shorts, and Instagram Reels, built for portrait phone mode. Typical resolutions are 1080x1920 (FHD) and 720x1280 (HD).
  • 4 : 3 (classic standard): The spec for old CRT TVs and early monitors, and the ancestor of the iPad tablet and Instagram's 4:5 portrait feed photos.
  • 21 : 9 (ultrawide / cinemascope): The theater screen ratio, used in gaming and multitasking monitors like 2560x1080 and 3440x1440 to maximize immersion.
  • 1 : 1 (square): The standard spec (1080x1080) for Instagram's early square feed and social media profile images.

The Reduced Ratio Algorithm Using the Greatest Common Divisor (GCD)

Say an image is 1440 × 900. How do you tell for sure whether that screen is really 16:9 or 16:10?

Computer algorithms use the Euclidean Algorithm to find the greatest common divisor (GCD) of the width and height, then compute the reduced ratio:

  1. 1440  (mod 900) = 540
  2. 900  (mod 540) = 360
  3. 540  (mod 360) = 180
  4. 360  (mod 180) = 0 ➔ GCD = 180
  5. Width: 1440 / 180 = 8, Height: 900 / 180 = 5
  6. So the reduced ratio is 8 : 5, and multiplying top and bottom by 2 gives you the widely used 16 : 10 ratio.
Aspect Ratio Calculator

Free · no install · enter one side's pixels and get the matching resolution and simplified ratio in about a second


Under the Hood: CSS aspect-ratio and the Math of Pixel Resizing

Let's break down the core formulas for handling aspect ratios in responsive web design and video rendering pipelines.

1. The Automatic Width/Height Pixel Scaling Formula

  • When the target aspect ratio is r = Wratio/Hratio:
    • Given width W, height is: H = round(W × Hratio/Wratio)
    • Given height H, width is: W = round(H × Wratio/Hratio)
  • Real-world example (16:9 with a 1280px width): H = 1280 × 9/16 = 720px (yields perfect HD resolution)

2. The Modern CSS aspect-ratio Standard

Web developers used to rely on the padding-top: 56.25% (9/16) hack to hold a video's proportions. Modern browsers support a native property:

.video-container {
  width: 100%;
  aspect-ratio: 16 / 9; /* reserves the exact height before load, hitting CLS 0 */
  object-fit: cover; /* fills without leaving gaps */
}

Standard Aspect Ratios and Pixel Resolutions by Platform

Platform and useStandard ratioRecommended pixel resolution (Width × Height)Notes and cautions
YouTube long-form / TV16 : 91920 × 1080 (FHD) / 3840 × 2160 (4K)The most common widescreen landscape spec
YouTube Shorts / Reels / TikTok9 : 161080 × 1920 (FHD)Full-screen mobile vertical short-form spec
Instagram portrait feed4 : 51080 × 1350Maximizes visible area in the mobile feed
Instagram square feed1 : 11080 × 1080The classic square thumbnail grid
Ultrawide monitor21 : 92560 × 1080 / 3440 × 1440Cinematic films and racing games
YouTube thumbnail16 : 91280 × 720 (2MB max recommended)The key image that drives click-through rate (CTR)

5 Common Mistakes When Adjusting Aspect Ratios

  1. Resizing after unlocking Constrain Proportions: the image squashes horizontally or vertically, distorting faces and logos.
  2. Keeping 16:9 when making Shorts/Reels: uploading landscape video to a vertical screen wastes 70% of the space on black bars.
  3. Creating odd-pixel resolutions: because of macroblock math, the H.264/H.265 video codecs throw encoding errors unless you use even pixels (multiples of 2 on both width and height).
  4. Ignoring letterboxing (top/bottom bars) and pillarboxing (side bars): failing to fix a mismatch between display ratio and video ratio using cropping or a blurred background.
  5. Confusing DPI (PPI) with pixel resolution: for digital screen output, only pixel count (Width/Height) matters. The 72/300 DPI numbers only apply to printing.

A 5-Step Workflow for Perfect Resolution Resizing

  1. Step 1 (check the target platform): pick your target spec — YouTube (16:9), Shorts/Reels (9:16), or Instagram feed (4:5).
  2. Step 2 (pick a preset in our Aspect Ratio Calculator): click the ratio button you want — 16:9, 9:16, 4:3, or 1:1.
  3. Step 3 (enter one side as your reference): type in the resolution number you know, width or height (for example, Width 1080).
  4. Step 4 (see the other side and the reduced ratio in a second): check the auto-calculated height (1920) and confirm it's even.
  5. Step 5 (apply it in your graphics or video tool): plug the calculated resolution into your Photoshop canvas or Premiere Pro sequence settings.

7 Practical Tips for Working With Screen Ratios

  1. Going from 4K to vertical short-form? Crop out 1080x1920: Cut the center 1080x1920 area from a 4K original (3840x2160) and you get a lossless short-form video with no quality drop.
  2. For Instagram feeds, 4:5 (1080x1350) beats 1:1: While someone scrolls, it takes up 25% more of the phone screen, which maximizes how much attention it pulls.
  3. The rule of multiples of 8/16 for safe video codec encoding: Your GPU hardware-accelerated encoding runs fastest when the width and height both divide evenly by 8 or 16.
  4. Using CSS object-fit: cover and contain: When you drop an image with a different ratio into a card UI, cover is the standard move — it fills the space with no gaps.
  5. The blurred padding technique: When you reuse a horizontal video as short-form, scale up and blur the original in the background to create a more polished look.
  6. Euclidean GCD shortcut for reducing ratios: Divide the width and height by 10 or 100 first, then look for the common divisors of what's left — the mental math goes faster.
  7. Bookmark the ratio calculator: When you're building design mockups, keeping the calculator open on a second monitor cuts your work time by 50%.

Final Decision Tree: Which Aspect Ratio Should You Choose?

  • Purpose A (main YouTube videos, full-screen website video, TV broadcast) ➔ 16 : 9 (1920x1080 / 3840x2160)
  • Purpose B (TikTok, Instagram Reels, YouTube Shorts, full-screen mobile ads) ➔ 9 : 16 (1080x1920)
  • Purpose C (Instagram carousel cards and feed posts) ➔ 4 : 5 (1080x1350) or 1 : 1 (1080x1080)
  • Purpose D (ultrawide gaming, panorama banners, cinematic theater-style) ➔ 21 : 9 (3440x1440 / 2560x1080)

Cheat Sheet of Key Aspect Ratio and Resolution Terms

  • Aspect ratio: The relative proportion between width and height.
  • Reduced ratio: The simplest whole-number ratio that can no longer be reduced.
  • Letterbox: The black bars that appear above and below the picture.
  • Pillarbox: The black bars that appear on the left and right when you play 4:3 video on a widescreen display.
  • CLS (Cumulative Layout Shift): The jittery layout shift that happens while a webpage loads because an image's ratio wasn't specified.

Frequently Asked Questions

Why is 1920x1080 a 16:9 ratio?

Because the greatest common divisor (GCD) of 1920 and 1080 is 120, and 1920 ÷ 120 = 16 while 1080 ÷ 120 = 9, which reduces to exactly the 16 : 9 ratio.

What should I do if the vertical resolution comes out as an odd number (like 721px)?

Most video codecs (H.264 and others) throw encoding errors on odd pixel counts, so the standard practice is to round up or down to the nearest even number (720px or 722px).

Is the resolution I enter into the calculator sent to a server?

Not at all. All ratio reduction and pixel math run locally in real time inside the JavaScript engine in your own web browser.

This article was adapted from our Korean original. Read the Korean original

Related articles

  1. Infant Fever Reducer Dosage by Weight and Alternating MedsCalculate a baby's fever reducer dose by weight in mL for acetaminophen, ibuprofen and dexibuprofen syrups, plus age limits and alternating cautions.
  2. Beaufort Wind Scale Chart (0-12) and Wind Speed Unit ConversionLearn what each Beaufort force from 0 to 12 looks like on land and sea, convert m/s, km/h, knots and mph, and see safe wind limits for camping and drones.
  3. Base Conversion Guide: Binary, Octal, Decimal, Hex MathConvert between binary, octal, decimal, and hex, and see the step-by-step math for adding, subtracting, multiplying, and dividing across bases.
  4. Black-Scholes Model and Greeks: Pricing Formula ExplainedHow the Black-Scholes formula prices call and put options, plus what delta, gamma, vega, theta, and rho measure and how traders use them.
  5. Blood Pressure Categories Chart: Normal Systolic and DiastolicKorean Society of Hypertension 2026 blood pressure chart: normal is under 120/80. See each stage, isolated types, and the 135/85 home cutoff.
  6. BMI Calculator and Chart: Formula and Weight CategoriesLearn the BMI formula (kg/m²), see Korean and WHO weight categories side by side, and find your ideal weight, with notes on why BMI can miss the mark.

Related tools