Depth of Field (DOF) Calculator
Focal length in mm, f-number, subject distance in m and circle of confusion in mm return the total in-focus range in meters, from the hyperfocal formula.
DOF (m)
—
Depth of Field: DOF ≈ 2·N·c·(s/f)²
Depth of Field (DOF) is how much of the scene, in front of and behind whatever you focused on, still looks sharp enough. Once your subject sits well past the hyperfocal distance, you can lean on the approximation DOF ≈ 2·N·c·(s/f)². Here N is the f-number (aperture), c the circle of confusion (around 0.03 mm for full-frame and 0.02 mm for APS-C), s the focus distance and f the focal length. Open the lens wide, say f/1.4, and the DOF goes thin enough to lift the subject off its surroundings. Stop down to f/16 and almost everything snaps into focus. Macro photography is a different world: DOF can drop to a couple of millimeters, which is why focus stacking exists. Landscape shooters tend to focus at the hyperfocal distance to squeeze out the most apparent sharpness. PhotoPills and DOFMaster work these numbers out for you. As an example, f=50 mm, N=2.8, s=3 m and c=0.03 mm give roughly 0.60 m of DOF.
Applications
Portraits where the background melts into a creamy blur (shallow DOF, f/1.4-f/2.8). Landscapes that stay sharp front to back (deep DOF, f/8-f/16 or hyperfocal focus). Macro and product shots built up with focus stacking. Cinematography, where focus pulls and rack focus are part of the storytelling. It also shows up in surveillance optics, microscopy and astrophotography.
FAQ
Why does sensor size affect DOF? To get the same framing on a smaller sensor you need a shorter focal length, and shorter focal lengths deepen the DOF. It explains why a phone looks like everything is in focus while a full-frame camera can wash the background out completely.
What is the circle of confusion? It's the biggest blur spot a viewer at normal distance still reads as a single point. The usual industry figures are 0.03 mm for full-frame, 0.02 mm for APS-C and 0.015 mm for Micro Four Thirds.
What is hyperfocal distance? It's the nearest point you can focus on while infinity still holds acceptable sharpness. Set focus there and the DOF runs as far as it can, with everything from half that distance out to infinity staying sharp.
Related Tools
Depth of Field Calculator
Calculate depth of field from aperture, focal length and subject distance. Result in meters: near, far and total distance.
Depth of Field and Circle of Confusion
Computes total depth of field in meters between near and far limits from focal length, f-number, subject distance and circle of confusion.
Telescope Field of View Eyepiece Magnification Degrees
Computes telescope true field of view in degrees from eyepiece apparent field and magnification.
Lens Field of View by Focal and Sensor
Computes horizontal, vertical and diagonal angle of view of a lens from focal length in mm and sensor size in mm.
Seed Planting Depth Calculator
Applies the rule of thumb of 2 to 3 times the seed diameter: enter 5 mm and the sowing range comes out as 10 to 15 mm deep in the soil.
Shallow Water Wave Celerity
Calculate the celerity of a wave in shallow water, c = √(g·h), from the water depth h (m) and gravity g. The result, in m/s, is the propagation speed when the depth is much smaller than the wavelength — a situation in which the wave 'feels' the bottom and its speed depends only on depth, no longer on the period. This is why waves refract as they approach the coast (the deeper part travels faster) and why tsunamis travel at hundreds of km/h in the deep ocean and slow down (piling up energy) as they reach the coast. Enter the water depth.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.