photography calculators

Depth of Field Calculator

Calculates how much of your scene stays in sharp focus given your lens and shooting settings. Use it when choosing aperture, focal length, or subject distance for portraits, landscapes, or macro shots.

About this calculator

Depth of field (DoF) is the range of distances in a scene that appear acceptably sharp in a photograph. It depends on three factors: aperture (f-stop), focal length, and subject distance. A wider aperture (lower f-number) produces a shallower DoF, while a longer focal length or closer subject also reduces it. The formula used here is DoF = (2 × c × N × d²) / f², where c is the circle of confusion (0.03 mm for a full-frame sensor), N is the aperture f-number, d is the subject distance in mm, and f is the focal length in mm. Plugging in real values helps photographers predict whether a background will be pleasantly blurred or whether deep focus is achievable at a given distance.

How to use

Suppose you shoot a portrait at 85 mm focal length, f/2.8 aperture, and 3 m subject distance. Convert distance to mm: 3 m = 3000 mm. Apply the formula: DoF = (2 × 0.03 × 2.8 × 3000²) / 85² = (2 × 0.03 × 2.8 × 9,000,000) / 7,225 = 1,512,000 / 7,225 ≈ 209 mm, or about 20.9 cm. This means roughly 10 cm in front of and behind your subject will appear sharp — ideal for isolating a subject against a blurred background.

Frequently asked questions

How does aperture affect depth of field in photography?

Aperture is one of the most powerful controls over depth of field. A wide aperture like f/1.8 lets in more light but drastically narrows the zone of sharpness, which is why portrait photographers favor it for background blur. Conversely, a narrow aperture like f/11 or f/16 extends sharpness across a much larger range, making it popular for landscape photography. The relationship is not linear — each full stop change roughly doubles or halves the DoF.

What is the circle of confusion and why does it matter for depth of field?

The circle of confusion (CoC) is the maximum diameter of a blur spot that still appears sharp to the human eye at a given print or display size. For a full-frame 35 mm sensor the standard CoC is about 0.03 mm. Smaller sensors use a smaller CoC because their images are enlarged more to reach the same display size, which is why smartphones and compact cameras produce greater apparent sharpness at a given aperture. Changing the CoC value in the formula directly scales the calculated DoF.

Why does a longer focal length produce shallower depth of field?

Because focal length appears squared in the denominator of the DoF formula, even a modest increase has a large effect. A 200 mm lens focused at the same distance and aperture as a 50 mm lens produces a DoF roughly 16 times shallower. This is why telephoto lenses are prized for wildlife and sports photography where background separation is desired. It also means that on cropped-sensor cameras, which require shorter focal lengths for the same framing, achieving very shallow DoF is harder than on full-frame bodies.