Depth of Field Calculator

Focus distance guide • 2026

Updated: Jan 2026

Depth of Field Formula:

Show the calculator

\( DOF = \frac{2 \cdot N \cdot c \cdot s^2}{f^2} \)

Where:

  • \( DOF \) = Depth of field (distance)
  • \( N \) = Aperture (f-number)
  • \( c \) = Circle of confusion (mm)
  • \( s \) = Subject distance (mm)
  • \( f \) = Focal length (mm)

This formula calculates the depth of field range where objects appear acceptably sharp. The circle of confusion is typically 0.03mm for full-frame cameras. DOF is influenced by aperture, focal length, subject distance, and sensor size.

Example: For f/8, 50mm lens, 3m distance, CoC=0.03mm:

DOF = (2 × 8 × 0.03 × 3000²) ÷ 50² = 2,592,000 ÷ 2,500 = 1037mm (1.04m)

Hyperfocal distance = (f² ÷ N×c) + f = (2500 ÷ 8×0.03) + 50 = 10,467mm.

Camera Settings

Advanced Options

Focus Analysis

1.04 m
Total Depth of Field
2.50 m
Near Focus Limit
3.54 m
Far Focus Limit
Medium
Focus Level
10.47 m
Hyperfocal Distance
7.2
DOF Score
Excellent
Sharpness Rating
Shallow Medium Deep
Measurement Value Description
Setting Effect Creative Use

Depth of Field Tips & Creative Applications

DOF Factors

Factors affecting depth of field:

  • Aperture: Wider (lower f-numbers) = Shallower DOF
  • Focal Length: Longer = Shallower DOF
  • Subject Distance: Closer = Shallower DOF
  • Sensor Size: Larger = Shallower DOF
  • Circle of Confusion: Smaller = Shallower DOF
Hyperfocal Distance

Hyperfocal distance focuses from near to infinity:

  • Formula: H = (f² ÷ N×c) + f
  • Effect: Maximizes sharp area in landscape photos
  • Usage: Focus at hyperfocal distance for max DOF
  • Limitation: May not be suitable for all compositions
  • Calculation: Depends on focal length and aperture
Creative Applications

Using DOF creatively:

  • Portrait: Wide aperture for subject isolation
  • Landscape: Narrow aperture for front-to-back sharpness
  • Macro: Very shallow DOF at close distances
  • Street: Medium aperture for selective focus
  • Sports: Consider DOF for action photography

Creative Photography Settings

Portrait
f/1.4-f/2.8, 50-85mm, Close focus - Shallow DOF, blurred background
Landscape
f/8-f/11, 16-35mm, Hyperfocal - Front-to-back sharpness
Macro
f/5.6-f/8, 100mm+, Close distance - Very shallow DOF
Street
f/5.6-f/8, 35-50mm, 3-5m - Selective focus, sharp details

Depth of Field & Photography Quiz

Question 1: Multiple Choice - DOF Factors

Which of the following combinations would result in the SHALLOWEST depth of field?

Solution:

The answer is B) f/2.8, 200mm, 2m distance. The shallowest depth of field is achieved by combining the widest aperture (f/2.8), longest focal length (200mm), and closest subject distance (2m). All three factors work together to minimize the area of acceptable sharpness, creating the most pronounced background blur.

Pedagogical Explanation:

This question tests understanding of how the three main DOF factors interact. Wide apertures (low f-numbers), longer focal lengths, and closer distances all contribute to shallower depth of field. When combined, these factors create the most dramatic separation between subject and background, which is ideal for portrait photography and subject isolation.

Key Definitions:

Depth of Field (DOF): Range of distance in acceptable focus

Hyperfocal Distance: Focus distance maximizing sharp area

Background Blur: Out-of-focus areas creating bokeh effect

Important Rules:

• Wide aperture = Shallow DOF

• Long focal length = Shallow DOF

• Close distance = Shallow DOF

Tips & Tricks:

• Remember: Wide + Long + Close = Shallow DOF

• Use shallow DOF for subject isolation

• Use deep DOF for landscape photography

Common Mistakes:

• Confusing f-stop numbers (lower f-number = wider aperture)

• Not considering the combined effect of all factors

• Assuming DOF is only controlled by aperture

Question 2: DOF Calculation

If you're using a 50mm lens at f/4 focused at 3 meters, what is the approximate depth of field? (CoC = 0.03mm) Show your work.

