ES EN FR PT DE IT

Depth of Field Calculator

Calculate approximate depth of field.

The Depth of Field Calculator is a free photography calculator. Calculate approximate depth of field. Optimize your photographic settings with precise optical formulas for better results.
Inputs
Physical Parameters
Technical Parameters
Body Data
Result
Enter values and press Calculate

What is Depth of Field?

Depth of field (DOF) is the distance range in a photograph that appears acceptably sharp from foreground to background. When you focus at 3 meters with a 50mm lens at f/2.8, the DOF might extend from 2.8 meters to 3.3 meters — only 50 centimeters of acceptable sharpness.

Portrait photographers use shallow DOF (narrow focus range) to blur distracting backgrounds. A headshot at f/1.8 might have just 5 centimeters of DOF, keeping the subject's eyes sharp while their ears and the background dissolve into smooth bokeh.

Landscape photographers need deep DOF (wide focus range) from nearby rocks to distant mountains. Using a 24mm lens at f/11 and focusing at the hyperfocal distance of 2.5 meters might render everything from 1.25 meters to infinity acceptably sharp.

Depth of Field Formulas with Worked Calculations

Depth of field requires calculating the hyperfocal distance first, then near and far limits:

H = (f²) / (N × c) + f

Where H is hyperfocal distance, f is focal length, N is f-number, and c is circle of confusion.

Worked example: 50mm lens at f/2.8, circle of confusion 0.03mm (full-frame standard).

f² = 50² = 2,500 mm²

N × c = 2.8 × 0.03 = 0.084 mm

H = 2,500 / 0.084 + 50 = 29,762 + 50 = 29,812 mm ≈ 29.8 meters

Near limit (Dₙ) and far limit (Dᶠ) when focused at distance s:

Dₙ = (H × s) / (H + s - f)

Dᶠ = (H × s) / (H - s + f)

If focused at s = 3 meters (3,000 mm): Dₙ = (29,812 × 3,000) / (29,812 + 3,000 - 50) = 89,436,000 / 32,762 = 2,730 mm = 2.73 meters. Dᶠ = (29,812 × 3,000) / (29,812 - 3,000 + 50) = 89,436,000 / 26,862 = 3,330 mm = 3.33 meters. Total DOF = 3.33 - 2.73 = 0.60 meters (60 cm).

How to Calculate Depth of Field: 6 Steps

  1. Determine your focal length: Your lens is set to 85mm. Note this in millimeters. Zoom lenses show current focal length on the barrel or in the viewfinder display.
  2. Identify your aperture: You're shooting at f/4. This is your N value. Wider apertures (smaller f-numbers) produce shallower DOF.
  3. Find the circle of confusion: For full-frame sensors, use 0.03mm. For APS-C (crop factor 1.5), use 0.02mm. For Micro Four Thirds (crop factor 2), use 0.015mm.
  4. Calculate hyperfocal distance: H = (85²) / (4 × 0.03) + 85 = 7,225 / 0.12 + 85 = 60,208 + 85 = 60,293 mm ≈ 60.3 meters.
  5. Measure focus distance: You're focused on a subject 5 meters away (5,000 mm). This is your s value in the near/far formulas.
  6. Calculate near and far limits: Dₙ = (60,293 × 5,000) / (60,293 + 5,000 - 85) = 4.79 meters. Dᶠ = (60,293 × 5,000) / (60,293 - 5,000 + 85) = 5.46 meters. DOF spans 4.79m to 5.46m — a range of 67 centimeters.

5 Depth of Field Examples

Example 1 — Macro photography: 100mm macro lens at f/5.6, focused at 0.3 meters (300 mm), full-frame (c = 0.03mm). H = (100²) / (5.6 × 0.03) + 100 = 59,623 mm. Dₙ = (59,623 × 300) / (59,623 + 300 - 100) = 299 mm. Dᶠ = (59,623 × 300) / (59,623 - 300 + 100) = 301 mm. DOF = 2 mm — extremely shallow, requiring focus stacking for full subject sharpness.

Example 2 — Environmental portrait: 35mm lens at f/2, focused at 2 meters, APS-C sensor (c = 0.02mm). H = (35²) / (2 × 0.02) + 35 = 30,660 mm ≈ 30.7m. Dₙ = (30,660 × 2,000) / (30,660 + 2,000 - 35) = 1.88m. Dᶠ = (30,660 × 2,000) / (30,660 - 2,000 + 35) = 2.14m. DOF = 26 cm — enough to keep the subject sharp while softening the background.

Example 3 — Landscape with foreground: 24mm lens at f/11, focused at 3 meters, full-frame (c = 0.03mm). H = (24²) / (11 × 0.03) + 24 = 1,770 mm ≈ 1.77m. Since focus distance (3m) exceeds hyperfocal (1.77m), everything from half the hyperfocal to infinity is sharp: 0.885m to ∞. Perfect for scenes with nearby flowers and distant peaks.

Example 4 — Sports photography: 400mm telephoto at f/5.6, focused at 50 meters, full-frame (c = 0.03mm). H = (400²) / (5.6 × 0.03) + 400 = 952,781 mm ≈ 953m. Dₙ = (952,781 × 50,000) / (952,781 + 50,000 - 400) = 47.5m. Dᶠ = (952,781 × 50,000) / (952,781 - 50,000 + 400) = 52.8m. DOF = 5.3 meters — enough to keep a moving athlete sharp despite distance changes.

