Skip to content
FiftyCalc Free calculators for all 50 states

Depth of Field Calculator

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Enter the lens focal length, the f-number, the focus distance and the circle of confusion for your sensor.

Result

Sample figures

Total depth of field (— = infinite)—

Hyperfocal distance —

  • Near limit of sharpness—
  • Far limit of sharpness (— = to infinity)—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Depth of Field Calculator

Focal length, in mm: enter 1 or more. Prefilled example: 50.

Aperture (f-number): enter 0.5 or more. Prefilled example: 8.

Distance unit

Distance unit: choose Feet or Meters. Prefilled example: Feet.

Focus distance: enter 0 or more. Prefilled example: 10.

Circle of confusion (about 0.03 for full frame), in mm: enter 0.001 or more. Prefilled example: 0.03.

Affiliate link

This is an affiliate link. As an Amazon Associate I earn from qualifying purchases. This does not change the result.

Search Amazon for camera lenses. Visit Amazon

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Focal length, in mm: enter 1 or more.
  2. Aperture (f-number): enter 0.5 or more.
  3. Distance unit: choose Feet or Meters.
  4. Focus distance: enter 0 or more.
  5. Circle of confusion (about 0.03 for full frame), in mm: enter 0.001 or more.
  6. Read the result: Total depth of field (— = infinite); the panel also shows Hyperfocal distance, Near limit of sharpness and Far limit of sharpness (— = to infinity).

How this calculator works

Hyperfocal distance H = f² / (N × c) + f, with f the focal length, N the f-number and c the circle of confusion (all in mm). These are the standard thin-lens depth-of-field equations used in photographic optics.

Near limit = s (H − f) / (H + s − 2f); far limit = s (H − f) / (H − s) when s < H, otherwise sharpness extends to infinity. Depth of field = far − near. Distances in feet use 1 ft = 304.8 mm (exact, NIST SP 811).

The circle of confusion is a convention for what looks sharp in a print: about 0.03 mm is common for full frame; smaller sensors use smaller values.

The formula

  1. Hyp=f2÷(N×c)+fu
  2. Ne=s×u×(Hyp×u−f)÷(Hyp×u+s×u−2×f)u
  3. Far={s×u×(Hyp×u−f)÷(Hyp×u−s×u)uif s×u<Hyp×u10otherwise
  4. Tot=Far−Ne
Symbols used in the formula
SymbolMeaningUnit
fFocal lengthmm
NAperture (f-number)
uDistance unit (304.8: Feet; 1,000: Meters)
sFocus distance
cCircle of confusion (about 0.03 for full frame)mm
HypHyperfocal distance
NeNear limit of sharpness
FarFar limit of sharpness (— = to infinity)
TotTotal depth of field (— = infinite)

Worked example

Focal length50 mm
Aperture (f-number)8
Distance unitFeet
Focus distance10
Circle of confusion (about 0.03 for full frame)0.03 mm
Hyperfocal distance34.3395
Near limit of sharpness7.7651
Far limit of sharpness (— = to infinity)14.0412
  1. Hyp=502÷(8×0.03)+50304.8=34.3395
  2. Ne=10×304.8×(34.3395×304.8−50)÷(34.3395×304.8+10×304.8−2×50)304.8=7.76513
  3. Far=10×304.8×(34.3395×304.8−50)÷(34.3395×304.8−10×304.8)304.8=14.0412
  4. Tot=14.0412−7.76513=6.27602

Total depth of field (— = infinite) 6.276

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What is the depth of field of a 50 mm lens at f/8 focused at 10 ft?

About 6.3 ft, from roughly 7.8 ft to 14.0 ft, with c = 0.03 mm.

What is hyperfocal distance?

The focus distance that makes everything from half that distance to infinity acceptably sharp.

Does a smaller aperture increase depth of field?

Yes. A higher f-number shrinks the hyperfocal distance and widens the sharp zone.

Related calculators