Depth of Field Calculator
Work out the near and far focus limits, total depth of field and hyperfocal distance for any lens, aperture and sensor.
Fill in focal length, aperture and subject distance to see the depth of field.
- Near focus limit
- —
- Far focus limit
- —
- Total depth of field
- —
- In front of subject
- —
- Behind subject
- —
- Hyperfocal distance
- —
The green band is the zone that will look acceptably sharp.
How it works
This calculator uses the classic thin-lens depth of field formulas. First it works out the
hyperfocal distance H = f² / (N × c) + f, where f is the focal
length in millimetres, N the f-number and c the circle of confusion
for your sensor. With the subject distance s it then computes the near limit
Dn = s(H − f) / (H + s − 2f) and the far limit
Df = s(H − f) / (H − s). When the subject sits at or beyond the hyperfocal
distance the far limit becomes infinity, so everything from the near limit outwards is
acceptably sharp.
The circle of confusion is what "acceptably sharp" means in numbers — how large a blurred point can be on the sensor before your eye notices it in a normal-size print. The presets follow the widely used DOFMaster convention (0.030 mm for full frame, 0.019 mm for Canon APS-C, 0.015 mm for Micro Four Thirds), and you can type your own value if you print big or pixel-peep. Worked example: a 50 mm lens at f/8 on full frame focused at 5 m is sharp from 3.39 m to 9.53 m — 6.14 m of depth — with a hyperfocal distance of 10.47 m.
Depth of field is a perceptual limit, not a hard edge: only the plane you focus on is truly sharp. Results use the standard thin-lens approximation and the circle-of-confusion value for the chosen sensor, so they are a planning guide rather than a measurement.
Everything is calculated in your browser with plain JavaScript as you type. Nothing is uploaded, there is no sign-up and there are no ads.
Frequently asked questions
How is depth of field calculated?
This tool uses the standard thin-lens formulas. The hyperfocal distance is H = f² / (N × c) + f, where f is the focal length in millimetres, N the f-number and c the circle of confusion. From the subject distance s the near limit is Dn = s(H − f) / (H + s − 2f) and the far limit is Df = s(H − f) / (H − s). For example a 50 mm lens at f/8 on full frame focused at 5 m is sharp from 3.39 m to 9.53 m, with a hyperfocal distance of 10.47 m.
What circle of confusion should I use?
The circle of confusion is the largest blur spot that still looks sharp in a normal-size print. The presets follow the widely used DOFMaster convention: 0.030 mm for full frame 35 mm, 0.020 mm for 1.5× APS-C, 0.019 mm for Canon 1.6× APS-C, 0.015 mm for Micro Four Thirds and 0.011 mm for 1-inch sensors. If you print very large or inspect at 100%, choose the custom option and enter a smaller value, and depth of field shrinks accordingly.
Why does the far limit sometimes say infinity?
When you focus at or beyond the hyperfocal distance, the far limit of acceptable sharpness extends to infinity, so everything from the near limit outwards looks sharp. That is why landscape photographers focus at the hyperfocal distance: at 50 mm and f/8 on full frame, focusing at 10.47 m keeps everything from about 5.2 m to infinity acceptably sharp.