Depth of Field Calculator

Calculate near and far focus limits, total depth of field, and hyperfocal distance — with a live focus zone diagram.

Inputs

Circle of confusion: 0.019 mm

mm
m

Near limit

2.82 m

Far limit

3.20 m

Total DoF

38.5 cm

Hyperfocal

46.99 m

Focus Zone

What is depth of field?

When you focus your camera on something, there's a zone in front of and behind your subject where everything still looks sharp. That zone is the depth of field. A shallow depth of field means only a thin slice is in focus — think portrait shots with a blurry background. A deep depth of field keeps nearly everything sharp from foreground to background, which is what landscape photographers usually want.

Four things control how deep or shallow that zone is: sensor size, focal length, aperture, and subject distance. A wide aperture like f/1.8 gives you that creamy background blur. Stop down to f/11 and suddenly much more of the scene is sharp.

Sensor size affects depth of field through something called the circle of confusion (CoC) — the maximum size a blur spot can be before it stops looking like a sharp point in a print. A larger sensor tolerates a larger blur spot, so the same lens and aperture produces more background blur on full frame than on a crop body.

The formulas

Everything starts with the hyperfocal distance — the focus point that squeezes the most depth of field out of a given aperture. Focus here, and everything from half this distance all the way to infinity will be acceptably sharp.

H=f2NcH = \frac{f^2}{N \cdot c}
  • ff — focal length in millimeters (e.g. 50 mm)
  • NN — f-number, your aperture setting (e.g. 2.8 for f/2.8)
  • cc — circle of confusion in millimeters; depends on sensor size (e.g. 0.030 mm for full frame)

With HH in hand, the near and far limits of the sharp zone for any subject distance dd are:

Dn=HdH+dD_n = \frac{H \cdot d}{H + d}
Df=HdHdD_f = \frac{H \cdot d}{H - d}
  • dd — distance from camera to subject (in meters)
  • DnD_n — nearest point that appears sharp
  • DfD_f — farthest point that appears sharp; becomes \infty when dHd \geq H

Total depth of field is DfDnD_f - D_n. When dHd \geq H, the far limit hits infinity — meaning everything beyond the near limit looks sharp, no matter how far away.

How to use this calculator

  1. 01Choose your camera sensor. The sensor determines the circle of confusion. If you shoot with a Canon Rebel, 90D, or similar EF-mount APS-C body, pick “APS-C Canon”. Sony a6xxx, Nikon DX, or Fujifilm APS-C users should pick “APS-C Nikon / Sony”.
  2. 02Enter your lens's focal length in millimeters. Use the physical focal length marked on the lens, not a “35mm equivalent”.
  3. 03Set the aperture you are shooting at. Select from the standard full-stop values, or choose “Custom…” to type any f-number including third-stops like f/1.7 or f/3.2.
  4. 04Enter the distance from your camera to the subject. Switch between meters and feet using the toggle — the value converts automatically.
  5. 05All results update instantly as you type. The focus zone diagram shows the in-focus band to scale — the dark bar is your sharp zone, and the diamond marks where you have focused.

FAQ

What is hyperfocal distance and why does it matter?

The hyperfocal distance is the closest focus distance that brings everything from half that distance to infinity into acceptable sharpness. Focusing at the hyperfocal distance squeezes the maximum possible depth of field from any given aperture and focal length combination. For landscape photographers, it replaces the habit of focusing at infinity — which wastes the entire near zone behind the scene — with a smarter focus point that keeps the foreground sharp too.

Does a crop sensor really give more depth of field than full frame?

At the same focal length, aperture, and focus distance, yes — a smaller sensor uses a tighter circle of confusion value, which tightens the acceptable blur zone and produces more depth of field. In practice, once you account for equivalent focal lengths (using a shorter lens on APS-C to match the field of view of a longer lens on full frame), the difference in DoF largely cancels out.

Why does the far limit jump to infinity?

The formula for the far focus limit is Df = (H × d) / (H − d). When your focus distance d equals the hyperfocal distance H, the denominator becomes zero — so the far limit is mathematically infinite. This is the defining property of hyperfocal distance: it is the minimum focus distance at which infinity falls within the depth of field.

How does focal length affect depth of field?

Longer focal lengths produce shallower depth of field at the same aperture and subject framing. A 200mm lens wide open gives dramatically more background separation than a 35mm lens wide open when both are framed to show the same subject size — the telephoto requires you to step further back, which changes the geometry in favour of background blur.

What circle of confusion values does this calculator use?

This calculator uses industry-standard CoC values per sensor format: Full Frame 0.030 mm, APS-C Canon 0.019 mm, APS-C Nikon/Sony 0.020 mm, Micro Four Thirds 0.015 mm, 1-inch sensor 0.011 mm, and phone sensor 0.007 mm. These values are derived from the convention of an 8×10 inch print viewed at 25 cm.

Related tools