How aspect-ratio math works
Aspect ratio is width divided by height. Two operations cover almost every use case:
- Solve for a missing dimension when you know the ratio and either width or height:
height = width × (ratio_h / ratio_w), or symmetricallywidth = height × (ratio_w / ratio_h). - Reduce a width-height pair to its simplest ratio by dividing both by their greatest common divisor (GCD). 1920 and 1080 share GCD 120, so 1920×1080 reduces to 16:9.
aspect = width / height
gcd(a, b) = b == 0 ? a : gcd(b, a mod b)
simplest_ratio = width/gcd(w, h) : height/gcd(w, h)
Fitting one ratio into another (letterbox vs pillarbox)
- Letterbox = source is wider than target. Add bars on the top and bottom.
- Pillarbox = source is taller than target. Add bars on the left and right.
The scaled source keeps its ratio and fills either the full target width (letterbox) or full target height (pillarbox), whichever fits without cropping.
Common ratios reference
| Ratio | Decimal | Typical resolution | Use case |
|---|---|---|---|
| 4:3 | 1.333 | 640 × 480, 1440 × 1080 | Legacy SD TV, kids content from the 90s |
| 16:9 | 1.778 | 1920 × 1080, 3840 × 2160 | HDTV, 1080p, 4K UHD - the default for OTT |
| 16:10 | 1.6 | 1920 × 1200 | Computer displays, not common in OTT |
| 21:9 | 2.333 | 2560 × 1080, 3440 × 1440 | Ultrawide cinema, premium movie content |
| 2.35:1 / 2.39:1 | 2.35 / 2.39 | 1920 × 817, 3840 × 1608 | Theatrical cinema |
| 1:1 | 1.0 | 1080 × 1080 | Square social / Instagram feed |
| 9:16 | 0.5625 | 1080 × 1920 | Vertical mobile / TikTok / Shorts |
Frequently Asked Questions
How do I calculate aspect ratio?
Aspect ratio is width divided by height. Reduce a width × height pair to its simplest form by dividing both by their greatest common divisor. 1920 ÷ 1080 reduces to 16 ÷ 9 because GCD(1920, 1080) = 120.
What is 16:9 in pixels?
16:9 is a ratio, not a fixed pixel size. The common 16:9 resolutions are 1280 × 720 (720p HD), 1920 × 1080 (1080p Full HD), 2560 × 1440 (1440p QHD), and 3840 × 2160 (4K UHD).
How do I letterbox 4:3 content into a 16:9 frame?
Keep the 4:3 height and compute the matching 4:3 width, then centre inside the 16:9 frame and fill the side bars (pillarbox, since 4:3 is narrower than 16:9). For a 1920 × 1080 frame: 4:3 content is sized to 1440 × 1080 and centred, leaving 240 px black bars on each side.