Depth of Field (DoF) Calculator
Calculate depth of field for your camera settings.
By Jeff Beem
Updated
Lens
Subject distance
Sensor
Total depth of field
1.66 m
Information hub
The Circle of Confusion (CoC)
The Circle of Confusion is the largest blur circle that our eyes still perceive as a sharp point. Points outside the depth of field form circles on the sensor; once that circle exceeds the CoC, we see them as soft. This calculator uses CoC = sensor diagonal ÷ 1500, so larger sensors use a larger CoC and thus a deeper apparent DoF at the same print size.
Sensor size impact
At the same effective focal length and f-stop, a full frame sensor has a shallower depth of field than a crop (e.g. APS-C) sensor. If you want more background blur, full frame helps; if you want more of the scene sharp, a crop sensor gives you more DoF at equivalent framing.
Macro warning
As you focus very close (macro photography), depth of field becomes paper-thin, often only millimetres. A single shot usually can't keep the whole subject sharp. Focus stacking (several shots at different focus distances, merged in software) is the standard way to get a fully sharp macro image.
Hyperfocal distance
Focus at the hyperfocal distance and everything from half that distance to infinity falls within the depth of field. Landscape photographers use this to maximise sharpness across the frame, set your focus point to the hyperfocal distance shown in the results and stop down to f/8–f/11 for the sharpest zone from foreground to horizon.
Depth of field and sharpness
What actually controls how much of your image stays sharp, and how this calculator turns that into numbers you can use in the field.
Key ideas
Sensor size
Near and far limits
Hyperfocal
Macro and focus stacking
Custom sensor
Depth of Field (DoF) Calculator
Get near limit, far limit, total depth of field, and hyperfocal distance. Focal length, aperture, subject distance, and sensor size. Free DoF calculator for photography.
How the Math Works
- f (Focal length):Lens focal length in millimeters
- N (F-number):Aperture setting, e.g. 2.8, 5.6, 11
- s (Subject distance):Distance from camera to subject in mm (converted from meters or feet)
- c (CoC):Circle of Confusion = sensor diagonal ÷ 1500
Worked example: 50 mm lens at f/2.8, subject at 3 m, full-frame sensor (diagonal 43.27 mm).
- CoC = 43.27 ÷ 1 500 = 0.0288 mm
- H = 50² / (2.8 × 0.0288) + 50 ≈ 31 049 mm (31.0 m)
- Dn ≈ 2.74 m, Df ≈ 3.32 m
- Total DoF = 3.32 − 2.74 = 0.58 m (58 cm)
When the subject distance equals or exceeds H, Df becomes infinity—everything from Dn outward is acceptably sharp.
How to Use This Calculator
What this calculator does
Circle of Confusion and sensor size
Hyperfocal distance and macro
Depth of Field Calculator FAQ
What is the Circle of Confusion (CoC)?
Why does full frame have shallower depth of field than crop?
What is hyperfocal distance?
Why is my depth of field so thin in macro?
Can I use a custom sensor size?
Mathematical Reference Note
Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.
Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.
Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.