Depth of Field (DoF) Calculator

Plan focus with the near limit, far limit, total DoF, and hyperfocal distance for any focal length, aperture, focus distance, and sensor size. Everything runs locally in your browser.

Inputs

Circle of confusion values are format-based approximations. Choose the next tighter format or stop down for stricter critical focus.

Results

Near limit:
Far limit:
Total DoF:
Hyperfocal distance:

Tip: Try sliding focus distance slightly—if your DoF shrinks faster than you expect, you may be near the focal plane and need to stop down.

How to use this depth of field calculator

  • Pick your format first. CoC scales with sensor size; switching formats without changing the lens can change perceived DoF.
  • Lock your focal length. Zoom lenses often breathe at close focus—check framing after you set distance.
  • Set focus distance in meters. Use a tape, rangefinder, or lens markings for accuracy.
  • Read the hyperfocal line. Focus at or just past it to keep infinity sharp; half that distance will also be in acceptable focus.
  • Adjust aperture. Stopping down widens DoF but may add diffraction. For landscapes, try f/8–f/11; for portraits, test f/1.4–f/2.8.

5 Fun Facts about Depth of Field

Hyperfocal math is old-school

The H = f²/(N·c) + f equation dates back to early 20th-century film photography and still underpins modern focus tables.

Classic optics

Phone “bokeh” is simulated

Smartphones use depth maps and segmentation to fake shallow DoF; the tiny sensors natively have very deep focus.

Computational tricks

Diffraction sets a ceiling

Stopping down past roughly f/11 on many sensors softens detail as diffraction spreads light wider than the pixel pitch.

Trade-offs

Film standards linger

Many cinema DoF charts still reference a 0.025 mm CoC from 35mm film days—even when used on digital Super35 sensors.

Legacy numbers

Breathing shifts framing

Focus breathing changes angle of view as you rack focus. Wider lenses tend to breathe less; cinema lenses correct it by design.

Lens behavior

Why depth of field matters

Depth of field is the tolerance zone where subjects still look acceptably sharp. It balances sensor size, focal length, aperture, and focus distance. Narrow DoF is great for portrait separation; deep DoF is crucial for landscapes, macro focus stacking, and VFX plates that need consistent sharpness.

Use this calculator when blocking shots, planning rack-focus moves, or deciding whether to stop down or switch lenses. The numbers update instantly, so you can try “what if” scenarios: move the camera back and zoom in, or step closer and stop down—see which combo preserves framing while keeping focus breathing manageable.

If you need to be stricter than the default circle of confusion, pick the next smaller sensor option or input slightly shorter focal lengths to simulate a tighter CoC. The math runs entirely in your browser, so you can keep it open on set without connectivity.

Explore more tools