DEPTH OF FIELD CALCULATOR

Depth of field calculator

Enter the lens, aperture, distance and sensor, get the sharp range and the hyperfocal distance.

mm
ft

Presets use diagonal ÷ 1500 (ZEISS): a convention, not a law.

What is depth of field?

The range of distances in front of and behind the point you focus on that look acceptably sharp in the picture. A point off the focus plane is rendered as a small disc, the circle of confusion; depth of field ends where that disc grows larger than the limit you accept.

What is the hyperfocal distance?

The closest focus distance at which the far limit of sharpness reaches infinity: H = f² ÷ (N × c) + f, where f is the focal length, N the f-number and c the circle of confusion. A 50 mm lens at f/8 with c = 0.03 mm has H = 50² ÷ (8 × 0.03) + 50 = 10,467 mm, about 10.5 m or 34 ft. Focus there and everything from half that distance (5.2 m) to infinity is acceptably sharp.

Which circle of confusion should I use?

It is a convention, not a law of nature, because it depends on how large you print or view the picture. ZEISS uses the sensor diagonal divided by 1500, which is 0.029 mm for a 24 × 36 mm frame (0.03 mm is the traditional round figure), and notes that the factor should be doubled for the highest sharpness requirements. The presets here apply diagonal ÷ 1500 to typical sensor sizes from camera makers’ specifications; you can also type your own value.

How do aperture, focal length and distance change depth of field?

According to ZEISS, depth of field grows with the square of the focusing distance, is inversely proportional to the square of the focal length at the same distance, and grows about linearly with the f-number: stopping down two stops, for example from f/5.6 to f/11, usually doubles it. Those rules hold while you focus well inside the hyperfocal distance.

Does sensor size matter?

Yes, through the circle of confusion and the lens you need for the same framing. For the same angle of view and the same f-number, a smaller sensor needs a shorter lens, which has a smaller entrance pupil, so the hyperfocal distance is reached sooner and depth of field is greater (ZEISS). This calculator does not assume a framing, so enter the focal length you actually use.

Worked example: a portrait lens at two apertures

On a full-frame body (circle of confusion 0.0288 mm from the diagonal ÷ 1500), an 85 mm lens focused at 3 m has a hyperfocal distance of 139.24 m at f/1.8. The near limit is 2.94 m and the far limit 3.06 m, so the zone of acceptable sharpness is only 12.6 cm deep. Stopped down to f/8 at the same distance, the limits become 2.74 m and 3.31 m, a zone of 56.3 cm, about 4.5 times deeper. The zone is not centered on the focus point: 25.6 cm falls in front and 30.8 cm behind.

Worked example: focusing at the hyperfocal distance for a landscape

For a 24 mm lens at f/11 on full frame, H = 24² ÷ (11 × 0.0288) + 24 = 1.84 m. Focus there and the near limit is 0.92 m, half of H, with the far limit at infinity. The same lens at the same f-number on a Micro Four Thirds sensor (circle of confusion 0.0144 mm) focused at 3 m has a hyperfocal distance of 3.65 m, almost twice as long as the full-frame figure, and with sharpness from 1.65 m to 16.66 m. The smaller circle of confusion makes the zone shallower for identical settings; to frame the same scene on the smaller sensor you would use a shorter lens, which is where its advantage in depth of field comes from.

Common mistakes with depth of field

Treating the near and far limits as sharp edges: sharpness falls off gradually, and the limits depend on the circle of confusion you chose, so a stricter value narrows the zone. Focusing at the horizon for a landscape, which wastes the half of the zone behind the focus point; focusing at the hyperfocal distance moves the far limit to infinity and the near limit to half H. Assuming the same f-number gives the same look on every sensor. Forgetting diffraction: at very small apertures such as f/22 the image softens from diffraction, which this calculator does not model. Entering the focal length in a different unit from the focus distance, so check that both are in millimeters or in the same system the calculator shows.

To see what a file will look like in print, use the print size calculator; for screen sharpness, the PPI calculator.

Sources: ZEISS Camera Lens News, H. H. Nasse, “Depth of Field and Bokeh” (circle of confusion, hyperfocal distance and scaling rules); sensor sizes from the specifications of the Canon EOS R5 and R7, Sony α6400, Nikon D7500, Panasonic Lumix G9 and Fujifilm GFX100 II. The formulas are standard thin-lens geometry. How we check our calculators.