dof calculator

Depth of Field Calculator

Enter your camera and lens settings to estimate near focus, far focus, total depth of field, and hyperfocal distance.

Use a smaller CoC for stricter sharpness criteria.

What this DOF calculator does

A depth of field (DOF) calculator estimates how much of your scene appears acceptably sharp in front of and behind your focus point. This is useful for portraits, landscapes, macro work, product photos, and even video interviews where focus control shapes the look of the image.

With this tool, you can quickly test settings before a shoot and answer practical questions like:

  • Will both eyes in a portrait stay sharp at f/1.8?
  • How much can I blur the background at 85mm and 2 meters?
  • What hyperfocal distance should I use for travel landscapes?

How depth of field works

1) Aperture

Wider apertures (like f/1.4 or f/2) produce shallower depth of field, while narrower apertures (like f/8 or f/11) increase depth of field.

2) Focal length

Longer focal lengths generally compress perspective and reduce apparent depth of field at equivalent framing. A 135mm lens usually gives blurrier backgrounds than a 24mm lens.

3) Subject distance

The closer you focus, the thinner your depth of field becomes. This effect is dramatic in macro photography where millimeters matter.

4) Sensor size and circle of confusion

Sensor format influences the circle of confusion value typically used in depth of field calculations. Different standards exist, so treat any DOF value as a practical estimate rather than absolute truth.

Formulas used in the calculator

This calculator uses the standard geometric optics model:

  • Hyperfocal distance: H = f² / (N × c) + f
  • Near distance: Dn = (H × s) / (H + (s - f))
  • Far distance: Df = (H × s) / (H - (s - f))

Where:

  • f = focal length (mm)
  • N = f-number (aperture)
  • c = circle of confusion (mm)
  • s = subject distance (mm)

If the far-distance denominator approaches zero or negative, the far limit is effectively at infinity.

Practical shooting tips

Portrait photography

  • For single-subject portraits, f/1.8 to f/2.8 can create beautiful separation.
  • For couples or small groups, stop down to f/4 to f/5.6 for safer sharpness.
  • Check your near DOF limit so the closest eye remains in focus.

Landscape photography

  • Use hyperfocal distance when you want foreground and background clarity.
  • Typical ranges: f/8 to f/11 with wide to moderate focal lengths.
  • Avoid stopping down too far (like f/22) unless needed, due to diffraction softness.

Macro photography

  • Expect extremely thin DOF at close distances.
  • Use focus stacking for maximum detail across the subject.
  • Stability, lighting, and careful focus placement are critical.

Limitations of DOF calculators

Depth of field calculators are excellent planning tools, but real-world sharpness also depends on lens quality, sensor resolution, motion blur, focus accuracy, diffraction, and final viewing size. Always verify with test shots and zoomed playback when precision matters.

Quick workflow suggestion

  • Start with creative intent (background blur vs scene sharpness).
  • Choose focal length based on composition.
  • Set aperture for desired look.
  • Check DOF output and adjust distance or aperture as needed.
  • Confirm with a test frame.

Use this calculator as your planning companion, then refine in-camera. With a little practice, depth of field decisions become fast, intentional, and repeatable.

🔗 Related Calculators

🔗 Related Calculators