Photography Depth of Field (DoF) Calculator

Calculate depth of field and focus limits based on focal length, aperture, subject distance, and the circle of confusion for your sensor.

Depth of Field Inputs

Provide your focal length, aperture, subject distance, and circle of confusion to compute the depth of field.

How to Use This Calculator

Enter your camera settings to quickly see how the depth of field changes. Start with common focal lengths, pair them with the aperture you plan to shoot at, input the distance to your subject, and enter the circle of confusion for your sensor. Then click Calculate or let the interface run automatically to see the focus limits.

Methodology

The calculator uses standard depth of field formulas derived from photographic optics. It first computes the hyperfocal distance, then derives the near and far focus limits so you can understand the sharp zone for a given setup.

Results are estimates; for precise critical-focus work, verify with a focused ruler or tethered capture workflow and adjust the circle of confusion to match your sensor and acceptable sharpness.

Glossary of Terms

Step-by-step Example

With a 50mm lens at f/2.8 and a subject 2 meters away, use a circle of confusion of 0.03mm for a typical APS-C sensor. The calculator shows how much depth remains in focus so you can manage background blur and ensure your subject stays crisp.

Frequently Asked Questions

What is Depth of Field?

The distance between the nearest and farthest objects that appear acceptably sharp in an image.

How can I change the Depth of Field?

Adjust aperture, focal length, or subject distance. Wider apertures and longer focal lengths shrink the depth of field.

Why is the Circle of Confusion important?

It defines the sharpness threshold on the sensor; a smaller value tightens your depth of field estimates.

Does sensor size affect Depth of Field?

Yes, larger sensors yield shallower depth of field for the same framing and aperture.

Is a smaller f-stop number better for portraits?

Yes, a wide aperture creates a shallower depth of field and more pronounced background blur.

Formulas

Depth of field uses the hyperfocal formula and focus limits derived from it. The primary equation preserved from the original page is:

\[DoF = \frac{2 \cdot N \cdot C \cdot H \cdot f^2}{f^2 - N \cdot C \cdot H}\]

N = aperture, C = circle of confusion, H = hyperfocal distance, f = focal length.

  • Hyperfocal Distance (H): \( \frac{f^2}{N \cdot C} \)
  • Near Limit: \( \frac{H \cdot D}{H + (D - f)} \)
  • Far Limit: \( \frac{H \cdot D}{H - (D - f)} \)
Citations

DOFMaster — dofmaster.com · Accessed 2026-01-19
https://www.dofmaster.com/dofjs.html

Changelog
  • 0.1.0-draft — 2026-01-19: Initial audit spec draft generated from HTML extraction.
  • Verify formulas match the calculator engine and convert text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido Last Updated: 2026-01-19 Version 0.1.0-draft
Version 1.5.0