Depth of Field Calculator

Enter your camera sensor, focal length, aperture, and focus distance to instantly calculate near/far DoF limits and hyperfocal distance.

Camera Settings

Must be greater than 0. Enter the distance from camera to subject.

Hyperfocal Distance

Focus here to maximize sharpness from half this distance to infinity.

Near Limit

Closest sharp point

Far Limit

Farthest sharp point

Total Depth of Field

Far limit minus near limit — the complete sharp zone.

Sharp Zone Visualization

Camera Focus point Infinity

Blue bar = sharp zone relative to hyperfocal distance (capped at hyperfocal).

Formulas Used

H = f² / (N × c) + f

Dnear = (H × d) / (H + d − f)

Dfar = (H × d) / (H − d + f)  [∞ if d ≥ H]

f = focal length, N = f-number, c = CoC, d = focus distance

Summary

Enter your camera sensor, focal length, aperture, and focus distance to instantly calculate near/far DoF limits and hyperfocal distance.

How it works

  1. Select your camera sensor size from the preset list (or choose Custom to enter a circle of confusion manually).
  2. Enter the focal length in millimeters (e.g. 50 for a 50mm lens).
  3. Choose the aperture f-stop from the dropdown (e.g. f/2.8).
  4. Enter the focus distance in meters or feet — the unit selector applies throughout.
  5. The calculator instantly shows hyperfocal distance, near DoF limit, far DoF limit, and total depth of field.
  6. Switch between metric and imperial units at any time; all values recalculate.

Use cases

  • Pre-visualize how much of a scene will be sharp before you shoot.
  • Find the hyperfocal distance for maximum landscape sharpness.
  • Compare f-stops to decide how much bokeh a portrait lens will produce.
  • Plan macro shots where depth of field is only a few millimeters.
  • Teach photography students the relationship between aperture, focal length, and DoF.
  • Cross-check results when renting an unfamiliar camera body or lens.
  • Determine whether a telephoto lens at f/8 gives enough depth for group shots.
  • Calculate the minimum aperture needed to keep foreground and background sharp.

Frequently Asked Questions

Last updated: 2026-07-01 · Reviewed by Nham Vu