🔍
📷

Depth of Field Calculator

Enter your lens focal length, aperture (f-number), and subject distance to calculate the hyperfocal distance and the near and far limits of acceptable sharp focus.

mm
f/
m

What Depth of Field Means

Depth of field is the range of distance in front of and behind your focus point that appears acceptably sharp in a photo. It depends on your lens’s focal length, the aperture (f-number) you choose, how far away your subject is, and your camera sensor’s size.

The Formulas Used

This calculator first finds the hyperfocal distance H = (focal length^2 / (f-number x circle of confusion)) + focal length. From there, the near limit is Dn = (H x s) / (H + (s – f)) and the far limit is Df = (H x s) / (H – (s – f)), where s is the subject distance. If the far limit calculation goes negative, everything from the near limit to infinity is in focus.

Practical Notes

  • Smaller f-numbers (wider apertures like f/1.8) produce a shallower depth of field with more background blur; larger f-numbers (like f/16) produce a deeper depth of field with more in focus.
  • The circle of confusion value depends on sensor size — pick the option closest to your camera.
  • Results are estimates based on standard optical formulas and are intended for general photography planning.
Last reviewed August 2026