Solution:

Step 1: Calculate hyperfocal distance (H)

H = (f² ÷ N×c) + f = (50² ÷ 4×0.03) + 50 = (2500 ÷ 0.12) + 50 = 20,833 + 50 = 20,883mm ≈ 20.9m

Step 2: Calculate near and far limits

Near limit = (H × s) ÷ (H + s - f) = (20.9 × 3) ÷ (20.9 + 3 - 0.05) = 62.7 ÷ 23.85 ≈ 2.63m

Far limit = (H × s) ÷ (H - s + f) = (20.9 × 3) ÷ (20.9 - 3 + 0.05) = 62.7 ÷ 17.95 ≈ 3.49m

Step 3: Calculate total DOF = 3.49 - 2.63 = 0.86m

Approximate DOF is 0.86 meters.

Pedagogical Explanation:

This calculation demonstrates the mathematical relationship governing depth of field. The hyperfocal distance formula helps determine the focus distance that maximizes the area of sharpness. The near and far limits define the boundaries of acceptable sharpness. Understanding these calculations helps photographers make informed decisions about their settings.

Key Definitions:

Circle of Confusion: Maximum blur spot still perceived as sharp

Hyperfocal Distance: Focus distance for max DOF

Near/Far Limits: Boundaries of acceptable sharpness

Important Rules:

• DOF = Far limit - Near limit

• Hyperfocal distance = (f² ÷ N×c) + f

• Near limit = (H × s) ÷ (H + s - f)

Tips & Tricks:

• Use online calculators for precise results

• Approximate: DOF ≈ 2×N×c×s²÷f²

• For hyperfocal: H ≈ f² ÷ (N×c)

Common Mistakes:

• Forgetting to convert units (mm vs m)

• Using incorrect CoC values

• Not considering the full calculation sequence

Question 3: Word Problem - Landscape Photography

You're shooting a landscape with mountains in the distance. You want everything from 5 meters to infinity to be sharp. Your camera has a 24mm lens. What is the smallest aperture you should use? What would be the hyperfocal distance for this setting? Show your calculations.

Solution:

Step 1: For infinity focus, set focus distance to hyperfocal distance

Step 2: H = (f² ÷ N×c) + f

Step 3: We want near limit at 5m, so: 5 = (H × H) ÷ (H + H - f) = H² ÷ (2H - f)

Step 4: Simplify: 5 = H² ÷ (2H - f) → 5(2H - f) = H² → 10H - 5f = H²

Step 5: Rearrange: H² - 10H + 5f = 0

Step 6: With f = 24mm (0.024m): H² - 10H + 0.12 = 0

Step 7: Solve: H ≈ 9.99m

Step 8: From H = (f² ÷ N×c) + f: 9.99 = (0.024² ÷ N×0.03) + 0.024

Step 9: 9.966 = 0.000576 ÷ (N×0.03) → N = 0.000576 ÷ (9.966×0.03) ≈ 1.9

For safety, use f/2.8. Hyperfocal distance ≈ 6.9m.

Pedagogical Explanation:

This problem demonstrates hyperfocal distance calculations for landscape photography. When you focus at the hyperfocal distance, everything from half that distance to infinity appears acceptably sharp. This technique is essential for landscape photographers who need front-to-back sharpness.

Key Definitions:

Landscape Photography: Genre requiring front-to-back sharpness

Hyperfocal Focus: Technique for maximum DOF

Infinity Focus: Focusing for distant objects

Important Rules:

• Focus at hyperfocal for max sharp area

• Near limit ≈ H/2 when focused at H

• Use wider apertures to avoid diffraction

Tips & Tricks:

• Use f/8-f/11 for landscape photography

• Focus 1/3 into the scene for max DOF

• Check focus with live view magnification

Common Mistakes:

• Using too small aperture (diffraction)

• Not accounting for actual focus distance

• Confusing hyperfocal distance with focus distance

Question 4: Application-Based Problem - Macro Photography

You're doing macro photography with a 100mm lens at f/5.6, focused at 0.3m (1:1 magnification). The depth of field is extremely shallow. What would be the DOF? How would changing to f/11 affect the DOF? What considerations should you make for macro photography?

Solution:

Step 1: Calculate hyperfocal distance

