All the Tools You Need

Depth of Field Calculator | DOF, Hyperfocal Distance & Aperture Tool

Depth of Field Calculator

Calculate depth of field, hyperfocal distance, and required aperture for precise photography
Depth of Field
Hyperfocal Distance
Required Aperture
m
ft
Depth of Field
1.5 m
f=50mm, f/2.8, distance=5m, CoC=0.030mm
Near Limit
4.2 m
Far Limit
5.7 m
Hyperfocal Distance
30.1 m
Interpretation
Moderate depth of field suitable for portraits.
Depth of Field Formulas
H = f²/(N·c) + f
Dn = (H·s)/(H + (s-f))
Df = (H·s)/(H - (s-f)) (if s
f: Focal length (mm)
N: Aperture f‑number
c: Circle of confusion (mm)
H: Hyperfocal distance (same unit as distance input)
s: Focus distance
Dn, Df: Near and far limits of acceptable sharpness
DOF = Df - Dn (when Df finite)
People Also Ask
📷 What is depth of field?
Depth of field (DOF) is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in an image. It depends on aperture, focal length, focus distance, and sensor size.
🔍 How does aperture affect DOF?
Smaller f‑numbers (wider apertures) give shallower DOF, isolating the subject. Larger f‑numbers (smaller apertures) increase DOF, keeping more of the scene sharp.
📏 What is hyperfocal distance?
Hyperfocal distance is the focus distance that maximizes DOF; everything from half that distance to infinity is acceptably sharp. Useful for landscape photography.
⚙️ How does sensor size affect DOF?
Smaller sensors have a larger depth of field for the same angle of view because they require shorter focal lengths. This is why smartphones have deep DOF.
📊 What is circle of confusion (CoC)?
CoC is the largest blur spot that still appears as a point to the human eye under standard viewing conditions. It's used in DOF calculations and depends on sensor size and viewing assumptions.
🌍 Real-world applications of DOF?
Portrait photography (shallow DOF for subject isolation), landscape (deep DOF for entire scene), macro (extremely shallow), cinematography (creative focus pulls), product photography.
What is Depth of Field?

Depth of field (DOF) is the zone of acceptable sharpness in front of and behind the subject on which the lens is focused. It's a creative tool that photographers use to direct attention, isolate subjects, or capture sweeping landscapes. DOF is controlled by three main factors: aperture (f‑number), focal length, and subject distance, with sensor size playing an indirect role through the circle of confusion.

Why is DOF Important?

Understanding DOF allows photographers to pre‑visualize the final image and choose the right settings to achieve their artistic vision. It's essential for controlling background blur (bokeh), ensuring critical sharpness in macro work, and maximizing sharpness in landscape photography.

Key DOF concepts:

  • Shallow DOF: Narrow zone of sharpness (wide aperture, long focal length, close focus).
  • Deep DOF: Large zone of sharpness (small aperture, short focal length, distant focus).
  • Hyperfocal distance: Focus distance that gives maximum DOF for a given aperture.
  • Circle of confusion (CoC): The largest blur spot considered acceptably sharp.
How to Use This Calculator

This calculator offers three modes to help you plan your shots:

Three Calculation Modes:
  1. Depth of Field: Enter focal length, aperture, focus distance, and CoC (set by camera format) → get near/far limits and total DOF.
  2. Hyperfocal Distance: Enter focal length and aperture → get hyperfocal distance and the near limit when focused at hyperfocal.
  3. Required Aperture: Enter focal length, desired near and far limits (or infinity), and CoC → get the aperture needed to achieve that DOF range.

The calculator provides:

  • Accurate DOF calculations using standard photographic formulas.
  • Sensor format presets for common CoC values (Full Frame, APS-C, etc.) with custom option.
  • Flexible units: Distances in meters or feet.
  • Hyperfocal distance shown in all modes for reference.
Common DOF Examples (Full Frame)

Typical depth of field for various scenarios (CoC = 0.030 mm):

Lens / ApertureSubject DistanceNear LimitFar LimitTotal DOFUse
85mm f/1.82 m1.96 m2.04 m8 cmHeadshot portrait
50mm f/2.83 m2.80 m3.24 m44 cmHalf‑body portrait
35mm f/45 m4.10 m6.41 m2.31 mStreet photography
24mm f/83 m1.99 m6.11 m4.12 mEnvironmental portrait
24mm f/111.5 m (hyperfocal ≈ 1.8 m)0.90 mInfiniteLandscape (hyperfocal)
DOF Quick Guide:

Shallow DOF (cm): Portraits, macro, selective focus.
Medium DOF (m): Group photos, general photography.
Deep DOF (∞): Landscapes, architecture, when everything must be sharp.

Common Questions & Solutions

Below are answers to frequently asked questions about depth of field:

Calculation & Formulas
How is hyperfocal distance calculated?

Hyperfocal distance H = f²/(N·c) + f, where f is focal length in mm, N is aperture f‑number, c is circle of confusion in mm. The +f is often negligible for most photography.

Example: f=50mm, N=8, c=0.030mm → H = 50²/(8×0.030) + 50 = 2500/0.24 + 50 ≈ 10416.7 mm + 50 mm ≈ 10.47 m.

How to derive required aperture from desired near/far limits?

First compute hyperfocal H from near and far limits: H = (Dn·Df)/(Df - Dn) for finite far limit; if far limit is ∞, then H = Dn. Then required aperture N = f²/(c·H).

Example: want near=4m, far=6m, f=50mm, c=0.03mm. H = (4×6)/(6-4) = 24/2 = 12 m. N = 50²/(0.03×12000) = 2500/360 = 6.94 ≈ f/7.

Practical Applications
How to maximize DOF in landscape photography?

Use a small aperture (large f‑number, e.g., f/11–f/16) and focus at the hyperfocal distance. This ensures sharpness from half that distance to infinity. Wide‑angle lenses also help because they have inherently deeper DOF.

How to achieve shallow DOF for portraits?

Use a wide aperture (small f‑number, e.g., f/1.4–f/2.8), a longer focal length (85mm or more), and get closer to the subject. The background will blur, isolating the subject.

Science & Optics
What is the circle of confusion and how is it chosen?

CoC is the maximum allowable blur spot diameter that still appears as a point in a final 8×10 inch print viewed from a normal distance. It's traditionally set as sensor diagonal / 1500. For full frame (43mm diagonal), CoC ≈ 0.029 mm ≈ 0.03 mm. Smaller sensors have smaller CoC values.

Why does DOF depend on print size and viewing distance?

Acceptable sharpness is defined by human vision. Enlarging an image or viewing it closer makes blur more visible, effectively requiring a smaller CoC. Standard CoC values assume an 8×10 print viewed at 25 cm.

Scroll to Top