Screen, print, lens and video formulas, each computed for a worked example and matching the calculators. Lengths in the depth-of-field row are in millimetres unless converted.
Formulas
| Measure | Formula | Example |
|---|---|---|
| Screen width and height from the diagonal | width = d × a / √(a² + b²), height = d × b / √(a² + b²) for a ratio a:b |
27 in at 16:9: 23.53 × 13.24 in |
| Pixel density (PPI) | ppi = √(w² + h²) / diagonal |
2560 × 1440 on 27 in: 108.8 ppi |
| Pixels needed for a print | pixels = inches × dpi |
6 × 4 in at 300 dpi: 1800 × 1200 px |
| Hyperfocal distance | H = f² / (N × c) + f |
50 mm, f/8, circle of confusion 0.03 mm: 10.47 m |
| Depth of field | near = s(H − f) / (H + s − 2f), far = s(H − f) / (H − s) |
Focused at 3 m: sharp from 2.34 m to 4.19 m |
| Video file size | bytes = (video + audio bits per second) × seconds / 8 |
8 Mbit/s video plus 128 kbit/s audio for 10 minutes: 609.6 MB |
Try them
The Screen Size Calculator converts a diagonal and aspect ratio into width, height and pixel density; the Print Size Calculator tells you how large you can print a photo; the Depth of Field Calculator finds the sharp zone for a lens; and the Video File Size Calculator estimates size from bitrate. For resolution and image formats see How Image Formats and Compression Work.
Notes
- Print quality. 300 ppi is the usual target for close viewing; posters viewed from a distance look fine at 150 ppi or less.
- Why depth of field changes. A wider aperture (smaller f-number), a longer lens or a closer subject all make the sharp zone shallower.
- Bitrate is not size. Megabits are not megabytes: divide bits by 8, as in the video formula.