Depth of Field Calculator

Total depth of field0.58 m
Near limit2.74 m
Far limit3.32 m
Hyperfocal distance30.84 m
Total depth of field (cm)58.02 cm
How this was calculated
  1. Circle of confusion for a full frame = 0.029 mm.
  2. Hyperfocal distance H = f + f^2 / (N x c) = 50.00 + 2,500.00 / (2.80 x 0.029) = 30,838.18 mm = 30.84 m.
  3. Near limit = 3,000.00 x 30,788.18 / (30,838.18 + 3,000.00 - 100.00) = 2,737.69 mm = 2.74 m.
  4. Far limit = 3,000.00 x 30,788.18 / (30,838.18 - 3,000.00) = 3,317.91 mm = 3.32 m.
  5. Total depth of field = 3.32 - 2.74 = 0.58 m.

A depth of field calculator tells you the exact zone of acceptable sharpness around your focus point, so you know how much of your scene will look sharp before you press the shutter. Enter your focal length, f-number, focus distance, and sensor format, and the calculator returns the near limit, far limit, and total depth of field. For instance, a 50 mm lens at f/2.8 focused at 3 m on full frame is sharp from 2.74 m to 3.32 m, a total depth of field of 0.58 m, with a hyperfocal distance of 30.84 m. A wider setup tells a different story: a 24 mm lens at f/8 focused at 2 m is sharp from 1.11 m to 9.80 m, 8.68 m of depth, because its hyperfocal distance is just 2.51 m. And an 85 mm lens at f/1.8 on APS-C focused at 1.5 m gives just 0.02 m (2.12 cm) of sharpness, from 1.49 m to 1.51 m.

The calculator relies on the hyperfocal distance formula H = f + f^2/(N c), where f is focal length, N the f-number, and c the circle of confusion, the largest blur spot the sensor format tolerates. The circle of confusion depends on sensor size: 0.029 mm for full frame, 0.020 mm for APS-C, 0.015 mm for Micro Four Thirds, and 0.011 mm for 1-inch sensors, because smaller sensors demand tighter blur to look equally sharp at the same print size. Focus at or beyond the hyperfocal distance and the far limit runs to infinity while the near limit sits at half the hyperfocal distance, the landscape photographer's standard trick. This method is the accepted standard for depth of field calculations, and this page shows the formula, step-by-step workings, worked examples, and sources.

Worked examples

50 mm portrait at f/2.8, 3 m

Primary result: 0.58 m — a thin slice of sharpness around the 3 m focus point; everything else melts away. (50 mm · 2.8 · 3 m · Full frame (0.029 mm))

Total depth of field0.58 m
Near limit2.74 m
Far limit3.32 m
Hyperfocal distance30.84 m
Total depth of field (cm)58.02 cm

24 mm landscape at f/8, 2 m

Primary result: 8.68 m — focusing at 2 m with a 2.51 m hyperfocal distance keeps nearly the whole scene sharp. (24 mm · 8 · 2 m · Full frame (0.029 mm))

Total depth of field8.68 m
Near limit1.11 m
Far limit9.80 m
Hyperfocal distance2.51 m
Total depth of field (cm)868.49 cm

85 mm on APS-C at f/1.8, 1.5 m

Primary result: 0.02 m — two centimeters of sharpness: eyelashes in, ears out. (85 mm · 1.8 · 1.5 m · APS-C (0.020 mm))

Total depth of field0.02 m
Near limit1.49 m
Far limit1.51 m
Hyperfocal distance200.78 m
Total depth of field (cm)2.12 cm

The four controls of depth of field

Depth of field is the zone of acceptable sharpness around the focus point, and a depth of field calculator works it out from the hyperfocal distance H = f + f^2/(N c), where f is focal length, N the f-number and c the circle of confusion. The circle of confusion is the largest blur spot the sensor format tolerates, and it depends on sensor size: 0.029 mm for full frame, 0.020 mm for APS-C, 0.015 mm for Micro Four Thirds and 0.011 mm for 1-inch sensors. Smaller sensors demand tighter blur to look equally sharp at the same print size. Four controls move the result, but they do not move it equally.

Focus distance is the strongest control. As you focus closer, the zone of acceptable sharpness shrinks dramatically, and the effect becomes extreme at close range. An 85 mm lens at f/1.8 on APS-C focused at 1.5 m gives just 0.02 m (2.12 cm) of sharpness, from 1.49 m to 1.51 m. Pull the focus point farther and the depth of field expands rapidly. Focus at or beyond the hyperfocal distance and the far limit runs to infinity while the near limit sits at half the hyperfocal distance — the landscape photographer's standard trick.

