Depth of field โ the slice of a scene that looks sharp โ is one of the most powerful creative controls a photographer has. This guide explains how depth of field is calculated, what hyperfocal distance means, how sensor size and crop factor change the result, and how aperture and focal length shape the bokeh in your images.
What depth of field is and how it's calculated
Depth of field is the range of distances in front of the camera that appears acceptably sharp. It is bounded by a near limit and a far limit, and the gap between them is your total depth of field. Three inputs drive it: focal length, aperture, and subject distance โ plus a fourth, hidden factor, the circle of confusion, which sets how much blur still counts as sharp.
The math starts with the hyperfocal distance, H = fยฒ / (N ร CoC) + f, where f is focal length, N is the f-number, and CoC is the circle of confusion. The near and far limits then follow from the subject distance s: near = s(H โ f) / (H + s โ 2f) and far = s(H โ f) / (H โ s). When the subject sits at or beyond the hyperfocal distance, the far limit becomes infinity and the background stays sharp forever.
Hyperfocal distance: the landscape shortcut
The hyperfocal distance is the closest point you can focus on while still keeping the horizon sharp. Focus exactly there and everything from half that distance all the way to infinity falls within your depth of field. For a 24mm lens at f/11 on full frame, the hyperfocal distance is only about 6 feet โ so focusing 6 feet away renders a sweeping landscape sharp from roughly 3 feet to the mountains.
This is why landscape photographers chase short focal lengths and small apertures: both shrink the hyperfocal distance and expand the zone of acceptable sharpness. The Hyperfocal Distance tab in this calculator shows the value for every aperture so you can pick the focus point that maximises front-to-back sharpness without stopping down so far that diffraction softens the image.
Crop factor and sensor size
Sensor size enters the calculation through the circle of confusion: a full-frame sensor uses about 0.029 mm, while a Micro Four Thirds sensor uses about 0.015 mm. At an identical focal length, aperture, and distance, the smaller sensor's tighter circle of confusion actually produces slightly less depth of field โ the opposite of the common rule of thumb.
The reason photographers say small sensors have more depth of field is that they rarely keep the focal length fixed. To match the framing of a 50mm full-frame shot on a 2ร crop body, you'd use a 25mm lens โ and that much shorter focal length deepens the depth of field far more than the smaller circle of confusion narrows it. The Sensor Comparison tab holds focal length constant so you can see the pure circle-of-confusion effect, then reason about field-of-view equivalence separately.
Bokeh and shallow depth of field
Bokeh is the look of the out-of-focus regions โ the soft, melting backgrounds behind a sharply rendered subject. It is the visible payoff of a shallow depth of field, and you maximise it by combining a wide aperture (small f-number), a longer focal length, a closer subject, and as much distance as possible between the subject and the background.
An 85mm f/1.8 lens focused on a portrait subject ten feet away yields only a few inches of depth of field, dissolving the background into smooth tones while keeping the eyes tack-sharp. Macro and telephoto work push this even further. Use the calculator to preview exactly how thin your focus slice will be before you shoot, so you can decide where to place focus and how much to stop down for the look you want.