Depth of Field Calculator

Quick answer

The depth of field calculator finds the near and far limits of acceptable sharpness, the total depth of field and the hyperfocal distance from your sensor size, focal length, aperture and focus distance, with a choice of circle-of-confusion standards and a diagram of the sharp zone.

Choose your camera's sensor format – crop factors are relative to full frame.

Marked f-numbers are rounded; the calculator uses the exact values (f/22 is really f/22.63).

The largest blur spot that still looks sharp. Full frame with the standard rule gives 0.029 mm.

Depth of field
583.0209
Near limit of sharpness
2,736.5532
Far limit of sharpness
3,319.574
Sharp zone in front of the subject
263.4468
Sharp zone behind the subject
319.574
Share of the depth of field in front of the subject
45.2 %
Sharp zone diagram
Hyperfocal distance
30,693.115
Hyperfocal near limit (H ÷ 2)
15,346.5575
Quick approximation 2s²Nc/f²
587.4076
Circle of confusion used
0.0288
Exact focal ratio used
2.828
Crop factor
1 ×
Image magnification
0.0169 ×

Depth of field (DoF) is the stretch of distance in front of and behind the point you focus on that still looks sharp in the final picture. Strictly, a lens focuses perfectly on only one plane; points nearer or farther are imaged as small blur discs. As long as those discs are smaller than the circle of confusion (the largest blur the eye accepts as a point), they read as sharp.

Four things control depth of field: the aperture (a larger f-number gives more depth), the focus distance (more depth the farther you focus), the focal length (shorter lenses give more depth at the same distance) and the sensor format, because a smaller sensor needs less enlargement and so uses a smaller circle of confusion. Portrait photographers use wide apertures and longer lenses to isolate a face against a soft background; landscape and architecture photographers stop down to keep everything crisp.

This calculator works with the exact focal ratios behind the marked f-stops, lets you pick or derive the circle of confusion (from a standard rule or from print size, viewing distance and eyesight) and draws the sharp zone so you can see how much of it lies in front of and behind the subject.

How to use the Depth of Field Calculator

  1. Sensor size: Choose your camera’s sensor format. Crop factors are relative to full frame.
  2. Sensor width
  3. Sensor height
  4. Lens focal length
  5. Aperture: Marked f-numbers are rounded; the calculator uses the exact values (f/22 is really f/22.63).
  6. f-number (N)
  7. Focus distance (subject distance)
  8. Circle of confusion: The largest blur spot that still looks sharp. Full frame with the standard rule gives 0.029 mm.
  9. Print width
  10. Print height
  11. Viewing distance
  12. Visual acuity (line pairs per mm at 25 cm): 5 lp/mm is normal eyesight; 8 lp/mm is very sharp eyesight.
  13. Circle of confusion

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

The circle of confusion c comes from the sensor diagonal (or your print and viewing settings). The hyperfocal distance H = f²/(N·c) + f is calculated first; the near and far limits follow from the thin-lens depth-of-field equations. If you focus at or beyond H, the far limit is infinity.

Worked example

A full-frame camera with a 50 mm lens at f/2.8 (exact ratio 2.828) is focused at 3 m. The standard circle of confusion is 43.27 mm ÷ 1500 = 0.0288 mm.

Hyperfocal distance: H = 50² ÷ (2.828 × 0.0288) + 50 = 30,693 mm ≈ 30.7 m. Near limit = 3000 × (30,693 − 50) ÷ (30,693 + 3000 − 100) ≈ 2.74 m. Far limit = 3000 × 30,643 ÷ (30,693 − 3000) ≈ 3.32 m. The depth of field is about 0.58 m: 26 cm in front of the subject and 32 cm behind it.

How to get more or less depth of field

  • Stop down: going from f/2.8 to f/8 roughly triples the depth of field.
  • Step back: doubling the distance roughly quadruples it.
  • Use a wider lens for more depth, a longer one for less (at the same distance).
  • For landscapes, focus at the hyperfocal distance: see the hyperfocal output above.

Formula

H = f² ÷ (N · c) + f · Near = s(H − f) ÷ (H + s − 2f) · Far = s(H − f) ÷ (H − s) (infinite when s ≥ H) · DoF = Far − Near ≈ 2·s²·N·c ÷ f²

Worked example

Inputs: Sensor size: Full frame (35 mm) – 36 × 24 mm (crop 1.00×); Lens focal length: 50 mm; Aperture: f/2.8; Focus distance (subject distance): 3 m; Circle of confusion: Standard – sensor diagonal ÷ 1500 (8×10 in print seen at 25 cm).
Results: Depth of field = 583.0209; Near limit of sharpness = 2,736.5532; Far limit of sharpness = 3,319.574; Sharp zone in front of the subject = 263.4468; Sharp zone behind the subject = 319.574; Share of the depth of field in front of the subject = 45.2 %.

Key terms

Depth of field
The range of distances that look acceptably sharp in the final image.
Circle of confusion
The largest blur spot on the sensor that still looks like a point after enlargement.
Hyperfocal distance
The focus distance that makes everything from half that distance to infinity acceptably sharp.
Focal ratio (f-number)
Focal length divided by the entrance-pupil diameter; each full stop multiplies it by √2.

Frequently asked questions

What is a good depth of field for portraits?

For a head-and-shoulders portrait, 5–20 cm keeps both eyes sharp while blurring the background. A full-frame 85 mm lens at f/2 focused at 2 m gives roughly 6 cm.

Does a smaller sensor give more depth of field?

At the same framing and the same f-number, yes, about one crop factor's worth. A Micro Four Thirds camera at f/4 gives roughly the depth of field of full frame at f/8.

What does an infinite far limit mean?

You are focused at or beyond the hyperfocal distance, so everything from the near limit to the horizon is acceptably sharp.

Why is more of the sharp zone behind the subject?

Blur grows more slowly with distance behind the focus point. At normal distances the split is about one third in front and two thirds behind; close up it approaches 50/50.

Which circle of confusion should I use?

The standard diagonal ÷ 1500 rule (0.029 mm for full frame) suits normal prints. Use ÷ 3000 if you print large or inspect files at 100%.

Is the quick approximation accurate?

2s²Nc/f² is close when the focus distance is well below the hyperfocal distance and far greater than the focal length; it overestimates near the hyperfocal distance.

Does focal length change depth of field if I keep the framing?

Only a little. If you step back to keep the subject the same size, depth of field stays almost the same; the background blur looks different because of perspective.

Sources

  1. Wikipedia: Depth of field
  2. Wikipedia: Circle of confusion
  3. Cambridge in Colour: Depth of field tutorial

Cite this calculator

Speedy Calculator. (2026). Depth of Field Calculator. Speedy Calculator. https://speedycalculator.com/calculators/other/depth-of-field/