Skip to content
ToolBoxGeniehome

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.

Sets the circle of confusion, which is what decides how much counts as sharp.

mm

Enter 2.8 for f/2.8.

m
mm

Leave blank for the format default. Halve it to model pixel-level scrutiny rather than a print.

How to use the depth of field calculator

  1. 1Pick the sensor or film format — it sets the circle of confusion, which is what decides how much blur still counts as sharp.
  2. 2Enter the focal length in millimetres and the aperture as an f-number.
  3. 3Enter the subject distance, in metres or feet.
  4. 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?
It is the largest blur spot that still reads as a point rather than a smudge, and every depth-of-field figure is built on it. There is no physically correct value, because it depends on how big the image is displayed and how close the viewer stands. The convention used here is the sensor diagonal divided by 1500, which assumes a print viewed at its own diagonal with normal eyesight — the same convention behind the distance scales engraved on manual lenses. Change the assumption and every number changes with it, which is why the field is exposed rather than buried.
Why is the sharp zone not one third in front of the subject?
Because that rule is only true at one particular distance, and it is not the one you are usually shooting at. The proportion in front rises from near half at macro distances to a vanishing fraction as the subject approaches the hyperfocal distance, where the far limit runs to infinity and essentially all the depth is behind. The tool reports the actual split for the settings entered, which is more useful than a proportion that happens to hold in the middle of the range.
Does stopping down always make more of the picture sharp?
Up to a point, then it reverses. A smaller aperture extends depth of field, but it also widens the Airy disk that diffraction produces, and once that disk is bigger than the circle of confusion the whole frame softens — including the plane you focused on. The crossover aperture is reported in the results, and it is smaller on a smaller sensor: a phone camera is diffraction-limited by about f/4 while medium format is not until f/22. This is why landscape photographers stop at f/11 rather than winding on to f/32.
Do smaller sensors really have more depth of field?
For the same framing and the same f-number, yes, and by roughly the crop factor. Getting the same field of view from a smaller sensor needs a shorter focal length, and depth of field grows quickly as focal length falls. The complete comparison also scales the circle of confusion down with the sensor, which claws a little back, but the net effect is unmissable: a phone at f/1.8 has enormous depth compared with full frame at f/1.8, which is exactly why phones simulate background blur in software.
Why does the depth of field on my images look shallower than this says?
Almost certainly because you are inspecting the file at 100% on a screen rather than looking at a print. The standard circle of confusion assumes an enlargement to a print viewed at its diagonal; examining a 45-megapixel file pixel by pixel is equivalent to a print several metres wide, and at that scrutiny the acceptable blur is a fraction of the usual figure. Enter a smaller circle of confusion — a third or a quarter of the default — to get numbers that match what pixel-peeping shows.