Home/Tools/Depth of field
Free tool · Nothing uploaded

Depth of field calculator

Tell it the sensor, the focal length, the f-number and how far away your subject is. It returns the near limit, the far limit, the total depth, and the hyperfocal distance — with the formula written out underneath, so you can check it.

Depth of field · live
Circle of confusion: 0.029 mm
mm
m
Near limit
Total depth of field
Far limit
Hyperfocal distance
Focus here for infinity
The sharp zone, drawn to scale

How this is calculated

Three standard geometric-optics formulas, in millimetres, where f is focal length, N is the f-number, c is the circle of confusion and s is the focus distance measured from the lens:

QuantityFormula
Hyperfocal distance HH = f² / (N · c) + f
Near limits (H − f) / (H + s − 2f)
Far limits (H − f) / (H − s)  — infinite when s ≥ H

These describe a thin lens focused on a flat subject. Real lenses have thickness, internal focusing shifts the effective focal length, and macro distances need a magnification correction — so treat the last few percent as indicative. At normal shooting distances the error is far smaller than the disagreement over what "acceptably sharp" means in the first place.

The number that decides everything

Depth of field is not a physical edge. Nothing changes at the near limit; blur just grows continuously as you move away from the plane of focus. The limits exist because someone picked a threshold — the circle of confusion — for how large a blur spot may be before a viewer stops calling it sharp.

The usual convention is the sensor diagonal divided by 1500, which assumes an 8×10 inch print viewed at about 25 cm by someone with normal vision. That gives 0.029 mm on full frame. If your work ends up as a 40-inch print or gets inspected at 100% on a 5K monitor, that threshold is too generous — switch the standard above to strict and watch every number shrink.

Worth knowing

Two calculators can disagree by 30% on the same scene and both be right. They picked different circles of confusion. Any depth-of-field number without a stated sharpness standard is half an answer.

Depth of field on a phone

Set the format to iPhone main · 1× and try it: at f/1.78, focused three metres away, effectively everything from about a metre to the horizon is sharp. That is not a defect. The main camera's real focal length is around 6.8 mm — the "24 mm" is the full-frame equivalent, and depth of field follows the real number.

This is why phone portrait modes fake background blur in software: the optics cannot produce it. It is also why Lucid Camera has no aperture control at all. iPhone lenses have a fixed physical aperture, so a simulated f-stop dial would be a dial that changes nothing. We removed ours rather than pretend.

To get genuinely shallow depth of field on a phone, work the two variables you actually control: get much closer to your subject, and put much more distance between the subject and the background.

Common questions

What is depth of field, exactly?

The range of distances that still looks acceptably sharp in the finished image. Only one plane is truly in focus. Everything else is blurred by some amount, and depth of field is simply the zone where that blur stays under the threshold you chose.

Do I measure focus distance from the sensor or the lens?

This calculator measures from the lens. Camera focus scales usually measure from the sensor plane, marked with a ⊖ symbol on the body. At portrait and landscape distances the difference is negligible; in macro work it matters, and so does the magnification correction that this calculator does not apply.

Why does my far limit say infinity?

Because your focus distance has reached or passed the hyperfocal distance. From there, everything from roughly half the hyperfocal distance to the horizon falls inside the sharp zone, and there is no far limit to report.

Is the one-third / two-thirds rule true?

At one distance only. Close up, the split is nearly even. At moderate distances it lands near one-third in front. Approaching the hyperfocal distance, nearly all the depth falls behind the subject. The split readout above shows what your actual settings produce.

Does a smaller sensor really give more depth of field?

At the same framing and f-number, yes — noticeably. The smaller sensor demands a shorter focal length to frame the same scene, and depth of field is far more sensitive to focal length than to the smaller circle of confusion working the other way.

Does this work for video?

Yes. Depth of field is a property of the optics, not the recording format. Use your actual focal length and f-number as normal. If you are also working out shutter speed for motion blur, the shutter angle calculator handles that side.

Related tools

Lucid Camera app icon

The camera that refuses to fake it.

Lucid is a manual camera for iPhone with no simulated aperture, a viewfinder that shows exactly what saves, and focus peaking so you can see the sharp zone instead of calculating it.

Get it on the App Store$4.99