Camera Depth of Field Calculator

Estimate geometric focus limits from focal length, aperture, and an allowed blur diameter. Distances are measured from the thin lens's principal plane. The model assumes unity pupil magnification and does not include aberrations or diffraction in the focus limits.

Near limit
--
Far limit
--
Total depth of field
--
Hyperfocal distance
--
Image-plane shift from infinity focus
--
Image-plane shift from hyperfocal focus
--
Total geometric depth of focus
--
Ideal 20% MTF frequency at 650 nm, infinity focus
--
Monochrome Nyquist, horizontal or vertical
--
Bayer green Nyquist, along a sensor diagonal
--
Bayer red or blue Nyquist, horizontal or vertical
--

The Bayer values describe raw sampling along the stated directions. They are not resolution ratings for a demosaiced image. The 20% MTF result assumes incoherent imaging through a clear circular pupil without aberrations. Its frequency is below the zero-contrast diffraction cutoff.

Aperture and exposure comparison

Relative image irradiance, second / first
--
Exposure time at second f-number
--

This comparison assumes distant focus, equal lens transmission, unchanged illumination, and unchanged sensor settings. Actual exposure also depends on transmission and vignetting.

Front adapter comparison

Adapted near limit
--
Adapted far limit
--
Adapted total depth of field
--
Change in depth of field, adapted minus original
--

This estimate changes focal length while holding f-number, object distance, and blur allowance constant. A real adapter can also change pupil position, transmission, aberrations, and focus travel. Check the assembled lens before using these results as a specification.

Equations and references

With focal length f, f-number N, blur diameter c, and focus distance u in millimeters, let K = f²/(Nc). Hyperfocal distance is H = K + f. The near limit is uK/(K + u − f). The far limit is uK/(K − u + f) when u < H, and infinity otherwise.

Image distance is v = fu/(u − f). For unity pupil magnification, working f-number is Nw = Nu/(u − f), and total geometric depth of focus is approximately 2Nwc. The ideal 20% MTF frequency at infinity is 0.68705/(λN), with wavelength λ in millimeters.

References: University of Arizona, First-order Optics for conjugate geometry and MIT 2.71, Lecture 22 for incoherent optical transfer functions. See the depth of field guide for choosing a blur allowance.

Open the depth of field tool with lens suggestions.