Aperture is the second strongest control. Stopping down widens the zone of acceptable sharpness by raising the f-number N in the hyperfocal formula, which lengthens H and pushes the near and far limits apart. Focal length ranks third: longer lenses compress the depth of field because f is squared in the f^2/(N c) term, so doubling focal length has a squared effect on the hyperfocal distance. A 50 mm lens at f/2.8 focused at 3 m on full frame is sharp from 2.74 m to 3.32 m — a total depth of field of 0.58 m, with a hyperfocal distance of 30.84 m. Swap to a 24 mm lens at f/8 focused at 2 m and you get 8.68 m of depth, from 1.11 m to 9.80 m, because its hyperfocal distance is just 2.51 m.

Sensor format is the weakest of the four controls. It enters the formula only through the circle of confusion, which shifts the hyperfocal distance in a linear way rather than a squared one. The effect is real but modest compared with moving the focus point, stopping down the aperture or changing focal length. Smaller sensors use smaller circle of confusion values, which slightly tightens the computed zone of acceptable sharpness for the same lens, aperture and focus distance. In practice, sensor format refines the result but rarely dominates it.

Hyperfocal distance explained

Hyperfocal distance is the closest focus setting that keeps the far limit of acceptable sharpness at infinity. The formula is H = f + f²/(N c), where f is focal length, N is the f-number, and c is the circle of confusion — the largest blur spot the sensor format tolerates. The circle of confusion depends on sensor size: 0.029 mm for full frame, 0.020 mm for APS-C, 0.015 mm for Micro Four Thirds, and 0.011 mm for 1-inch sensors. Smaller sensors demand tighter blur to look equally sharp at the same print size, so they produce different hyperfocal distances even when the lens and aperture are identical.

Focus at or beyond the hyperfocal distance and the far limit runs to infinity while the near limit sits at half the hyperfocal distance — the landscape photographer's standard trick. This is why a wide lens stopped down can render everything from a foreground rock to a distant horizon acceptably sharp in a single exposure. A 24 mm lens at f/8 focused at 2 m on full frame is sharp from 1.11 m to 9.80 m, a total of 8.68 m of depth, because its hyperfocal distance is just 2.51 m. Focus that same lens at 2.51 m instead of 2 m and the far limit extends to infinity, with the near limit at roughly 1.26 m.

Longer focal lengths and wider apertures push the hyperfocal distance much farther out, shrinking the zone of acceptable sharpness around the focus point. A 50 mm lens at f/2.8 focused at 3 m on full frame is sharp from 2.74 m to 3.32 m — a total depth of field of 0.58 m, with a hyperfocal distance of 30.84 m. An 85 mm lens at f/1.8 on APS-C focused at 1.5 m gives just 0.02 m (2.12 cm) of sharpness, from 1.49 m to 1.51 m. In cases like these, focusing at the hyperfocal distance is rarely practical because the near limit would sit too far from the camera to be useful.

A depth of field calculator handles the math automatically, but understanding how the hyperfocal distance behaves helps you choose the right lens and aperture before you frame the shot. The table below lists hyperfocal distances for common full-frame combinations using a circle of confusion of 0.029 mm. Values are rounded to two decimals.

Focal lengthApertureHyperfocal distance (full frame, c = 0.029 mm)
24 mmf/82.51 m
50 mmf/2.830.84 m
85 mmf/1.8138.51 m

Worked examples

To see how a depth of field calculator handles real shooting situations, consider three common setups that span different subjects and sensor formats. Each example shows how focal length, aperture, focus distance, and sensor size interact through the hyperfocal distance formula H = f + f^2/(N c), where f is focal length, N is the f-number, and c is the circle of confusion for the sensor.

The first example is a classic portrait: a 50 mm lens at f/2.8 focused at 3 m on a full frame camera. The full frame circle of confusion is 0.029 mm, which gives a hyperfocal distance of 30.84 m. Plugging that into the calculator, the zone of acceptable sharpness runs from 2.74 m to 3.32 m, for a total depth of field of 0.58 m. That is a useful span for isolating a subject while keeping the background soft.

The second example shifts to landscape work. A 24 mm lens at f/8 focused at 2 m produces a hyperfocal distance of just 2.51 m. Because the focus point sits near that hyperfocal distance, the depth of field calculator returns a generous zone of sharpness from 1.11 m to 9.80 m, which is 8.68 m of depth. This illustrates the landscape photographer's standard trick: focus at or beyond the hyperfocal distance and the far limit runs to infinity while the near limit sits at half the hyperfocal distance.

The third example demonstrates how shallow depth of field becomes at close range with a fast lens on a smaller sensor. An 85 mm lens at f/1.8 on APS-C, where the circle of confusion is 0.020 mm, focused at 1.5 m gives just 0.02 m, or 2.12 cm, of sharpness. The near and far limits are 1.49 m to 1.51 m. Even though APS-C has a tighter circle of confusion than full frame, the long focal length and wide aperture combine to produce an extremely narrow band of focus.

What the classic formula leaves out

