← All Tools

Depth of Field & Hyperfocal Distance

For a given focal length, aperture, and subject distance — find the hyperfocal distance, the near and far in-focus limits, and the total depth of field. Pick a sensor format and the circle-of-confusion is set for you. Flags small apertures where diffraction starts to undo your DoF gain.

Camera & lens

mm
mm
f /

Mathematically: H = f² / (N · c) + f is the hyperfocal distance, where f is the focal length, N the f-number, and c the circle of confusion. For a subject at distance s, the near focus is Dn = s(H − f) / (H + s − 2f) and the far focus is Df = s(H − f) / (H − s) (infinite once s ≥ H).

Depth of field

Total in-focus depth
Hyperfocal distance
Near focus limit
Far focus limit
In front of subject
Behind subject
Diffraction limit
Focus scale (log distance)

Why the format matters

Two photographers shooting the same scene with the same f-stop will get different depths of field if their sensors are different sizes. A larger sensor needs a longer focal length to frame the same view, and longer focal lengths cut DoF roughly with the square of the focal length — that's why full-frame portraits feel creamier than the same shot on Micro 4/3. The accepted rule of thumb is to set the circle of confusion proportional to the sensor's diagonal (about d / 1500), which is what the format presets here use.

At small apertures, diffraction blurs the image enough that further stopping down stops increasing the apparent sharpness depth. The diffraction limit shown is the f-number where the Airy disk diameter on the sensor equals the chosen circle of confusion — below that, going to f/22 (or smaller) wastes light and loses fine detail.