Depth of Field Calculator
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.
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.
This calculator offers three modes to help you plan your shots:
- Depth of Field: Enter focal length, aperture, focus distance, and CoC (set by camera format) → get near/far limits and total DOF.
- Hyperfocal Distance: Enter focal length and aperture → get hyperfocal distance and the near limit when focused at hyperfocal.
- 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.
Typical depth of field for various scenarios (CoC = 0.030 mm):
| Lens / Aperture | Subject Distance | Near Limit | Far Limit | Total DOF | Use |
|---|---|---|---|---|---|
| 85mm f/1.8 | 2 m | 1.96 m | 2.04 m | 8 cm | Headshot portrait |
| 50mm f/2.8 | 3 m | 2.80 m | 3.24 m | 44 cm | Half‑body portrait |
| 35mm f/4 | 5 m | 4.10 m | 6.41 m | 2.31 m | Street photography |
| 24mm f/8 | 3 m | 1.99 m | 6.11 m | 4.12 m | Environmental portrait |
| 24mm f/11 | 1.5 m (hyperfocal ≈ 1.8 m) | 0.90 m | ∞ | Infinite | Landscape (hyperfocal) |
Shallow DOF (cm): Portraits, macro, selective focus.
Medium DOF (m): Group photos, general photography.
Deep DOF (∞): Landscapes, architecture, when everything must be sharp.
Below are answers to frequently asked questions about depth of field:
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.
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.
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.
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.
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.
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.