Photography

Depth of field.

Choose a sensor, then enter focal length, aperture and the distance you focus at. See where acceptable sharpness starts and ends, how much of that falls in front of and behind the subject, and the hyperfocal distance.

Advertisement

Your numbers

Sets the circle of confusion and, with it, what counts as sharp.

mm

For f/2.8 enter 2.8.

Distance from the sensor plane to the subject.

mm

Leave blank to use the default for the sensor. The circle of confusion (CoC) is the largest blur spot still counted as sharp. 0.030 mm is a value typically used for full-frame 35 mm photography; this tool scales it with the sensor diagonal. Set your own to be stricter or looser.

Result

Fill the form and press Calculate.

Worked example

A 50 mm lens at f/2.8 on full frame, focused at 3 m, CoC 0.030 mm. Hyperfocal distance H = 50²/(2.8 × 0.03) + 50 = 29.81 m. Near limit = 3000 × (H − f) / (H + 3000 − 2f) = 2.73 m; far limit = 3000 × (H − f) / (H − 3000) = 3.33 m. Total depth of field is about 0.60 m.

How it works

With H = f²/(N × c) + f, a subject at distance s has acceptable sharpness from s(H − f) / (H + s − 2f) to s(H − f) / (H − s); if s is at or beyond H the far limit is infinity. These come from the thin-lens blur-circle condition: the blur of a point at distance d when focused at s is f²|d − s| / (N d (s − f)), and the limits are where it equals the CoC c.

Depth of field is not a physical wall. It depends on the CoC you accept, which depends on print size and viewing distance. The default CoC is 0.030 mm on full frame and scales with the sensor diagonal for other formats. Real lenses add aberrations and diffraction that this model ignores.

Sources and basis (checked 2026-10-05): Wikipedia: Hyperfocal distance (H = f²/(Nc) + f; CoC 0.03 mm typical for 35 mm photography), Wikipedia: Depth of field, Wikipedia: Image sensor format (sensor dimensions) and Wikipedia: Crop factor (35 mm diagonal 43.3 mm). Near and far limits are derived from the thin-lens blur circle and checked in the test suite.

FAQ

What does a depth of field calculator tell me?

The range of distances that look acceptably sharp when you focus at a given distance, for a chosen lens, aperture and sensor.

Why does sensor size change depth of field?

The circle of confusion is smaller on a smaller sensor because the image is enlarged more. A smaller CoC makes the sharp zone shorter for the same lens settings; a smaller sensor also needs a shorter lens for the same view, which usually gives more depth of field overall.

How do I get more depth of field?

Use a smaller aperture (larger f-number), a shorter focal length, or stand further from the subject.

What is the far limit "Infinity"?

When you focus at or beyond the hyperfocal distance, everything from about half that distance outward is acceptably sharp.

Where is focus distance measured from?

From the sensor plane (the focus-distance mark on many bodies) to the subject. For long distances the difference is small.

Advertisement
Advertisement