Depth of Field Calculator

Find the in-focus range of your shot from focal length, aperture and distance.

How it is calculated

Inputs: focal length f in mm, f-number N, focus distance s in meters and the sensor crop factor. The circle of confusion is c = 0.029 ÷ crop mm, so a full-frame sensor (crop 1) uses 0.029 mm. Hyperfocal distance is H = f² ÷ (N × c) + f. The near limit is s × (H − f) ÷ (H + s − 2f) and, when s is less than H, the far limit is s × (H − f) ÷ (H − s). Depth of field is far minus near. If the focus distance reaches or passes H, the far limit and depth of field show ∞. Results are in meters with two decimals. If crop is empty or not above zero, 1 is used. The model uses a fixed sharpness criterion and does not allow for diffraction or print size.

Worked example

A full-frame camera with a 50 mm lens at f/8, focused at 5 m. The circle of confusion is 0.029 mm. Hyperfocal: 50² ÷ (8 × 0.029) + 50 = 2,500 ÷ 0.232 + 50, about 10,826 mm, shown as 10.83 m. Near limit: 5,000 × 10,776 ÷ (10,826 + 5,000 − 100), about 3,426 mm, shown as 3.43 m. Far limit: 5,000 × 10,776 ÷ (10,826 − 5,000), about 9,248 mm, shown as 9.25 m. Depth of field: 9.25 − 3.43 gives 5.82 m, so roughly everything from 3.43 m to 9.25 m looks sharp.

Try this example →

Common mistakes

  • Typing the focus distance in feet or centimeters. The field is in meters; 5 ft is about 1.52 m.
  • Leaving the crop factor at 1 on an APS-C or Micro Four Thirds camera. The sharp zone is then overstated; use about 1.5 or 2.
  • Entering the 35 mm-equivalent focal length instead of the real one printed on the lens. Use the real focal length together with the crop factor.
  • Treating the near and far limits as razor-sharp edges. Sharpness falls off gradually, and the limits are only the point where blur becomes noticeable at the assumed standard.
  • Expecting a finite far limit when focusing beyond the hyperfocal distance. Above H the far limit is infinity.

About this calculator

This calculator finds a lens's depth of field (DoF) — the zone in front of and behind the focus point that appears acceptably sharp — along with the near and far focus limits and the hyperfocal distance (H = f² / (N·c), where f is focal length, N is the aperture, and c is the circle of confusion). Focusing at the hyperfocal distance maximizes the sharp range, from half that distance to infinity.

Photographers and cinematographers use it when planning landscape shots that need everything sharp from foreground to horizon, portraits that need a blurred background, or macro and product shots where the sharp zone is only millimeters deep. Enter your focal length, aperture, focus distance, and sensor format to get the near/far limits and hyperfocal distance.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators