Depth of Field Calculator
Free depth of field calculator. Enter sensor format, focal length, f-number and focus distance to get the near limit, far limit and total depth of field.
Depth of Field Calculator
Background.
This depth of field calculator returns the near limit, the far limit and the total depth of the zone that will look acceptably sharp in your photograph, from four things you already know: the sensor in your camera, the focal length engraved on the lens, the f-number you are shooting at, and how far away you focused. It also reports the circle of confusion it used, because that single assumption drives every other number and most depth of field calculators hide it.
Depth of field is not a physical boundary. Exactly one plane in the scene is in focus; everything else is a disc rather than a point on the sensor. What we call "depth of field" is a tolerance: the range of distances over which that disc stays smaller than a diameter a viewer will not notice. That diameter is the circle of confusion, and it is a choice. Choose a looser one and your depth of field doubles without a single physical thing changing. This page uses the convention published by Carl Zeiss in their technical article on depth of field and bokeh — the circle of confusion is the sensor diagonal divided by 1500, which works out at about 0.029 mm on full frame and matches the 0.03 mm figure the industry has used since the film era. A second, stricter option divides the diagonal by 3000, which Zeiss calls the strictest sensible requirement, for when you intend to inspect the file at 100 % or print very large.
The sensor format matters twice over, and the two effects pull in the same direction. A smaller sensor has a smaller diagonal, so it gets a smaller circle of confusion — a Micro Four Thirds frame is held to 0.0144 mm where full frame is held to 0.0288 mm, because the same print requires twice the enlargement. That alone would halve depth of field. But a smaller sensor also needs a shorter focal length to frame the same subject, and depth of field grows with the inverse square of focal length. The second effect wins comfortably, which is why phone and Micro Four Thirds cameras appear to have limitless depth of field and medium format appears to have almost none. Enter the actual focal length on your lens barrel here, not the 35 mm equivalent: a 25 mm Micro Four Thirds lens is 25 mm, and the calculator handles the format difference through the sensor selection.
The two other levers behave in familiar ways but not in linear ones. Stopping down from f/2.8 to f/5.6 halves the hyperfocal distance and roughly doubles depth of field near the subject, but the exact near and far limits move asymmetrically. Depth of field also grows roughly with the square of the focus distance, so the zone that measures a few millimetres at a macro working distance measures metres across a landscape at the same aperture. And the split is never symmetrical: at the default settings on this page, 36 % of the sharp zone sits in front of the subject and 64 % behind, which is where the familiar "one third in front" rule of thumb comes from — but that ratio is only true near this particular relationship between focus distance and hyperfocal distance, tending to 50/50 in macro work and to nearly all-behind as the focus distance approaches the hyperfocal point.
When the focus distance reaches the hyperfocal distance the far limit does not become large — it becomes infinite, and this calculator says so in words instead of returning a misleadingly precise huge number. Below the widget you will find the exact equations, a worked 50 mm f/8 example computed by hand, the derivation of why the circle of confusion is a viewing-conditions decision rather than an optical constant, what the thin-lens model gets wrong about real lenses with internal focusing, and how to translate a depth of field figure into a practical focusing decision on a landscape, a portrait or a product shot.
What is depth of field calculator?
Depth of field is the range of object distances that a lens renders with a blur circle small enough to be accepted as sharp under stated viewing conditions. Three quantities define it. The first is the circle of confusion, c: the largest blur diameter on the sensor that the viewer will not resolve. It is derived from human visual acuity, roughly two arc minutes, projected back through an assumed enlargement and viewing distance — the standard result is that c should be about 1/1500 of the frame diagonal for a print viewed at its diagonal, or 1/3000 for critical inspection. The second is the hyperfocal distance, H = f²/(N·c) + f, which is the focus distance at which the far limit of sharpness first reaches infinity. The third is the focus distance itself, s, measured from the lens front principal plane. From these, the near and far limits are Dn = s(H − f)/(H + s − 2f) and Df = s(H − f)/(H − s). Notice that both collapse neatly at s = H: the near limit becomes exactly H/2 and the far limit becomes infinite, which is the origin of the landscape photographer's rule that focusing at the hyperfocal distance yields sharpness from half that distance to the horizon. Everything here is a thin-lens, symmetric-pupil approximation with distances measured from a principal plane you cannot see and manufacturers rarely publish. It is accurate to well within the precision of a focus scale for normal subject distances, and it degrades in two situations: at high magnification, where the pupil magnification of the lens starts to matter, and on modern internally-focusing lenses, whose focal length changes as they focus closer. Depth of field is also not the same thing as depth of focus, which is the tolerance on the image side, inside the camera, and depends only on the f-number and the circle of confusion — not on focal length at all.
How to use this calculator.
- Pick your sensor format. This sets the circle of confusion and is the single most consequential choice on the page. If your camera is not listed, choose Custom and enter the imaging-area width and height in millimetres from your camera's own specification sheet.
- Enter the focal length actually engraved on the lens, in millimetres — not the 35 mm equivalent. The sensor selection already accounts for the format difference, so entering an equivalent focal length would apply the crop factor twice.
- Enter the working f-number: 8 for f/8, 1.4 for f/1.4. Use the aperture the exposure is actually made at. If you are focusing wide open and stopping down to shoot, the depth of field you get is the one from the taking aperture.
- Enter the focus distance in metres, measured from the camera to the plane you focused on. Convert feet by multiplying by 0.3048 (10 ft = 3.05 m). It must be larger than the focal length or no real image is formed.
- Choose the sharpness standard. Use Standard for prints and screen viewing at normal sizes; use Critical if you intend to pixel-peep at 100 % or print beyond about A2, where the 1500 divisor stops being conservative enough.
- Read the total depth of field first. If it says "infinite", your focus distance has reached the hyperfocal distance and everything from the near limit to the horizon is within tolerance — check the hyperfocal distance calculator to find the shortest focus distance that achieves it.
- Compare the depth in front of the subject against the total depth to see where the sharp zone actually sits. In portrait work the answer is usually "less in front than you think", which is why focusing on the near eye rather than the face matters at wide apertures.
- Treat the result as a planning tool with a tolerance, not a guarantee. Focus accuracy, diffraction at very small apertures, subject movement and lens field curvature all eat into the theoretical figure.
The formula.
Work in millimetres throughout. First the circle of confusion:
c = sensor diagonal / 1500 (standard) c = sensor diagonal / 3000 (critical)
For full frame the diagonal is √(36² + 24²) = 43.2666 mm, so c = 0.028844 mm standard, 0.014422 mm critical. Carl Zeiss's own depth of field charts are labelled "Format 24 x 36, z = 0.029 mm, D/1500", which is the same number.
Next the hyperfocal distance:
H = f² / (N · c) + f
Zeiss give this as Dist_hyperfocal = f'²/(z'·k) with z' the circle of confusion and k the f-number; the trailing + f is the exact form and is negligible except at macro distances. The physical meaning is neat: at the hyperfocal distance the object-side blur circle for an infinitely distant point is exactly the diameter of the entrance pupil, f/N.
Then the limits:
Dn = s (H − f) / (H + s − 2f) Df = s (H − f) / (H − s)
These are the exact forms, not the small-aperture approximations that drop the f terms. Two self-checks confirm them. Setting s = H gives Dn = H(H − f)/(2(H − f)) = H/2 exactly — the classic hyperfocal result. And Df diverges precisely at s = H, not slightly before or after, so the transition to an infinite far limit happens at the right place. When H − s ≤ 0 the far limit is genuinely infinite and this calculator returns the word rather than a number, because clamping infinity to a large finite value would misreport the physics.
The scaling laws fall straight out of these expressions. Because H depends on f², depth of field at a fixed distance is roughly inversely proportional to the square of the focal length; because H depends on 1/N, stopping down two stops roughly halves it; and because Dn and Df both scale with s against a fixed H, depth of field grows roughly with the square of the focus distance while s is small compared with H. Sensor size enters only through c, but because a smaller sensor needs a shorter lens for the same framing, the f² term dominates and small formats end up with far more depth of field at the same f-number and framing.
What the model does not include: diffraction, which softens the whole frame past roughly f/11 on full frame and f/5.6 on Micro Four Thirds and can make a technically deeper zone look worse; field curvature and residual aberrations, which mean the plane of focus is rarely flat; pupil magnification, which shifts the effective aperture at high magnification; and focus breathing on internally-focusing lenses, whose focal length shortens as they focus closer, making the true depth slightly larger than calculated at close range.
A worked example.
A full-frame camera with a 50 mm lens set to f/8, focused on a subject 3.00 m away, using the standard diagonal ÷ 1500 sharpness criterion. The full-frame diagonal is √(36² + 24²) = 43.2666 mm, so the circle of confusion is 43.2666 / 1500 = 0.028844 mm. The hyperfocal distance is H = 50² / (8 × 0.028844) + 50 = 2500 / 0.230755 + 50 = 10,833.99 + 50 = 10,883.99 mm, or 10.88 m. Because the focus distance of 3000 mm is well inside that, the far limit is finite. The near limit is Dn = 3000 × (10,883.99 − 50) / (10,883.99 + 3000 − 100) = 32,501,965 / 13,783.99 = 2357.95 mm, so 2.36 m. The far limit is Df = 3000 × 10,833.99 / (10,883.99 − 3000) = 32,501,965 / 7883.99 = 4122.53 mm, so 4.12 m. Total depth of field is 4.12 − 2.36 = 1.76 m, of which 0.64 m lies in front of the subject and 1.12 m behind — 36 % in front, 64 % behind, close to but not exactly the familiar one-third rule. Two changes make the point about scaling. Open up to f/2.8 and the hyperfocal distance rises to 31.00 m, the zone shrinks to roughly 2.74 m to 3.32 m around the subject, and total depth collapses from 1.76 m to about 0.58 m. Switch instead to Micro Four Thirds with a 25 mm lens at f/8 — the same framing, since the crop factor is 2.0 — and the circle of confusion halves to 0.014427 mm while the focal length halves as well; the f² term dominates and total depth of field grows to roughly 3.8 m. That is the entire small-sensor depth of field advantage in one comparison, and it is why the sensor selector sits at the top of this page rather than the bottom.
Frequently asked questions.
What circle of confusion does this calculator use, and why does it matter so much?
Why does a smaller sensor give more depth of field if it has a smaller circle of confusion?
Should I enter my actual focal length or the 35 mm equivalent?
Is the sharp zone really one third in front of the subject and two thirds behind?
Why does the far limit say "infinity" instead of a number?
Does diffraction mean I should not just stop down to f/22 for more depth of field?
Where exactly is the focus distance measured from?
How is depth of field different from depth of focus?
Which sensor sizes are included, and why is there no 1-inch preset?
Why do different depth of field calculators disagree with each other?
References& sources.
- [1]Nasse, H. H. (2010). 'Depth of Field and Bokeh.' Carl Zeiss Camera Lens Division. States the circle-of-confusion convention used throughout this calculator: 'A circle of confusion twice as large, 1/1500 of the diagonal, viewed at a visual angle of 2 arc minutes, still provides a satisfying sharpness... this requirement corresponds approximately to the often used 0.03 mm circle of confusion for the 35 mm format', with 1/3000 of the diagonal given as the strictest sensible requirement. The same paper derives the hyperfocal relation Dist = f'²/(z'·k) and notes that the object-side circle of confusion at the hyperfocal distance equals the entrance pupil diameter.
- [2]Canon Inc. EOS R6 Product Manual, Specifications — Image Sensor. Gives the full-frame sensor size as 'Approx. 35.9×23.9 mm', the measured dimension behind the nominal 36 × 24 mm 135-format frame used by this calculator.
- [3]Nikon Corporation. D7500 Online Manual, Technical Notes — Specifications. Gives the Nikon DX sensor as '23.5 × 15.7 mm CMOS sensor' and states that DX focal lengths are 'equivalent to approx. 1.5×' the 35 mm format angle of view, the cross-check used to validate the diagonal-based crop factors in this calculator.
- [4]Canon Inc. EOS R7 Product Manual, Specifications. Gives the Canon APS-C sensor size as 'Approx. 22.3 × 14.8 mm', the dimensions used for the Canon APS-C preset.
- [5]OM Digital Solutions. OM SYSTEM OM-1 Mark II Specifications, Image Sensor. Lists 'Aspect ratio & area 4:3 / 17.3 x 13.0 mm' for the Four Thirds imaging area used by the Micro Four Thirds preset.
- [6]FUJIFILM Corporation. GFX100 II Specifications. Lists the image sensor as '43.8mm×32.9mm GFX 102MP CMOS II HS with primary color filter', the dimensions used for the medium-format preset.
- [7]Ray, S. F. (2002). Applied Photographic Optics: Lenses and Optical Systems for Photography, Film, Video, Electronic and Digital Imaging, 3rd ed. Focal Press. Standard reference for the exact near- and far-limit expressions Dn = s(H − f)/(H + s − 2f) and Df = s(H − f)/(H − s), for the distinction between depth of field and depth of focus, and for the pupil-magnification correction at high magnification.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 590 calculators remain free
- No billing is enabled