Depth of Field Calculator

Calculate near and far focus limits, total depth of field, and hyperfocal distance for any camera and lens setup.

Camera depth of field
Enter lens, aperture, subject distance, and sensor circle of confusion values.

About depth of field

Depth of field is the range of distances that appears acceptably sharp around the exact plane of focus. It is not a hard wall where sharpness suddenly ends. Detail gradually becomes less distinct in front of and behind the subject, and the near and far limits represent the points where blur reaches the selected circle of confusion. Photographers use these limits to balance subject separation, environmental detail, and focusing tolerance before taking a picture. This calculator uses focal length, f-number, subject distance, and circle of confusion. It first finds hyperfocal distance by dividing focal length squared by aperture times circle of confusion, then adding one focal length. The near focus limit is derived from the hyperfocal and subject distances. The far limit uses the corresponding denominator in the opposite direction; when the subject is at or beyond the hyperfocal distance, that far limit extends to infinity. All optical calculations are performed in millimeters and displayed in meters. A wider aperture such as f/2 produces a shallower sharp zone than f/8 when the other settings stay fixed. A longer focal length also tends to reduce depth of field for the same framing distance, while focusing farther away expands it. Sensor format enters indirectly through the circle of confusion. A commonly used value is 0.03 mm for full-frame cameras, about 0.02 mm for APS-C, and roughly 0.015 mm for Micro Four Thirds, although standards vary. Hyperfocal focusing is especially useful for landscapes and street photography. When a lens is focused at the hyperfocal distance, the calculated sharp range extends from approximately half that distance to infinity. This can preserve foreground detail without wasting as much focus range behind infinity. For portraits, the near and far limits help determine whether both eyes or several people will remain acceptably sharp. Results are planning estimates rather than guarantees of perceived sharpness. Final appearance also depends on viewing size, viewing distance, sensor resolution, lens performance, diffraction, motion, and the viewer's eyesight. Macro photography can require formulas that account for magnification and effective aperture, so ordinary subject-distance equations become less accurate at very close range. Use the calculated limits as a practical starting point, then inspect critical images at the intended output size.

Depth of field examples

Camera settingsCalculated rangeUse case
50 mm, f/2.8, 3 m, CoC 0.03 mm2.73 m to 3.33 m; DOF 0.60 mA full-frame portrait with moderate background separation.
24 mm, f/8, 5 m, CoC 0.03 mm1.64 m to infinity; H 2.42 mA wide landscape focused beyond the hyperfocal distance.
85 mm, f/4, 10 m, CoC 0.03 mm8.59 m to 11.97 m; DOF 3.38 mA telephoto composition with a controlled focus zone.

How to calculate depth of field

  1. Enter the focal length printed on the lens in millimeters.
  2. Enter the selected aperture as its f-number.
  3. Measure the subject distance from the camera's sensor plane in meters.
  4. Choose a circle of confusion appropriate for the camera format.
  5. Select Calculate Depth of Field and review all four focus results.

Depth of field calculator FAQ

What controls depth of field?

Aperture, focal length, focus distance, and circle of confusion all affect the result. Wider apertures, longer lenses, and closer subjects generally create a shallower focus range.

What circle of confusion should I use?

A conventional starting point is 0.03 mm for full frame, 0.02 mm for APS-C, or 0.015 mm for Micro Four Thirds. A smaller value imposes a stricter sharpness standard.

What is hyperfocal distance?

It is the nearest focus distance whose far depth-of-field limit reaches infinity for the selected settings. Focusing there makes the near limit approximately half the hyperfocal distance.

Why does the far limit show infinity?

The far-limit equation becomes unbounded when focus reaches or passes the hyperfocal distance. In practical terms, objects from the near limit through the distant background should meet the chosen sharpness criterion.

Does this calculator work for macro photography?

It can provide a rough indication, but ordinary depth-of-field equations lose accuracy at high magnification. Dedicated macro calculations should include magnification and effective aperture.