Photo / Lens

Depth of Field Calculator

Work out how much of a photo is in focus, the nearest and farthest sharp distances, the total depth of field, and the hyperfocal distance, for full frame, APS-C, Micro Four Thirds, and phone cameras.

Depth of Field Calculator: Depth of field is the range of distances that look acceptably sharp. It is calculated with the standard thin-lens formulas from the focal length, the aperture, the focus distance, and the circle of confusion: the largest blur that still looks like a point in a normal print, about the sensor's diagonal divided by 1,500, so smaller sensors need a smaller one. The hyperfocal distance is the closest focus that keeps the horizon sharp. Runs 100% locally in your browser with zero server file uploads.

Runs
In your browser
Cost
Free · no sign-up
Availability
Ready to use
Depth of field calculatorLocal processing

Runs entirely in your browser

In focus from 2.7 m to 3.3 m

Depth of field
0.6 m
In front of the subject
0.27 m
Behind the subject
0.33 m
Hyperfocal distance
29.8 m
Subject2.7 m3.3 m

Focus at the hyperfocal distance, 29.8 m, and everything from half that distance to the horizon looks sharp. Circle of confusion: 0.03 mm for this sensor.

Using depth of field

For portraits, a shallow depth of field, a few centimetres to a few tens of centimetres, separates the subject from the background; focus on the nearest eye. For landscapes and architecture, stop down to f/8 to f/11 and focus near the hyperfocal distance to keep everything sharp.

To check the aperture and focal length of a photo you have taken, read its settings with the EXIF viewer.

Beyond the formula

The calculation assumes a normal print size and viewing distance. If you crop heavily or view at 100% on a large screen, sharpness falls off sooner, so allow some margin. Very small apertures such as f/22 also soften the whole picture through diffraction.

How to use it

  1. Choose your camera's sensor size.
  2. Enter the focal length, the aperture, and the distance you focus at, in metres or feet.
  3. Read where sharpness begins and ends, and the hyperfocal distance for landscapes.

Privacy & limitations

Everything runs in your browser.

Related tools

Frequently asked questions

How do I get a blurred background?

Open the aperture (a smaller f-number), use a longer focal length, get closer to the subject, and put more distance between the subject and the background. A larger sensor helps too at the same framing.

What is the hyperfocal distance?

Focus there and everything from half that distance to infinity looks sharp, the most depth a landscape can have. With a 24 mm lens at f/11 on full frame it is about 1.8 m.

Why do phones keep so much in focus?

Their tiny sensors use very short focal lengths for the same view, which gives a deep depth of field. Portrait modes blur the background with software instead.

Is depth of field split evenly around the subject?

No. At normal distances roughly a third lies in front of the subject and two thirds behind, and the share behind grows as you focus farther away.

Free tool · runs in your browser · no account required