Depth of Field Calculator
Work out what will be acceptably sharp at a given aperture and distance, with the hyperfocal distance and the sensor size properly accounted for.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the Depth of Field Calculator does
This depth of field calculator will work out what will be acceptably sharp at a given aperture and distance, with the hyperfocal distance and the sensor size properly accounted for. Fill in all 4 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for choosing an aperture for a portrait where the eyes must be sharp and the background is not. A related tool on this site is the camera field of view calculator.
How to use it
- Enter the real focal length, not the full-frame equivalent.
- Set the aperture and how far away the subject is.
- Pick your sensor — it changes the answer substantially.
How it works
Depth of field is not a property of the lens alone. Only one plane is ever truly in focus; everything else is a blur circle that grows with distance from that plane, and "sharp" means that circle is small enough not to be noticed. That threshold is the circle of confusion, and it depends on the sensor size, how much the image is enlarged and how far away it is viewed from — which is why the same lens at the same aperture gives a different answer on a full-frame body and a phone.
Four things move the result, and distance moves it most. Depth of field scales roughly with the square of the focus distance, so doubling the distance quadruples the depth. Aperture is linear: f/8 gives twice the depth of f/4. Focal length works against you sharply — at the same framing and subject distance, a longer lens gives much less depth. Sensor size enters twice, through the circle of confusion and through the focal length you need for the same framing, which is why small sensors produce such deep focus and why phone portraits need software blur.
The hyperfocal distance is the useful shortcut. Focus there and everything from half that distance to infinity falls within the depth of field, which is the maximum total depth any given aperture can deliver. It is the landscape photographer's setting. Note also that the "one third in front, two thirds behind" rule is only true near the hyperfocal distance; close up the split is nearly even, and far out almost all the depth is behind the subject.
When to use it
- Choosing an aperture for a portrait where the eyes must be sharp and the background is not.
- Setting hyperfocal focus for a landscape so everything from the foreground out is acceptably sharp.
- Checking whether a group will all fall inside the depth of field at a given aperture.
- Comparing what a lens does on two different sensor sizes.
Common mistakes to avoid
- Entering the full-frame equivalent focal length. The optics use the real one; the sensor selection handles the crop.
- Treating depth of field as absolute. It depends on how large the image is printed and how closely it is viewed; on screen at 100% everything looks shallower.
- Applying the one-third rule everywhere. It holds near the hyperfocal distance and nowhere else.
- Stopping down indefinitely for more depth. Past about f/11 on a small sensor, diffraction softens the whole frame faster than depth of field helps.
Frequently asked questions
What is the circle of confusion?
The largest blur circle still read as a point at normal viewing distance. It is the threshold that defines "acceptably sharp", and it scales with sensor size — roughly 0.03 mm for full frame, 0.015 mm for Micro Four Thirds.
What is the hyperfocal distance for?
Focus there and everything from half that distance to infinity is acceptably sharp. It gives the greatest total depth available at that aperture and is the standard landscape setting.
Why do phone cameras have such deep focus?
Very short actual focal lengths — a few millimetres — combined with a small sensor. The optics genuinely cannot produce shallow depth at normal distances, which is why portrait modes blur the background in software.
Should I just use the smallest aperture?
No. Beyond roughly f/11 on a crop sensor and f/16 on full frame, diffraction softens the entire image more than the extra depth gains. There is a best aperture rather than a smallest one.