Depth of Field Calculator
Find the near limit, far limit and total depth of field for any lens, aperture and focus distance — plus the hyperfocal distance for your sensor.
How it works
Hyperfocal H = f² ÷ (N × c) + f · Near = s(H − f) ÷ (H + s − 2f) · Far = s(H − f) ÷ (H − s) · DoF = far − near
Depth of field is the zone in front of and behind your focus point that still looks acceptably sharp. It is set by four things: focal length, aperture (f-number), how far the subject is, and the circle of confusion (CoC) — the largest blur spot the sensor can render before it reads as unsharp, which shrinks as the sensor gets smaller. The hyperfocal distance is the magic number: focus there and everything from half that distance to infinity is sharp. Once your subject sits at or beyond the hyperfocal distance, the far limit runs to infinity, which is why landscape shooters focus roughly a third into the scene rather than on the horizon.
Worked example
A 50 mm lens at f/8 on a full-frame body (CoC 0.030 mm) has a hyperfocal distance of 50² ÷ (8 × 0.03) + 50 ≈ 10,467 mm, about 10.47 m. Focused on a subject 5 m away, the sharp zone runs from roughly 3.39 m to 9.53 m — about 6.14 m of depth of field.
Frequently asked questions
What is the circle of confusion?
It is the largest blur circle that still looks like a sharp point in the final image. Smaller sensors need a smaller circle of confusion because the image is enlarged more, which is why a Micro 4/3 body (0.015 mm) has less depth of field forgiveness than full-frame (0.030 mm) at the same aperture and framing.
Why does the far limit sometimes say infinity?
Once your subject is focused at or beyond the hyperfocal distance, the far limit of sharpness extends all the way to the horizon. This calculator flags that case rather than showing a misleading huge number.
How do I get more depth of field?
Close the aperture (a higher f-number), step back from the subject, or use a shorter focal length — each widens the sharp zone. Focusing at the hyperfocal distance gives the deepest possible field for a given aperture.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.