A standard depth of field calculator relies on the hyperfocal distance H = f + f^2/(N c), where f is focal length, N the f-number and c the circle of confusion — the largest blur spot the sensor format tolerates. The formula is elegant, but it quietly assumes ideal optics and modest viewing. In practice, several real-world effects eat into the zone of acceptable sharpness, so pixel-peepers consistently find less depth than the table promises.

The first issue is diffraction. As you stop down, light bends around the aperture edges and softens the image, regardless of focus distance. The classic formula treats small apertures as pure gains in depth, but at f/16 or f/22 diffraction starts to blur detail enough that the effective gain is smaller than computed. The second issue is the circle of confusion itself. The standard values — 0.029 mm for full frame, 0.020 mm for APS-C, 0.015 mm for Micro Four Thirds and 0.011 mm for 1-inch sensors — assume a modest print viewed at a normal distance. Smaller sensors demand tighter blur to look equally sharp at the same print size, yet even these figures are generous if you zoom to 100 percent on screen. Pixel-level viewing exposes blur the formula dismisses as acceptable.

Then there are the lens effects the formula never models. Focus breathing shifts the effective focal length as you rack focus, so the depth you computed for a 50 mm lens may actually correspond to 48 mm or 52 mm at your subject distance. Field curvature means the plane of sharp focus is not flat but bowl-shaped, so edges and center cannot both fall within the calculated zone. A lens that curves noticeably will look soft at the frame edges even when the center is dead on.

Consider the worked example of an 85 mm lens at f/1.8 on APS-C focused at 1.5 m. The calculator gives just 0.02 m (2.12 cm) of sharpness, from 1.49 m to 1.51 m. That result is already razor-thin on paper, but add focus breathing, curvature and pixel-level scrutiny and the usable band shrinks further. The same holds for wider setups: a 24 mm lens at f/8 focused at 2 m computes 8.68 m of depth because its hyperfocal distance is just 2.51 m, but field curvature can soften the edges well before the near and far limits.

  • Diffraction at small apertures softens detail and reduces the real depth gain the formula predicts.
  • Pixel-level viewing exposes blur the standard circle of confusion dismisses as acceptable.
  • Focus breathing shifts effective focal length during focusing, changing the computed depth.
  • Field curvature means the plane of focus is not flat, so edges and center cannot both be sharp within the calculated zone.
A depth of field calculator is a planning tool, not a guarantee. Real lenses, real sensors and real viewing distances all shrink the sharp zone the formula describes.

FAQs

How is depth of field calculated?

Depth of field is calculated from the hyperfocal distance H = f + f^2/(N c). The near limit is s(H - f)/(H + s - 2f) and the far limit is s(H - f)/(H - s), where s is the focus distance. A 50 mm lens at f/2.8 focused at 3 m gives a depth of field from 2.74 m to 3.32 m.

What is the hyperfocal distance?

The hyperfocal distance is the focus distance at which the far limit of sharpness just reaches infinity. For a 24 mm lens at f/8 on full frame, it is 2.51 m. Focus there and everything from half that distance, 1.26 m, to infinity is acceptably sharp.

What is the circle of confusion?

The circle of confusion is the largest blur circle that still reads as a point at the intended viewing size. Typical values are 0.029 mm for full frame, 0.020 mm for APS-C, 0.015 mm for Micro Four Thirds, and 0.011 mm for 1-inch sensors.

Why does a smaller sensor give more depth of field?

For the same framing, a smaller sensor uses a shorter focal length and a smaller circle of confusion. The focal-length effect wins, so phones and small-sensor cameras keep nearly everything in focus and struggle to blur backgrounds.

Does aperture or distance matter more?

Both are powerful. Halving the focus distance roughly quarters the depth of field, while each stop of aperture changes it proportionally. In the worked examples, moving from 3 m to 1.5 m at 85 mm f/1.8 leaves only 2.12 cm sharp.

Why does my f/16 shot look soft if depth of field is huge?

Diffraction is the cause. Past about f/11 to f/16 on high-resolution sensors, the aperture itself blurs the image faster than focus errors would. Depth of field formulas ignore diffraction, so a huge depth of field does not guarantee a sharp image.

Sources

Related calculators

Hyperfocal Distance Calculator
Focus here and everything from half this distance to infinity is sharp — hyperfocal distance from focal length, aperture and sensor size.
Print Size Calculator
How big an image prints at any DPI — inches and centimetres, megapixels, and how far the same pixels stretch at 240 and 150 dpi.
Aspect Ratio Calculator
Simplify any width and height to their aspect ratio — and, given a diagonal, the physical width and height that ratio produces.
Data Size Converter
Storage sizes in both ladders at once — decimal KB, MB, GB and TB (powers of 1,000) against binary KiB, MiB, GiB and TiB (powers of 1,024) — and why the two never quite agree.