Depth of Field DoF Calculator
Calculate depth of field, hyperfocal distance, near/far focus limits for any camera and lens combination with aperture comparison.
What Is Depth of Field (DoF)?
Depth of Field (DoF) is the distance range in a photograph where objects appear acceptably sharp. Everything within this zone appears in focus, while objects outside it become progressively blurred. Understanding DoF is essential for creative photography—use shallow DoF for portrait background blur, and deep DoF for landscape sharpness.
Key Formulas
$$H = \frac{f^2}{N \times c} + f$$
$$\text{Near} = \frac{s \times (H - f)}{H + s - 2f}$$
$$\text{Far} = \frac{s \times (H - f)}{H - s}$$
Where: H = Hyperfocal distance, f = Focal length, N = f-number, c = Circle of Confusion, s = Subject distance.
The Three Factors Controlling DoF
- Aperture (f-stop): Wide apertures (f/1.4-f/2.8) create shallow DoF. Narrow apertures (f/11-f/22) maximize DoF.
- Focal Length: Longer focal lengths produce shallower DoF at the same distance. Wide-angle lenses provide more DoF.
- Subject Distance: The closer you are, the shallower the DoF. Macro photography has razor-thin focus planes.
Hyperfocal Distance
When you focus at the hyperfocal distance, everything from half that distance to infinity appears sharp. This technique maximizes depth of field for landscape photography.
How to Use
- Select your camera sensor size (affects Circle of Confusion).
- Enter focal length (use presets or type custom value).
- Set aperture (f-stop).
- Enter subject distance with unit (m, ft, cm).
- View total DoF, near/far focus limits, and hyperfocal distance.
For geometric calculations related to field of view and camera angles, try the Right Triangle Calculator.
Frequently Asked Questions
How does aperture affect depth of field?
Wider apertures (lower f-numbers like f/1.4) create shallower depth of field with more background blur. Narrower apertures (higher f-numbers like f/16) create deeper DoF with more of the scene in focus.
What is hyperfocal distance?
Hyperfocal distance is the closest focusing distance at which everything from half that distance to infinity appears acceptably sharp. This maximizes DoF for a given aperture and focal length—essential for landscape photography.
How does sensor size affect DoF?
Larger sensors produce shallower DoF at the same framing because they require longer focal lengths and have larger Circle of Confusion values. Full-frame has shallower DoF than APS-C or Micro Four Thirds.
What is Circle of Confusion?
Circle of Confusion (CoC) is the optical spot caused by an out-of-focus point. It defines what appears "acceptably sharp." CoC varies by sensor size: Full Frame (0.03mm), APS-C (0.019-0.02mm), Micro Four Thirds (0.015mm).