Depth of field calculator
Find the near and far limits of sharp focus for a lens setting.
Try it
Inputs
Result
The result appears here as you type.
About Depth of field calculator
A depth of field calculator shows the zone of sharp focus in front of and behind the subject. Depth of field depends on the focal length, the aperture, the distance to the subject and the size of the circle of confusion, which describes how much a blur spot is allowed to be before it looks out of focus. Enter these values and the calculator returns the near and far limits and the total depth.
The circle of confusion depends on the sensor size and the print or screen size, so the default value suits a full-frame camera viewed at normal size. Smaller sensors need smaller values, and very large prints show less depth.
How to use Depth of field calculator
- Enter the focal length of the lens in millimetres.
- Enter the aperture as an f-number.
- Enter the distance from the camera to the subject in metres.
- Enter the circle of confusion for your sensor, or keep the default for full frame.
- Read the near and far limits and the total depth of field.
Hyperfocal distance
The hyperfocal distance is the focus distance at which everything from half that distance to infinity looks sharp. It is found from the focal length squared divided by the aperture times the circle of confusion, plus the focal length. Focusing at the hyperfocal distance maximises the depth of field for a landscape.
The near and far limits come from the subject distance and the hyperfocal distance. When the subject is closer than the hyperfocal distance, the far limit is at infinity.
Practical control
A wide aperture gives shallow depth, which isolates the subject. A narrow aperture gives more depth but needs more light or a slower shutter. Longer focal lengths reduce depth at the same distance, which is why telephoto portraits blur backgrounds well.
Distance has a strong effect. Moving the camera back increases depth of field, even at the same aperture. Check the result at the shot you plan to take.
Frequently asked questions
What is a circle of confusion?
It is the largest blur spot that still looks sharp to the eye at a given print size. The standard full-frame value is about 0.03 mm.
Does sensor size matter?
Yes. Smaller sensors give more depth at the same focal length and aperture, so the circle of confusion must be scaled to match.
Is the calculation exact?
It uses standard formulas. Real images also depend on lens quality, focus accuracy and viewing distance.
Related tools
Tools that pair well with this one.
General Calculators
Percentage Calculator
Work out percentages, increases and decreases.
General Calculators
Average Calculator
Find the mean of a list of numbers.
General Calculators
Ratio Calculator
Simplify and compare ratios.
General Calculators
Proportion Calculator
Solve for a missing value in a proportion.