Depth of Field Calculator
Depth of field (DoF) is the range of distances in a scene that appear acceptably sharp. It is controlled by three factors: aperture (f-number), focal length, and focus distance. The hyperfocal distance H = f^2 / (N x c) is the key intermediate value: when focused at H, depth of field extends from H/2 to infinity. When focused closer than H, the near limit is Dn = H x s / (H + s) and the far limit is Df = H x s / (H - s), where s is the focus distance. The circle of confusion c (in mm) represents the maximum acceptable blur size for the intended viewing conditions. Choose a preset or enter a custom CoC value.
Depth of field formulas
H = f2 / (N x c)
Dnear = H x s / (H + s)
Dfar = H x s / (H - s) [infinity if s >= H]
Where f = focal length (mm), N = f-number, c = circle of confusion (mm), s = focus distance (same units as H). Divide mm by 1000 to convert to meters for display.
Practical depth of field tips
- For maximum DoF landscape photography, focus at the hyperfocal distance: everything from H/2 to infinity is sharp.
- Portrait photographers often use f/1.8 to f/2.8 to isolate subjects with shallow DoF.
- Macro photography at 1:1 reproduction has very shallow DoF at any aperture; focus stacking is often needed.
- Wide-angle lenses (e.g. 24 mm) have much deeper DoF than telephoto lenses (e.g. 200 mm) at the same f-number and subject distance.
Depth of field: frequently asked questions
What is depth of field (DoF)?
Depth of field is the range of distances in a scene that appear acceptably sharp in a photograph. Objects within the near and far DoF limits are rendered with a circle of confusion smaller than the chosen circle of confusion (CoC) criterion, typically 1/1500 of the sensor diagonal for viewing at standard print size.
What is hyperfocal distance?
The hyperfocal distance H = f^2 / (N * c) is the closest focusing distance at which objects at infinity appear acceptably sharp. When the lens is focused at the hyperfocal distance, depth of field extends from H/2 to infinity. Focusing beyond the hyperfocal distance wastes depth of field behind the subject.
What is the circle of confusion (CoC)?
The circle of confusion is the maximum diameter of a blur spot that the human eye cannot distinguish from a point at a given viewing size and distance. For a full-frame (35 mm) sensor, c = 0.029 mm is commonly used. For APS-C (crop factor 1.5), c = 0.019 mm. For Micro Four Thirds (crop 2), c = 0.015 mm.
How do aperture and focal length affect depth of field?
Larger aperture (smaller f-number like f/1.8) gives shallower DoF. Longer focal lengths also give shallower DoF at the same subject distance and aperture. Conversely, stopping down (higher f-number like f/11) and using wider focal lengths increases DoF.
What are the depth of field formulas?
Hyperfocal: H = f^2/(N c). Near limit: Dn = H * s / (H + s). Far limit: Df = H * s / (H - s), where s is focus distance. If s >= H, far limit extends to infinity. These are paraxial approximations standard in photographic depth of field analysis.
Official sources
- OpenStax University Physics Volume 3, Chapter 2: Geometric Optics. openstax.org.
- NIST, Optics and Photonics. nist.gov.
Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.