Home · Everyday · Tech, Text & Media · Depth of Field Calculator
Depth of Field Calculator
Calculates near and far depth-of-field limits and the hyperfocal distance from focal length, aperture and focus distance.
What this calculator does
Calculates near and far depth-of-field limits and the hyperfocal distance from focal length, aperture and focus distance. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
Working in millimetres, the hyperfocal distance is H = f²/(N·c) + f, where f is focal length, N the f-number and c the acceptable circle of confusion (0.029 mm default, the usual full-frame value). Near and far limits are Dn = s(H−f)/(H+s−2f) and Df = s(H−f)/(H−s) with focus distance s in millimetres, converted back to metres; depth of field is Df − Dn.
The far-limit formula needs s < H; focus at or beyond the hyperfocal distance and the far limit runs to infinity. Depth of field also depends on the chosen c, which is a sharpness convention tied to sensor size and viewing conditions — smaller sensors typically use c ≈ 0.019 mm (APS-C) or 0.015 mm (Micro Four Thirds), giving deeper apparent sharpness for the same framing.
Worked example
With the example inputs this page opens with (focal length (mm) 50, aperture (f-number) 1.8, focus distance (m) 3, circle of confusion (mm) 0.029), the result is 0.371 m — total depth of field. Computed from the inputs on this page with the formula below — change any figure and every result updates.
Quick reference
| Aperture (f-number) | Total depth of field | Hyperfocal distance | Near limit | Far limit |
|---|---|---|---|---|
| 1.4 | 0.288109 | 61.626355 | 2.862847 | 3.150956 |
| 1.8 | 0.370984 | 47.94272 | 2.825934 | 3.196917 |
| 2.8 | 0.580223 | 30.838177 | 2.737686 | 3.317909 |
| 4 | 0.836961 | 21.601724 | 2.638801 | 3.475762 |
| 5.6 | 1.193625 | 15.444089 | 2.517556 | 3.711181 |
| 8 | 1.775634 | 10.825862 | 2.355232 | 4.130866 |
| 11 | 2.631363 | 7.886991 | 2.179567 | 4.81093 |
| 16 | 4.691542 | 5.437931 | 1.938586 | 6.630127 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
What is the hyperfocal distance used for?
Focusing at the hyperfocal distance makes everything from half that distance to infinity acceptably sharp — the landscape photographer's way to maximise depth of field.
How does the Depth of Field Calculator work?
Calculates near and far depth-of-field limits and the hyperfocal distance from focal length, aperture and focus distance. Focal length · Aperture · Focus distance · Circle of confusion → Depth of field. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Depth of Field Calculator need?
Focal length · Aperture · Focus distance · Circle of confusion → Depth of field. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Depth of Field Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.