Skip to content
Calculator Collection

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: May 2026

Fill in the required fields to see your result.

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. The simplified formula used here is DoF ≈ (2 × c × N × d²) / 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, d is the subject distance in millimeters, and f is the focal length in millimeters. This approximation holds when the subject distance is well beyond the hyperfocal distance is not approached — that is, when d is much larger than 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: apply the formula — DoF = (2 × 0.03 × 2.8 × 3000²) / 85² = (0.168 × 9,000,000) / 7225 = 1,512,000 / 7225 ≈ 209 mm, or about 21 cm total. Verify: roughly 10 cm in front of and behind the subject will be acceptably sharp — typical for portrait isolation. Example 2: Landscape at 24 mm, f/11, subject 10 m away. Step 1: 10 m = 10000 mm. Step 2: DoF = (2 × 0.03 × 11 × 10000²) / 24² = (0.66 × 100,000,000) / 576 = 66,000,000 / 576 ≈ 114,583 mm = 114.6 m. Verify: a wide-angle landscape at f/11 from 10 m gives essentially front-to-back sharpness, consistent with the large number.

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 the formula at macro distances — where d approaches f — gives wildly inaccurate results because the simplification d² >> f² breaks down. 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 the full near/far focus equations or magnification-based formulas, not this simplified approximation. 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.

Sources & references