Skip to content
Calc.

Depth of Field Calculator

Estimates the total depth-of-field range in millimeters from focal length, aperture, and subject distance, assuming a full-frame sensor. Use it when choosing settings for portraits, landscapes, or macro shots.

Last updated: September 2026

Fill in the required fields to see your result.
Compare 3 scenarios

Formula below · 3 sources (omnicalculator.com, cambridgeincolour.com, Wikipedia) · Updated Sep 2026

Compare with similar

About this calculator

Depth of field (DoF) is the range of distances in a scene that appear acceptably sharp in a photograph. It depends on aperture (f-stop), focal length, and subject distance. A wider aperture (lower f-number), a longer focal length, or a closer subject all shrink the DoF. This calculator uses the standard thin-lens depth-of-field equations. First the hyperfocal distance H = f² / (N × c) + f, where c is the circle of confusion fixed at 0.03 mm for a 35 mm full-frame sensor, N is the f-number and f is the focal length in millimeters. The near limit is d × (H − f) / (H + d − 2f) and the far limit is d × (H − f) / (H − d), where d is the subject distance in millimeters; depth of field is far minus near. When the subject distance reaches the hyperfocal distance, the far limit is infinity and the calculator says so. Far inside the hyperfocal distance this is close to the shortcut DoF ≈ 2 × c × N × d² / f². Edge cases: at macro distances (where magnification approaches 1:1) the approximation overstates DoF; tilt-shift lenses change the focus plane geometry and break the assumption; smaller sensors (APS-C, MFT) use a smaller CoC (≈0.02 or 0.015 mm) and produce a different DoF for the same settings; diffraction at very small apertures (f/16 and beyond) introduces softness that may negate the gained DoF.

How to use

Example 1: Portrait at 85 mm, f/2.8, subject 3 m away. Step 1: convert distance to millimeters — 3 m = 3000 mm. Step 2: hyperfocal distance H = 85² / (2.8 × 0.03) + 85 ≈ 86,097 mm. Step 3: near limit = 3000 × 86,012 / (86,097 + 3000 − 170) ≈ 2,902 mm; far limit = 3000 × 86,012 / (86,097 − 3000) ≈ 3,105 mm. Step 4: DoF ≈ 3,105 − 2,902 ≈ 204 mm, or about 20 cm total, roughly 10 cm in front of and behind the subject — typical for portrait isolation. Example 2: Landscape at 24 mm, f/11, subject 10 m away. H = 24² / (11 × 0.03) + 24 ≈ 1,770 mm, so the 10 m subject is beyond the hyperfocal distance: everything from about 1.49 m to infinity is acceptably sharp, and the calculator reports an infinite depth of field.

Frequently asked questions

How does aperture affect depth of field in photography?

Aperture is the most direct DoF control. A wide aperture like f/1.8 admits more light but drastically narrows the zone of sharpness, which is why portrait photographers favor it for creamy background blur (bokeh). A narrow aperture like f/11 or f/16 extends sharpness across a much larger range, which is preferred for landscapes and architecture. Each full f-stop change roughly doubles or halves the DoF, since the formula is linear in N. However, very small apertures introduce diffraction, which softens fine detail even though the geometric DoF continues to grow.

What is the circle of confusion and why does it matter?

The circle of confusion (CoC) is the largest blur spot that the human eye still perceives as a sharp point at a standard viewing distance and print size. For a 35 mm full-frame sensor the conventional CoC is about 0.03 mm; APS-C uses ≈0.02 mm, Micro Four Thirds ≈0.015 mm, and smartphones smaller still. The smaller CoC for smaller sensors reflects the fact that their images are enlarged more to reach the same display size, making any blur more visible. Changing the CoC value in the formula directly scales the calculated DoF, so the same lens settings yield different DoF on different sensor formats. Critical applications such as billboard prints use even smaller CoC values.

Why does a longer focal length produce shallower depth of field?

Focal length appears squared in the denominator, so even modest increases shrink DoF dramatically. A 200 mm lens focused at the same distance and aperture as a 50 mm lens produces roughly 16× shallower DoF (since (200/50)² = 16). This is why telephoto lenses are prized for wildlife and sports photography where strong subject-background separation is desired. It also explains why achieving very shallow DoF on cropped-sensor cameras is harder than on full-frame bodies: the equivalent framing requires a shorter focal length, which deepens the DoF. Compressing perspective with a telephoto further reinforces the subject-isolation effect even when DoF is identical.

What are common mistakes when using a DoF calculator?

Forgetting to convert subject distance from meters to millimeters yields a result a million times too small; always check units. Using a full-frame CoC (0.03 mm) for an APS-C body overestimates DoF by ~50%; smaller sensors require smaller CoC values. Applying these equations at macro distances — where d approaches f — gives inaccurate results; use magnification-based formulas there. Ignoring focus breathing in modern lenses (focal length changes slightly with focus distance) introduces small errors at close distances. Finally, choosing f/22 to maximize DoF often produces visibly softer images due to diffraction, especially on high-megapixel sensors.

When should I NOT use this DoF calculator?

Macro and close-up photography requires magnification-based depth-of-field formulas rather than these distance-based equations. Tilt-shift and view-camera lenses tilt the plane of focus following the Scheimpflug principle, which changes DoF geometry entirely. Fisheye lenses use non-rectilinear projections, so standard DoF math does not apply. For depth-of-field stacking (focus stacking) workflows, you need step-size calculations based on the near-focus distance of each frame rather than a single DoF value. Cinema lenses with internal focus mechanisms also exhibit focus-breathing severe enough to invalidate fixed focal-length assumptions.

Related calculators

Sources & references