Example 5 — Product photography: 60mm lens at f/8, focused at 0.5 meters (500 mm), APS-C (c = 0.02mm). H = (60²) / (8 × 0.02) + 60 = 22,560 mm ≈ 22.6m. Dₙ = (22,560 × 500) / (22,560 + 500 - 60) = 489 mm. Dᶠ = (22,560 × 500) / (22,560 - 500 + 60) = 511 mm. DOF = 22 mm — critical for product shots where every millimeter of sharpness matters.

4 Common DOF Calculation Mistakes

  • Using wrong circle of confusion: Applying 0.03mm (full-frame) to an APS-C camera produces DOF estimates 50% too large. APS-C needs 0.02mm, Micro Four Thirds needs 0.015mm. The circle of confusion must match your sensor's crop factor.
  • Forgetting to convert units: Mixing millimeters and meters in the same formula. If focal length is 50mm, keep hyperfocal in mm (29,812 mm), then convert the final answer to meters (29.8m). Inconsistent units produce wildly incorrect results.
  • Assuming DOF is equally distributed: DOF extends roughly 1/3 in front and 2/3 behind the focus point at moderate distances, but this ratio changes. At hyperfocal distance, DOF extends from half that distance to infinity — not symmetric at all.
  • Ignoring focus breathing: Some zoom lenses change focal length when focusing close. A 70-200mm set to 200mm might become 180mm at minimum focus distance. This increases DOF slightly but isn't accounted for in standard formulas.

5 Tips for Depth of Field Control

  • Use DOF preview button: Most DSLRs and mirrorless cameras have a DOF preview button that stops down the lens to the shooting aperture. The viewfinder darkens, but you can see exactly what will be sharp before taking the shot.
  • Focus one-third into the scene: For maximum DOF without calculating hyperfocal, focus approximately one-third of the way into your scene. This places the 2:1 rear-to-front DOF distribution to best advantage for landscapes.
  • Check with zoom playback: After shooting a landscape at f/11, zoom to 100% on your LCD and check both foreground rocks and distant trees. If either is soft, refocus and reshoot. Don't trust the thumbnail preview.
  • Consider diffraction limits: Stopping down beyond f/16 on full-frame (f/11 on APS-C) introduces diffraction softening. If you need more DOF, use focus stacking instead of f/22. Three shots at f/8 blended in post beats one shot at f/22.
  • Use smartphone apps: Apps like PhotoPills, DOF Calculator, or SetMyCamera compute DOF instantly for your specific camera model. Enter focal length, aperture, and distance, and get near/far limits without manual calculation.

4 Depth of Field FAQs

Yes, indirectly. Smaller sensors use shorter focal lengths for the same field of view, and shorter focal lengths produce deeper DOF. A 25mm lens on Micro Four Thirds gives the same view as 50mm on full-frame, but at f/2.8, the MFT setup has deeper DOF because 25mm inherently produces more DOF than 50mm.

The circle of confusion (CoC) is the largest blur spot that still appears sharp to the human eye at standard viewing conditions. For full-frame, 0.03mm is the traditional standard (based on 8×10 inch prints viewed at 10 inches). Smaller sensors need smaller CoC values because their images are enlarged more for the same print size.

Yes, by focusing at the hyperfocal distance. For a 20mm lens at f/11 on full-frame, hyperfocal is about 1.2 meters. Focus there, and everything from 0.6 meters to infinity will be acceptably sharp. This is the standard technique for landscape photography with foreground interest.

Telephoto lenses don't actually produce shallower DOF at the same aperture and subject distance. However, they compress perspective and magnify background blur circles. A 200mm lens at f/4 from 10 meters has similar DOF to a 50mm at f/4 from 2.5 meters, but the background appears much blurrier because it's magnified more.

Written and reviewed by the CalcToWork editorial team. Last updated: 2026-04-29.

Frequently Asked Questions

Yes, indirectly. Smaller sensors use shorter focal lengths for the same field of view, and shorter focal lengths produce deeper DOF. A 25mm lens on Micro Four Thirds gives the same view as 50mm on full-frame, but at f/2.8, the MFT setup has deeper DOF because 25mm inherently produces more DOF than 50mm.
The circle of confusion (CoC) is the largest blur spot that still appears sharp to the human eye at standard viewing conditions. For full-frame, 0.03mm is the traditional standard (based on 8×10 inch prints viewed at 10 inches). Smaller sensors need smaller CoC values because their images are enlarged more for the same print size.
Yes, by focusing at the hyperfocal distance. For a 20mm lens at f/11 on full-frame, hyperfocal is about 1.2 meters. Focus there, and everything from 0.6 meters to infinity will be acceptably sharp. This is the standard technique for landscape photography with foreground interest.
Telephoto lenses don't actually produce shallower DOF at the same aperture and subject distance. However, they compress perspective and magnify background blur circles. A 200mm lens at f/4 from 10 meters has similar DOF to a 50mm at f/4 from 2.5 meters, but the background appears much blurrier because it's magnified more.