Depth of Field Calculator
The near and far limits of acceptable sharpness, the total depth of field and the hyperfocal distance for a lens, aperture, focus distance and sensor size.
Result…
How it's calculated
Hyperfocal distance H = f² ÷ (N × c) + f Near limit Dn = s × (H − f) ÷ (H + s − 2f) Far limit Df = s × (H − f) ÷ (H − s) (infinity when s ≥ H) Depth of field = Df − Dn (f = focal length, N = f-number, c = circle of confusion, s = focus distance; all in mm)
Finds how much of a scene in front of and behind the point you focus on will look acceptably sharp. It uses the hyperfocal distance H = f² ÷ (N × c) + f and the near and far limit formulas from Greenleaf's Photographic Optics (as given by DOFMaster), where f is the focal length, N the f-number, c the circle of confusion and s the focus distance. When you focus at or beyond the hyperfocal distance, the far limit is infinity. The circle of confusion depends on the sensor size: the list uses the d/1500 values from the circle of confusion article, and you can enter your own. Distances are in metres or feet, with the other unit shown in the working.
Your numbers, step by step
About the Depth of Field calculator
This depth of field calculator shows how much of a scene will look sharp in front of and behind the point you focus on. Enter the focal length, the f-number, the focus distance and your sensor format, and it returns the near and far limits of acceptable sharpness, the total depth of field and the hyperfocal distance. Focus at the hyperfocal distance and everything from half that distance to infinity is acceptably sharp, which is why landscape photographers use it. The sensor format sets the circle of confusion: the list uses the d/1500 values for full frame, APS-C, Four Thirds, 1-inch and medium and large format, and you can enter your own for a big print or a close look. Distances work in metres or feet, with the other unit in the steps, and every formula is shown with your numbers.
How to use it
- Choose metric (metres) or imperial (feet) units.
- Enter the “Focal length” marked on the lens and the “Aperture (f-number)”.
- Enter the “Focus distance” from the subject to the sensor plane.
- Pick your “Sensor format”, or “Enter the circle of confusion” for your own value.
- Read the depth of field, the near and far limits and the hyperfocal distance.
Worked example
An 85 mm lens at f/2.8 on full frame (circle of confusion 0.030 mm), focused at 4 m. Hyperfocal distance H = 85² ÷ (2.8 × 0.03) + 85 = 86,097 mm, or 86.1 m. Near limit = 4000 × (H − 85) ÷ (H + 4000 − 170) = 3.826 m; far limit = 4000 × (H − 85) ÷ (H − 4000) = 4.191 m. The depth of field is 0.365 m: 0.174 m in front of the subject and 0.191 m behind it.
Updated
Questions people ask
How do I calculate depth of field?
Work out the hyperfocal distance H = f² ÷ (N × c) + f, then the near limit s × (H − f) ÷ (H + s − 2f) and the far limit s × (H − f) ÷ (H − s). The depth of field is the far limit minus the near limit.
What is the hyperfocal distance?
It is the focus distance that gives the most depth of field: focused there, everything from half that distance to infinity is acceptably sharp. Focusing any farther wastes the near part of the sharp zone.
What circle of confusion should I use?
A common rule is the format diagonal ÷ 1500: about 0.029 to 0.030 mm for full frame and 0.015 mm for Four Thirds, as listed in the circle of confusion article. Use a smaller value for large prints or pixel-level viewing.
Does a crop sensor give more depth of field?
At the same focal length, f-number and distance, a smaller sensor uses a smaller circle of confusion, so it gives less depth of field. When you stand farther back or use a shorter lens to get the same framing, the smaller sensor then gives more.
Why is the sharp zone bigger behind the subject?
The far limit grows faster than the near limit shrinks, so more of the depth of field lies behind the focus point, and the share grows as you focus farther away. Close up it splits almost evenly. The exposure calculator shows the shutter speed for a smaller aperture.
How accurate is a depth of field calculation?
It is a guide, not a hard edge: sharpness fades gradually and depends on the print size and viewing distance. The thin-lens formulas don't hold for macro work, tilt lenses or zooms whose focal length changes as they focus.