Depth of field calculator

How much of the scene will be acceptably sharp: the near and far limits, the hyperfocal distance and the circle of confusion for your sensor, with the formulas shown.

Camera and lens
Focus

Near limit

–

Far limit

–

Depth of field

–

Hyperfocal

–

 

H = f² ÷ (N × c) + f

near = s(H − f) ÷ (H + s − 2f)

far = s(H − f) ÷ (H − s), or infinity when s ≥ H

 

What goes in

Choose your sensor or film format, the focal length actually printed on the lens (not the full-frame equivalent), the aperture and the distance you focus at, measured from the camera. The circle of confusion (c) is the largest blur spot that still looks sharp; it is set from your format as its diagonal ÷ 1500, which gives 0.029 mm for full frame and about 0.019 mm for APS-C. Pick Custom to use your own value, such as 0.030 or 0.033 mm, which are also common for full frame.

The formulas

The hyperfocal distance is H = f²/(N·c) + f. Focus there and everything from about half that distance to infinity is acceptably sharp, which is why landscape photographers use it. For a focus distance s, the near limit is s(H − f)/(H + s − 2f) and the far limit s(H − f)/(H − s), becoming infinity once s reaches H. These are the classic equations from Greenleaf's Photographic Optics (1950), as published by DOFMaster. As a check, Wikipedia's worked example of a 50 mm lens at f/8 with c = 0.03 mm gives H = 10 467 mm, and so does this calculator.

Caveats

“Acceptably sharp” assumes a typical print viewed from a normal distance. If you crop hard or inspect at 100% on screen, use a smaller circle of confusion and expect less depth of field.

Sources

Questions

Why do I get more depth of field on a phone or small sensor?

To frame the same scene a smaller sensor uses a shorter lens, and the f² in the hyperfocal formula makes that dominate, so the zone of sharpness grows.

Is the zone split evenly around the focus point?

No. At ordinary distances more of it lies behind the focus point than in front, and close up the split becomes nearly even. The diagram and the caption under it show the split for your settings.

Should I always stop down for more depth?

Not always. Very small apertures soften the whole picture through diffraction, so the sharpest result is often a little short of the smallest aperture your lens offers.