How this instrument works
Depth of field is the zone of a scene, from a near limit to a far limit, that appears acceptably sharp in a photograph even though only one exact plane is in true focus. It depends on four things: the lens's focal length, the aperture (f-number), the subject distance you focus on, and the circle of confusion -- the largest blur spot the eye still reads as a sharp point at normal viewing size.
This instrument first computes the hyperfocal distance, the focus distance beyond which everything from half that distance to infinity is acceptably sharp -- it's the foundation the near and far limit formulas build on. Once hyperfocal distance is known, the near and far limits for any closer subject distance follow directly from it, along with focal length and subject distance itself.
Depth of field narrows as aperture opens (lower f-number), as focal length increases, and as subject distance decreases -- which is why a telephoto lens wide open on a close subject, like a portrait at f/2.8, throws the background dramatically out of focus, while a wide-angle lens stopped down on a distant landscape keeps nearly everything sharp from a few metres to the horizon.
- Enter Focal length (mm) and f-number (f/N) -- your lens's focal length and the aperture you're shooting at.
- Enter Circle of confusion (mm) -- 0.03mm is the traditional full-frame default; smaller-sensor formats typically use a smaller value.
- Enter Subject distance (mm) -- how far your focus point is from the lens, e.g. 3000mm for a subject 3 metres away.
- Read Near focus limit, Far focus limit and Total depth of field beneath the inputs, all in millimetres.
- For just the hyperfocal distance on its own, without near/far limits, use this site's dedicated hyperfocal distance calculator.
Worked example -- 50mm lens at f/8, subject 3m away
Enter a 50mm focal length, f/8, a 0.03mm circle of confusion and a subject distance of 3000mm (3 metres). Hyperfocal distance comes out to 10,466.67mm first. From there, the near focus limit is 2340.37mm and the far focus limit is 4177.38mm -- a total depth of field of 1837.01mm, or roughly 1.84 metres, spanning from about 2.34m to 4.18m in front of the camera.
Questions
What's the difference between this and the hyperfocal distance calculator?
Hyperfocal distance is a single number -- the focus distance beyond which everything out to infinity is acceptably sharp -- and this site's dedicated hyperfocal distance calculator computes just that. This depth-of-field calculator uses hyperfocal distance as an intermediate step, then goes further to compute the near and far focus limits for any subject distance closer than the hyperfocal distance, along with the total depth-of-field span between them.
Why does a wider aperture (lower f-number) reduce depth of field?
A wider aperture lets the cone of light converging on the focal plane spread more sharply over distance, so points slightly in front of or behind the focus plane blur past the circle-of-confusion threshold more quickly. In the formula, a lower f-number reduces the hyperfocal distance, which in turn pulls both the near and far limits closer to the subject -- shrinking the sharp zone, exactly what produces the blurred backgrounds associated with wide-aperture portrait lenses.
What circle of confusion value should I use for my camera?
0.03mm is the traditional value for a full-frame 35mm sensor and is this instrument's default; smaller sensors need a smaller circle of confusion to represent an equally sharp result, scaled roughly by the sensor's crop factor -- APS-C cameras commonly use figures around 0.02mm, for example. If your camera manufacturer or a depth-of-field reference table publishes a specific value for your sensor, use that for the most accurate result.
What happens if my subject distance is beyond the hyperfocal distance?
The far focus limit becomes infinity in practice -- once subject distance reaches or exceeds the hyperfocal distance, everything from half the hyperfocal distance out to the horizon is acceptably sharp, so there is no finite far limit to compute. This instrument flags that case rather than returning a number, since the far-limit formula's denominator would otherwise go to zero or negative.
Why is depth of field measured with a 'near limit' and 'far limit' rather than one number?
Because only one exact plane in a photograph is in perfect focus, but a range in front of and behind it still reads as acceptably sharp to the eye -- the near limit marks where that sharp zone starts (closer to the camera) and the far limit marks where it ends (farther away). The near limit is always closer to the subject than the far limit is, since optical blur increases faster on the near side of focus than the far side for the same physical distance.