Home/Optics & Photonics/Geometric Optics/Depth of Field (Simplified)

Formula & Calculator

Depth of Field (Simplified)

Estimates the range of distances that appear acceptably sharp in a photograph, based on aperture, focal length, and focus distance.

OpticsGeometric OpticsPhotography

Depth of Field CalculatorDOF ≈ 2·N·c·s² / f²

DOF ≈ 2 · N · c · s² / f²
DOF = depth of field (m)  ·  N = f‑number  ·  c = circle of confusion (m)  ·  s = subject distance (m)  ·  f = focal length (m)
⟹ SolveDOF, N, c, s, f
m
m
m
m
Please fix the errors above.
Solve for:
Presets:
Depth of Field
DOF: N: c: s: f:
✓ Copied!
DOF Gauge
Shallow (< 0.1 m) Moderate (0.1–2 m) Deep (> 2 m)
DOF ≈ 2·N·c·s²/f²  ·  Simplified formula for small apertures and moderate distances.

Interpretation

DOF ≈ 2·N·c·s² / f². Approximate depth of field. N is f‑number, c is circle of confusion, s is focus distance, f is focal length. Used in photography.

DOF ≈ 2*N*c*s² / f²
Depth of Field (Simplified)

Variables

SymbolQuantityUnit
DOFDepth of fieldm
Nf-number
cCircle of confusionmm
sSubject distancem
fFocal lengthmm

What it means

Depth of field is the range of distances over which objects appear acceptably sharp. This simplified formula shows that DOF increases with smaller aperture (larger N), larger acceptable blur circle (c), and shorter focal length. It is used by photographers to control focus and to achieve creative effects. Understanding this helps in selecting aperture and focusing distance for desired sharpness. The formula is an approximation valid for small apertures and moderate distances.

Worked example

Depth of Field – Two Detailed Examples

Real‑World
Scenario: A photographer using a 50 mm lens at f/2.8 (N = 2.8) focuses on a subject 5 m away. Using the simplified DOF formula with circle of confusion c = 0.03 mm, they calculate DOF ≈ 2×N×c×s²/f² = 2×2.8×0.03×5²/50² = 0.00168 m ≈ 1.68 mm. This extremely shallow depth of field is typical for wide apertures, creating a beautiful bokeh effect that isolates the subject.
ParameterValue
N (f‑number)2.8
s (focus distance, m)5
f (mm)50
1DOF = 2 × 2.8 × 0.03 × 5² / 50² = 2×2.8×0.03×25/2500 = 0.00168 m
Result 1.68 mm ✓ Shallow DOF
Scenario: A landscape photographer uses a 35 mm lens at f/16 (N = 16) focused on a scene 10 m away. The DOF ≈ 2×16×0.03×10²/35² = 0.0784 m ≈ 7.84 cm. This large depth of field ensures that both foreground and background are sharp, which is essential for landscape photography where everything from near to far should be in focus.
ParameterValue
N16
s10
f35
1DOF = 2×16×0.03×100 / 1225 = 96/1225 ≈ 0.07837 m
Result 7.84 cm ✓ Large DOF
Insight: Depth of field increases with smaller aperture (larger N), shorter focal length, and greater focusing distance. The simplified formula assumes a constant circle of confusion, typically 0.03 mm for full‑frame sensors.

Common mistakes

  • Depth of field (simplified): DOF ≈ 2·N·c·s² / f² – for distant objects (hyperfocal approximation).
  • N: f‑number (focal ratio).
  • c: Circle of confusion diameter – often taken as the sensor’s pixel pitch or a standard value (e.g., 0.03 mm for 35mm).
  • s: Subject distance – in the same units as f.
  • f: Focal length – in the same units as s.
  • Assumptions: Small apertures, not macro distances – for macro, use more complex formulas.

Applications

Depth of field (simplified), DOF ≈ 2·N·c·s²/f², estimates the range of distances that appear acceptably sharp in an image, depending on aperture (N), circle of confusion (c), object distance (s), and focal length (f). Photographers and cinematographers use this to control which parts of the scene are in focus. Engineers designing camera systems use it to set specifications. A small aperture gives large depth of field, while a large aperture gives shallow depth of field for subject isolation. This concept is also applied in machine vision to ensure proper focus of objects. Understanding depth of field is essential for creative and technical photography.

  • Photography and cinematography – creative focus control
  • Camera system design and specification
  • Machine vision – ensuring object focus in production lines
  • Optical simulation and ray tracing
  • Education on aperture and focus effects

Frequently Asked Questions

Q01What is the Depth of Field (Simplified) formula used for?
A01

It estimates the range of distances that appear acceptably sharp in a photograph: DOF ≈ 2·N·c·s² / f².

Q02What do the variables N, c, s, and f represent?
A02

N = f‑number.
c = circle of confusion (acceptable blur diameter).
s = focus distance.
f = focal length.

Q03What is the circle of confusion and why is it important?
A03

It is the largest blur spot that is still perceived as sharp. It is often set to about 1/1500 of the image diagonal for a given sensor size.

Q04How does the DOF change with aperture?
A04

DOF is proportional to N; a smaller aperture (larger N) gives deeper DOF. A larger aperture (smaller N) gives shallower DOF.

Q05Why does DOF depend on focal length and focus distance?
A05

DOF is inversely proportional to f² and proportional to s². Longer focal lengths and closer focus distances give shallower DOF.

Q06Give a worked example using the DOF formula.
A06

For a 50mm lens (f=0.05 m) at f/2.8 (N=2.8), focusing at s=2 m, with c=0.03 mm (0.00003 m): DOF ≈ 2×2.8×0.00003×4 / (0.05²) = 2×2.8×0.00012 / 0.0025 = 0.000672 / 0.0025 ≈ 0.269 m = 27 cm.

Q07What are the common pitfalls when applying the DOF formula?
A07

  • Assuming depth of field depends only on aperture; focal length and distance have a stronger effect.
  • Using the wrong circle of confusion for the sensor size.
  • Not converting units consistently.

Q08How does sensor size affect DOF?
A08

Smaller sensors require shorter focal lengths for the same field of view, which increases DOF for the same f‑number.

Q09What is the hyperfocal distance?
A09

The focus distance beyond which everything is acceptably sharp. It is given by H = f²/(N·c) + f.

Q10How is DOF used in portrait photography?
A10

Portrait photographers use wide apertures (small N) to achieve shallow DOF, blurring the background while keeping the subject sharp.