Depth of Field Calculator
Calculators · Added
A lens focuses exactly one plane; everything else is a blur circle, and depth of field is the range whose blur is small enough that a viewer calls it sharp. That makes it a judgement about viewing as much as a property of the lens, so this states the assumption it uses rather than hiding it, and reports the hyperfocal distance and the diffraction limit alongside the near and far edges.
How to use the depth of field calculator
- 1Pick the sensor or film format — it sets the circle of confusion, which is what decides how much blur still counts as sharp.
- 2Enter the focal length in millimetres and the aperture as an f-number.
- 3Enter the subject distance, in metres or feet.
- 4For pixel-level scrutiny rather than a print, halve the circle of confusion in the optional field and read the much narrower result.
Examples
A portrait on full frame
- Input
- 85 mm at f/1.8, subject 2 m away
- Result
- Sharp from 1.97 m to 2.03 m — about 5.5 cm in total
At that depth an eye is sharp and the ear behind it is not, which is the reason for focusing on the near eye.
A landscape set to the hyperfocal distance
- Input
- 24 mm at f/11 on full frame
- Result
- Hyperfocal 1.84 m — focus there and 0.92 m to infinity is sharp
Focusing on the horizon instead throws away everything from 0.92 m to 1.84 m for no gain at all.
The same framing on a smaller sensor
- Input
- 42 mm at f/1.8 on Micro Four Thirds, subject 2 m away
- Result
- Sharp over about 11 cm — twice the depth of the full-frame shot
Same framing and same f-number, twice the depth: this is what people mean by a format having more depth of field.
About the depth of field calculator
The formulas, and what they assume
Three expressions do all the work. The hyperfocal distance is f squared over the product of the f-number and the circle of confusion, plus the focal length. The near limit is s(H - f) / (H + s - 2f) and the far limit is s(H - f) / (H - s), where s is the subject distance and H the hyperfocal distance. When s reaches H the denominator of the far limit hits zero and the sharp zone runs to infinity, which is the whole point of the hyperfocal idea.
These are thin-lens results with distances measured from the front principal plane. They ignore pupil magnification, which matters for retrofocus wide angles and for telephotos used close up, and they ignore the fact that at high magnification the effective aperture is smaller than the marked one because the lens is racked out. Both effects shift real depth of field slightly rather than changing its character, and the tool flags the second when magnification gets high enough to notice.
Hyperfocal focusing, and when not to use it
Focusing at the hyperfocal distance gives the greatest range that meets the sharpness criterion, running from half that distance out to infinity. For a landscape with foreground interest, it is the setting that puts the most of the scene inside the acceptable range, and it is why old manual lenses carried depth-of-field scales — you set the far mark for your aperture on the infinity symbol and the near mark told you where sharpness began.
It is a compromise, though, and worth understanding as one. Nothing is at its sharpest at the hyperfocal distance: the plane of exact focus is the only truly sharp one, and everything else is inside a tolerance. If a specific subject matters more than the scene, focus on it. Some landscape photographers deliberately focus a little beyond the hyperfocal distance to make sure the horizon is genuinely crisp rather than merely acceptable.
Reading the numbers honestly
Depth of field is not a hard edge. Blur grows continuously either side of the focus plane, and the near and far limits are simply where it crosses a threshold someone chose. A subject a centimetre outside the stated range is not visibly less sharp than one a centimetre inside it. Treat the figures as a guide to how much margin you have, not as a boundary between sharp and unsharp.
The one number here that is not a convention is the diffraction limit. That is physics: the Airy disk diameter is set by the wavelength of light and the f-number, and no amount of resolution or processing recovers detail it has smeared. Everything else on this page rests on an assumption about viewing, and is only as true as that assumption is.
Frequently asked questions
What is the circle of confusion, and why does the number matter so much?
Why is the sharp zone not one third in front of the subject?
Does stopping down always make more of the picture sharp?
Do smaller sensors really have more depth of field?
Why does the depth of field on my images look shallower than this says?
Related tools
Aspect Ratio Calculator
Calculators
Resize without distortion, identify the ratio of any size, or fit an image inside a box.
Screen PPI Calculator
Calculators
Pixel density, panel size and viewing distance from a resolution and a diagonal.
Image Metadata Viewer
Image Tools
See the EXIF data hidden in a photo, including whether it records where it was taken.
AC BTU Calculator
Calculators
Size an air conditioner for a room, with the adjustments for sun, ceiling height, occupants and kitchens.