Depth of Field Calculator

Near, far and total depth of field for any lens and sensor.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Depth of field calculator

Work out exactly how much of your scene will be in focus. Enter your sensor format, focal length, aperture and subject distance, and the tool returns the near limit, far limit, total depth of field and the hyperfocal distance. It is built for photographers planning landscapes, portraits and product shots.

How it works

The calculation uses the standard optics of depth of field. First it finds the hyperfocal distance:

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

where f is focal length (mm), N is the f-number and c is the circle of confusion chosen for your sensor (about 0.029 mm for full frame, 0.019 mm for APS-C). From H and the subject distance s it computes the near and far limits:

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

When s reaches or exceeds H, the far limit becomes infinity. Total depth of field is far − near.

Example

Full frame, 50 mm lens at f/2.8, subject at 3 m (c = 0.029 mm):

  • Hyperfocal H ≈ 50² ÷ (2.8 × 0.029) + 50 ≈ 30.8 m
  • Near limit ≈ 2.74 m, far limit ≈ 3.32 m
  • Total depth of field ≈ 0.58 m (about 26 cm in front, 32 cm behind)
SettingValue
Focal length50 mm
Aperturef/2.8
Subject distance3 m
Total DoF~0.58 m

All calculations happen entirely in your browser and nothing is sent anywhere.

Ad placeholder (rectangle)