Camera Math Calculators

Understanding depth of field

Depth of field is the range of distance in a scene that looks acceptably sharp in a photograph. Understanding what controls it — and why — lets you work with intention rather than guesswork, whether you're trying to isolate a subject or render an entire landscape corner to corner.

What depth of field actually is

Lenses focus precisely at one distance. Everything else projects onto the sensor not as a perfect point but as a small disk called a circle of confusion. When that disk is small enough — smaller than your eye can resolve at normal viewing distance from a normal print — it still looks sharp. The range of distances over which the circle of confusion stays below that threshold is your depth of field.

That threshold is not a physical law; it depends on how large you print, how close you look, and how sharp your vision is. The commonly used standard for a full-frame sensor is about 0.029 mm, derived from an 8×10 print viewed at 10 inches with 20/20 vision. Everything else — the f-number, the focal length, the focus distance — changes DoF by changing the size of those circles of confusion.

The four controls

Aperture (f-number)

This is the most direct control. A wider aperture (smaller f-number, like f/1.8) produces a shallower depth of field because the cone of light converging on the sensor is steeper — subjects even slightly out of focus cast noticeably larger circles. Stopping down to f/11 narrows that cone, bringing more of the scene into the acceptable range. You can explore any combination instantly with the depth of field calculator.

Focal length

Longer lenses produce shallower depth of field at the same aperture — magnification amplifies out-of-focus blur circles. The catch is that if you back up with a telephoto to match the framing of a wide lens, the greater focus distance partly counteracts the focal length effect. In practice focal length still matters — a telephoto compresses depth of field at any given framing — but focus distance is always part of the equation.

Focus distance

The closer you focus, the shallower the depth of field. This is why macro photography is so demanding — at 1:1 reproduction the depth of field can be a few millimeters even at f/16. At longer focus distances DoF expands rapidly, eventually growing without bound as you approach hyperfocal distance (more on that below). For portraits, moving closer to your subject sharpens the subject-to-background separation even without changing aperture.

Sensor size and circle of confusion

Sensor size is the less obvious lever, but it matters because the circle of confusion threshold scales with the sensor. A Micro Four Thirds sensor is physically half the linear dimensions of a full-frame sensor, so its acceptable blur disk is about half the size — roughly 0.015 mm versus 0.029 mm for full frame. A lens that keeps blur below the full-frame threshold may exceed the MFT threshold, making the image look softer at the same f-number. The practical result: a given lens and aperture combination produces more apparent depth of field on a smaller sensor. A 25 mm f/1.8 lens on MFT behaves more like a 50 mm f/3.6 lens on full frame in terms of background blur. This is the crop factor's hidden impact on bokeh — and you can run the numbers with the crop factor calculator.

Why the 1/3-in-front, 2/3-behind rule is mostly wrong

You've probably read that depth of field extends one-third in front of your focus point and two-thirds behind. This is true at one specific distance: somewhere in the moderate range for a given lens. At close focus distances, DoF is nearly equal on both sides — almost symmetrical. At very long distances, the rear DoF stretches toward infinity while the front DoF grows much more slowly. The "rule" approaches the 1/3–2/3 split only at a focus distance around one-third of the hyperfocal distance — a narrow band, not the universal constant it's often treated as. When precision matters, use the actual formulas or a calculator.

The hyperfocal distance

The hyperfocal distance H is the focus distance at which depth of field extends from half that distance all the way to infinity. It is the sharpest possible setting for maximising depth of field, and it's defined by:

H = f² / (N × c) + f

where f is focal length in mm, N is the f-number, and c is the circle of confusion in mm. (The trailing + f is small enough to ignore in practice — many sources omit it.) Once you know H, the near and far limits of depth of field are:

near limit = (H × d) / (H + d − f)    far limit = (H × d) / (H − d + f)

where d is your focus distance. When d = H, the far limit denominator goes to zero, meaning far depth of field reaches infinity. Landscape photographers who want everything sharp — foreground rocks to distant mountains — should focus at the hyperfocal distance, not at infinity. Focusing at infinity wastes depth of field in front of your subject and lets the near limit push farther back than necessary. The hyperfocal distance calculator handles this for any lens, aperture, and sensor format combination.

Practical recipes

Portraits: isolate your subject

Shallow depth of field separates a subject cleanly from a busy background. Use a wide aperture (f/1.4–f/2.8), a longer focal length (85–135 mm on full frame), and move close enough that the background is at least three to four times farther than the focus distance. Each change expands the circles of confusion behind your subject, throwing the background further out of the acceptable zone. A full-frame or APS-C body delivers more background blur than a phone camera at the same framing, because the larger sensor's looser circle of confusion threshold permits more blur before an element reads as sharp.

Landscapes: front to back sharpness

Maximise depth of field by combining a moderate-to-small aperture (f/8–f/11 is a good starting point), a wide focal length (14–35 mm on full frame), and hyperfocal focusing rather than focusing at infinity. Focus at the hyperfocal distance for your chosen focal length and aperture, and everything from half that distance onward will render acceptably sharp. The wide lens helps because a shorter focal length produces a shorter hyperfocal distance, so more of the foreground falls inside the depth of field. Pre-compute the hyperfocal distance at home and tape it to your lens barrel if you're shooting in the dark — there's nothing worse than discovering at sunrise that your foreground rocks are soft.

Diffraction: the cost of stopping down too far

Depth of field expands as you stop down, but it doesn't improve forever. At very small apertures — typically f/16 and beyond on full frame, earlier on smaller sensors — diffraction becomes the dominant limit on sharpness. Light bending around the aperture blades smears every point in the image, not just out-of-focus ones. The result is a soft-looking frame even though technically nothing is out of focus. Stopping down from f/11 to f/22 might seem like it should make a landscape sharper — it rarely does, and often makes it worse. The practical answer is to stay at f/8–f/11, use hyperfocal focusing to recover depth, and rely on focus stacking only if you genuinely need infinite depth of field in close-foreground scenes.

The quick mental model: DoF is controlled by four things — aperture, focal length, focus distance, and sensor size — and all four work by changing the size of blur circles. The 1/3–2/3 rule only holds near moderate distances. Hyperfocal focusing squeezes the most depth from any aperture. And stopping past f/11–f/16 costs sharpness to diffraction. When the math matters, use the calculators below.