Works on this device
Depth of Field Calculator
Depth of field is the zone in front of and behind the point of focus that still looks sharp. Enter the lens, the aperture and the focus distance to see where that zone starts and ends, or find the hyperfocal distance.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use this calculator
- Choose Depth of field or Hyperfocal distance.
- Type the real focal length of the lens and the f-number (8 for f/8). For depth of field, type the focus distance from the lens.
- Choose your sensor size from the list, or type the circle of confusion yourself.
- Choose Calculate. The table lists the same result at other apertures.
The formulas
- Hyperfocal distance: H = f² ÷ (N × c) + f, with f the focal length, N the f-number and c the circle of confusion.
- Near limit: s × (H − f) ÷ (H + s − 2f), with s the focus distance.
- Far limit: s × (H − f) ÷ (H − s) when s is less than H. When s is H or more, the far limit is infinity.
- Focused at H, everything from H ÷ 2 to infinity is acceptably sharp.
- Circle of confusion by convention: sensor diagonal ÷ 1500 (you can change the divisor). It assumes a print or screen of a usual size seen from a usual distance.
- Depth of focus at the sensor, approximately 2 × N × c × (1 + magnification).
Worked example
A full frame sensor (36 × 24 mm) has a diagonal of 43.27 mm, so c = 43.27 ÷ 1500 = 0.0288 mm.
A 50 mm lens at f/8: H = 50² ÷ (8 × 0.0288) + 50 = 10,884 mm, about 10.88 m.
Focused at 5 m, the near limit is 5000 × (10,884 − 50) ÷ (10,884 + 5000 − 100) = 3,432 mm and the far limit is 5000 × 10,834 ÷ 5,884 = 9,206 mm. The depth of field is about 5.77 m: 1.57 m in front of the subject and 4.21 m behind it.
A 24 mm lens at f/11 with c = 0.03 mm has H = 576 ÷ 0.33 + 24 = 1,769 mm. Focus at 1.77 m and everything from 0.88 m to infinity looks sharp.
Limits you should know
- "Sharp" is a judgement. The circle of confusion is a convention for a usual print size and viewing distance; for big prints or close viewing, use a smaller value.
- The formulas use a thin lens and measure distances from the lens. Cameras measure focus distance from the sensor mark, so very close distances differ a little.
- Sensor sizes in the list other than 36 × 24 mm are nominal examples. Type the size from your camera's data for an exact answer.
- At macro distances the depth of field is very small and diffraction softens the whole picture at small apertures. For magnification and working distance, use the Macro Magnification Calculator.
- To plan front-to-back sharpness for a landscape, use the Landscape Depth of Field Planner.