Depth of Field Calculator
Depth of field uses the hyperfocal distance H = f² ÷ (N × c) + f. A 50 mm lens at f/8 on full frame (circle of confusion 0.03 mm) focused at 10 m has H = 10.47 m, a near limit of 5.11 m and a far limit of 223.21 m, so about 218.10 m is acceptably sharp.
How to use
- Choose your sensor size. The circle of confusion fills in as the sensor diagonal ÷ 1500; change it if you want a stricter or looser standard.
- Enter the real focal length of the lens (not the full-frame equivalent) and the f-number.
- Enter the focus distance in metres or feet. The bar shows where sharpness starts and ends.
How it works
Hyperfocal distance: H = f² ÷ (N × c) + f, where f is focal length, N is the f-number and c is the circle of confusion.
Near limit = s × (H − f) ÷ (H + s − 2f). Far limit = s × (H − f) ÷ (H − s); when the focus distance s reaches H, the far limit is infinity.
Total depth of field = far limit − near limit. These are thin-lens formulas measured from the lens; real lenses (especially macro and zoom lenses with focus breathing) can differ slightly.
FAQ
What circle of confusion should I use?
The common convention is the sensor diagonal ÷ 1500, which gives about 0.029 mm for full frame (often rounded to 0.03) and 0.019 mm for APS-C. It assumes an 8 × 10 inch print viewed from about 25 cm. For large prints or pixel-level sharpness use a smaller value, such as half.
What is the hyperfocal distance?
It is the closest focus distance at which everything out to infinity is acceptably sharp. Focus there and sharpness runs from about half that distance to infinity, which is useful for landscapes.
Should I enter the equivalent focal length for my phone or APS-C camera?
No. Enter the real focal length printed on the lens and choose the matching sensor. The smaller circle of confusion of a small sensor is what accounts for the crop.
Why is there more sharpness behind the subject than in front?
Depth of field is asymmetric: at normal distances roughly one third falls in front of the focus point and two thirds behind. Close up, at macro distances, it becomes nearly even.
Does this work for macro?
Only roughly. At high magnification the thin-lens model and the measuring point of the distance both matter, so use a dedicated macro calculation based on magnification.