H = (f² ÷ N×c) + f = (100² ÷ 5.6×0.03) + 100 = (10,000 ÷ 0.168) + 100 = 59,524 + 100 = 59,624mm ≈ 59.6m

Step 2: Calculate near and far limits at f/5.6

Near limit = (59.6 × 0.3) ÷ (59.6 + 0.3 - 0.1) = 17.88 ÷ 59.8 ≈ 0.30m

Far limit = (59.6 × 0.3) ÷ (59.6 - 0.3 + 0.1) = 17.88 ÷ 59.4 ≈ 0.30m

Step 3: At f/11: H = (100² ÷ 11×0.03) + 100 = (10,000 ÷ 0.33) + 100 = 30,303 + 100 = 30.4m

Near = (30.4 × 0.3) ÷ (30.4 + 0.3 - 0.1) = 9.12 ÷ 30.6 ≈ 0.30m

Far = (30.4 × 0.3) ÷ (30.4 - 0.3 + 0.1) = 9.12 ÷ 30.2 ≈ 0.30m

DOF is extremely shallow in macro photography.

Pedagogical Explanation:

This problem illustrates the extreme challenges of macro photography regarding depth of field. At 1:1 magnification, the DOF becomes incredibly thin, often measured in millimeters. Even stopping down to smaller apertures has limited effect on increasing DOF at close distances.

Key Definitions:

Macro Photography: Genre requiring high magnification

1:1 Magnification: Life-size reproduction on sensor

Focus Stacking: Technique combining multiple focus planes

Important Rules:

• DOF decreases dramatically at close distances

• Macro photography requires special focus techniques

• Diffraction becomes problematic at small apertures

Tips & Tricks:

• Use focus stacking for maximum sharpness

• Consider tilt-shift lenses for plane control

• Use LED focus lights for better visibility

Common Mistakes:

• Expecting normal DOF behavior in macro

• Using too small aperture (diffraction)

• Not accounting for magnification effects

Question 5: Multiple Choice - DOF Characteristics

Which of the following statements about depth of field is TRUE?

Solution:

The answer is B) DOF extends further behind than in front of focus point. The depth of field is asymmetrical, with approximately 1/3 of the DOF in front of the focus point and 2/3 behind it. This ratio changes with distance, but the rear DOF is always greater than the front DOF. This characteristic is important for composition and focus placement.

Pedagogical Explanation:

This question clarifies a common misconception about DOF symmetry. Understanding that DOF extends further behind the focus point than in front is crucial for focus placement, especially in landscape photography where you want to maximize sharpness in the background while ensuring foreground elements are also acceptably sharp.

Key Definitions:

Asymmetrical DOF: Unequal distribution of sharp area

Focus Placement: Strategic positioning of sharp area

Front/Rear DOF: Sharp area distribution

Important Rules:

• Rear DOF > Front DOF (asymmetrical)

• At hyperfocal: rear extends to infinity

• DOF varies with focal length and distance

Tips & Tricks:

• Focus 1/3 into scene for max rear DOF

• Use focus peaking to visualize DOF

• Consider DOF distribution in composition

Common Mistakes:

• Assuming DOF is symmetrical around focus point

• Not considering DOF distribution in composition

• Focusing too far forward in landscape shots

Depth of Field Calculator

FAQ

Q: How do I control depth of field for different photographic situations?

A: Controlling DOF depends on your creative goals:

  • Portraits: Wide aperture (f/1.4-f/2.8) for subject isolation
  • Landscape: Narrow aperture (f/8-f/11) for front-to-back sharpness
  • Macro: Careful focus placement due to shallow DOF
  • Sports: Balance DOF with shutter speed requirements

Mathematically, DOF is proportional to:

\( DOF \propto \frac{N \cdot c \cdot s^2}{f^2} \)

Where N=aperture, c=CoC, s=distance, f=focal length.

Q: What's the best approach for maximizing sharpness in landscape photography?

A: The most effective approach includes:

  • Hyperfocal Distance: Calculate for max sharp area
  • Aperture: f/8-f/11 (avoid diffraction)
  • Focus Point: 1/3 into scene or at hyperfocal
  • Technique: Use live view and focus peaking
  • Equipment: Tripod for precise focusing

Focus at hyperfocal distance to maximize sharp area from near to infinity.

About

Photography Team
This calculator was created
This calculator was created by our Photography & Video Team , may make errors. Consider checking important information. Updated: April 2026.