Free online tools to generate, calculate,
convert, format, encode, and play.
 

Depth of Field Calculator

Calculate near and far focus limits, total depth of field, and hyperfocal distance from focal length, aperture, and subject distance.


DOF Calculator

H = f² / (N × c)   |   DOF = Df − Dn

Enter your lens and camera settings to calculate depth of field

mm
Common: 24, 35, 50, 85, 135, 200
f/
Determines the circle of confusion (CoC)

How It Works

What is Depth of Field?

Depth of field (DOF) is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in a photograph. It is determined by focal length, aperture, subject distance, and sensor size.

Key Formulas
  • Hyperfocal distance: H = f² / (N × c) + f
  • Near focus limit: Dn = s(H − f) / (H + s − 2f)
  • Far focus limit: Df = s(H − f) / (H − s)   (infinity if s ≥ H)
  • Total DOF: Df − Dn

Where f = focal length, N = f-number, c = circle of confusion, s = subject distance, H = hyperfocal distance.

Circle of Confusion (CoC)

The CoC represents the largest blur spot that appears sharp to the human eye. It varies by sensor size because smaller sensors require greater enlargement to produce the same print size:

  • Medium Format: 0.043 mm
  • Full Frame (35mm): 0.030 mm
  • APS-C: 0.019 – 0.020 mm
  • Micro Four Thirds: 0.015 mm
Factors Affecting DOF
  • Aperture: Wider apertures (lower f-numbers like f/1.4) produce shallower DOF. Narrower apertures (f/11, f/16) produce deeper DOF.
  • Focal length: Longer focal lengths compress perspective and produce shallower DOF at the same subject distance.
  • Subject distance: Closer subjects have shallower DOF. Moving further away increases DOF.
  • Sensor size: Larger sensors produce shallower DOF at equivalent field of view.
Hyperfocal Distance

The hyperfocal distance is the focus distance at which everything from half that distance to infinity appears acceptably sharp. Landscape photographers often use this technique to maximize sharpness throughout the scene.

Practical Tips
  • Portraits: Use wide apertures (f/1.4 – f/2.8) with longer focal lengths for pleasing background blur
  • Landscapes: Focus at the hyperfocal distance with f/8 – f/11 for maximum sharpness front to back
  • Macro: DOF becomes extremely thin at close distances; consider focus stacking
  • Diffraction: Apertures beyond f/16 can reduce sharpness due to diffraction, even though DOF increases


Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with