What will actually be sharp

Near limit, far limit, and where the hyperfocal distance falls — with the sharp zone drawn to scale. Move a slider and watch it change.

HomePhotography › Depth of Field

Depth of field for your setup

Sets the sharpness standard. Lower is stricter.
metres

Nothing leaves this device

The formulas, and what they assume

H = f² / (N · c) + f
near = s(H − f) / (H + s − 2f)
far = s(H − f) / (H − s)

Where f is focal length, N the f-number, c the circle of confusion and s the focus distance, all in millimetres. When s reaches H the far denominator hits zero and the far limit becomes genuinely infinite — that is the definition of the hyperfocal distance, not a rounding artefact.

You will see a simpler-looking pair quoted elsewhere — H·s/(H ± (s − f)). It agrees with the above to within a millimetre or two at ordinary distances, but it is not consistent with the hyperfocal distance it is paired with: focus exactly at H and it reports a far limit of a couple of kilometres instead of infinity. We use the textbook pair.

The assumption that matters is the circle of confusion. It encodes a viewing condition — roughly an 8×10 print at arm's length, seen by someone with normal eyesight. Depth of field is not a property of the lens alone; it is a property of the lens and how closely the result will be examined. Inspecting a 100% crop on a large monitor is a far harsher test than any print, and under it the sharp zone is perhaps half what the default suggests. Halve the circle of confusion to model that.

What this does not model: diffraction, which softens the whole frame at small apertures and can make f/22 less sharp everywhere than f/11 is at its limits; field curvature; focus shift as you stop down; and the pupil magnification of the actual lens design, which matters at close range.

Reading the result

The bar shows the sharp zone against distance from the camera, with the focus point marked. The split beneath it shows how the depth divides in front of and behind the subject.

That split is worth watching, because the familiar rule — a third in front, two thirds behind — is only true at one particular distance for any given lens and aperture. Close in it approaches an even split; far out, nearly all the depth is behind the subject. Focusing on the eyes of a portrait at f/1.4 and expecting a third of the depth to fall in front of them is how the ears come out sharp and the eyes do not.

Three things that surprise people

Sensor size is not really the variable. A smaller sensor appears to give more depth of field, but only because you use a shorter lens to get the same framing. Compare a 50mm at f/2.8 on full frame with a 50mm at f/2.8 on Micro Four Thirds at the same distance and the depth of field is nearly identical — the framing is what changed. Match the framing and the smaller format genuinely does give more depth, by about the crop factor in stops.

Stopping down has a floor. Past roughly f/11 on full frame, diffraction starts taking away more sharpness than depth of field adds. The numbers here keep improving as you stop down because the model does not include diffraction; your pictures will not. This is exactly the situation focus stacking exists for.

Hyperfocal focusing is a gamble at wide apertures. It delivers "acceptably sharp" at both extremes by definition — acceptable by the circle of confusion you chose. If you intend to print large, focusing at the hyperfocal distance puts infinity right at the edge of tolerance. Landscape photographers who care about distant detail often focus somewhat beyond it and accept a nearer near-limit.

Related tools

The focus stacking planner uses this same engine to work out how many frames cover a range that one exposure cannot. The field of view simulator answers the framing half of the question. For the aperture's effect on exposure rather than sharpness, see the exposure comparator.

Questions people actually ask

Why does my camera's depth-of-field scale disagree with this?

Lens barrel scales were engraved for a coarser standard than most people apply today — often a circle of confusion of 0.033mm on full frame against the 0.029mm used here, and sometimes coarser still on older lenses. They also cannot know what you intend to do with the picture. Set the circle of confusion to match the scale and the two will agree.

What circle of confusion should I actually use?

The default — the sensor diagonal divided by 1500 — assumes a moderate print viewed at a normal distance. If you routinely check focus at 100% on a large monitor, halve it. If you are shooting for the web at 1200 pixels wide, you can afford to double it. There is no single right answer, which is precisely why it is an input rather than a constant.

Is depth of field really one third in front and two thirds behind?

Only at one distance, for any given lens and aperture. The split moves with focus distance: close to the lens it approaches even, and far away almost all the depth falls behind the subject. The bar on this page shows the real split for your settings rather than repeating the rule.

Does a full-frame camera have less depth of field than a crop sensor?

Not at the same focal length, distance and aperture — there the difference is small. It has less depth of field at the same framing, because getting the same framing on the larger sensor needs a longer lens. Roughly, matching framing costs you the crop factor in stops: full frame at f/2.8 looks about like Micro Four Thirds at f/1.4.

Why does the far limit jump to infinity?

Because it genuinely becomes infinite once you focus at or beyond the hyperfocal distance. It is not a display limit or an overflow — the far denominator in the formula reaches zero exactly there.

Can I trust these numbers for macro work?

Treat them as indicative. Above about 1:10 magnification the thin-lens approximation these formulas rest on starts to drift, and the real answer depends on the lens's pupil magnification and whether it focuses internally — neither of which manufacturers publish. The page warns you when you enter that territory.