Method
Every figure on the calculator is reproducible by hand. This page shows the arithmetic. Back to the calculator.
Reducing a ratio
A size is reduced by the greatest common divisor of its sides. 1920 × 1080 shares a divisor of 120, so 1920 ÷ 120 : 1080 ÷ 120 = 16:9, and the decimal is 16 ÷ 9 = 1.7778.
The formula line runs the reduction in reverse: 1080 = 1920 × 9 ÷ 16.
The four roundings
Example: you want a frame 1000 px wide at exactly 16:9. The ideal height is 1000 × 9 ÷ 16 = 562.5 px, which no display has. The calculator shows four honest answers:
- Exact — 1000 × 562.5. The true value, fraction included.
- Nearest pixel — 1000 × 563. Off by +0.5 px, which changes the ratio by about 0.089%.
- Nearest even — 1000 × 562. Video codecs and many encoders require even dimensions.
- Multiple of 16:9 — 992 × 558. Both sides are whole multiples of the reduced ratio (16 × 62 and 9 × 62), so the ratio is exact; the cost is that the width lands 8 px short of 1000. Ties snap down, never past the requested size.
Contain (letterbox)
Contain scales the source until it touches the frame without exceeding it: scale = min(frameW ÷ srcW, frameH ÷ srcH). The fitted size is floored to an even pixel so it never crosses the frame edge.
Worked example: a 2.39:1 scope frame (4096 × 1716) inside 1920 × 1080. The scale is min(1920 ÷ 4096, 1080 ÷ 1716) = 0.46875, giving exactly 1920 × 804.375, floored to 1920 × 804. The remaining 276 px split into 138 px bars top and bottom.
Cover (crop)
Cover scales until the frame is filled: scale = max(frameW ÷ srcW, frameH ÷ srcH), rounded up to an even pixel. The overflow is cropped equally on both sides.
Worked example: a 3:2 photo (6000 × 4000) covered into a 1080 × 1080 square. The scale is 1080 ÷ 4000 = 0.27, giving 1620 × 1080. The crop is (1620 − 1080) ÷ 2 = 270 px left and right, losing about 33.3% of the picture.
Inches are pixels ÷ DPI; millimetres are inches × 25.4. At 300 DPI, 1920 × 1080 px prints at 162.6 × 91.4 mm.