How much of the shot is sharp?
Depth of field is the stretch of distance in front of and behind your focus point that looks acceptably sharp. Shallow depth of field gives you a razor-thin plane, with a creamy blurred background. Deep depth of field keeps nearly everything crisp.
Plug in your sensor, focal length, aperture and subject distance. The calculator gives the near and far limits, total depth of field, and how much falls in front of and behind the subject. An SVG diagram draws it out for you.
The three big controls
Aperture. A wider opening (lower f-number) shrinks depth of field. A narrower one grows it.
Distance to the subject. Move closer and depth of field gets thinner. Step back and it widens.
Focal length. Longer lenses seem to have less depth of field at the same framing distance. Here's the catch: if you frame the same subject size by changing distance, focal length matters far less than people think. Distance and aperture do most of the work.
Why sensor size matters
To get the same framing, a bigger sensor needs a longer lens or a closer position. That makes depth of field shallower at the same f-number. It's why full-frame cameras are known for a blurrier background than phones. Choosing your sensor in the tool applies the right circle of confusion, so the math fits your camera.
Circle of confusion
This is the blur size limit that still looks sharp at normal viewing. It's the reference the whole calculation hangs on. Smaller sensors use smaller values. If you print big, your standard is tougher, and real depth of field is smaller than the tool shows.
Hyperfocal distance
Focus at the hyperfocal distance and sharpness stretches from half that distance to infinity. The calculator reports it, so you can set up quickly for wide scenic shots. See the hyperfocal tool on this site for a closer look.
In the field, the split matters. Depth of field isn't centered on your focus point. At typical distances about one third sits in front and two thirds behind, and it evens out as you get very close.
Practical use
For portraits, open wide and get the eyes sharp. For groups, stop down so everyone is in focus. For macro, even f/16 may give only millimeters, so stack shots if you need more.
Remember that diffraction softens the image at very small apertures. Beyond about f/16 on many cameras, extra depth of field comes at a cost in sharpness.
All calculations happen in your browser.