Depth of Field Calculator
Find out how much of your scene will be in focus, from your lens's focal length and aperture, your camera's sensor size, and your focus distance.
How Depth of Field Calculator Works
Depth of field is how much of a photo, in front of and behind the point you focused on, looks acceptably sharp rather than blurred. It depends on four things at once -- focal length, aperture, sensor size, and how far away your subject is -- so this calculator works out the actual near and far limits of the in-focus zone instead of relying on rules of thumb.
Formula & Method
The calculation starts with the hyperfocal distance H = f² / (N × c) + f, where f is focal length, N is the f-number, and c is the circle of confusion -- the largest blur spot the eye still perceives as a sharp point, which is derived from each sensor's diagonal size. From there, the near focus limit is (H × s) / (H + s − 2f) and the far limit is (H × s) / (H − s) (or infinity, if the subject distance s is beyond the hyperfocal distance), giving the full range that reads as in focus.
Worked Example
A 50mm lens at f/8 on a full-frame sensor, focused on a subject 3m away, has a hyperfocal distance of about 10.47m, a near limit of about 2.35m, and a far limit of about 4.21m -- a total in-focus zone of roughly 1.86m, split unevenly: more of it extends behind the subject than in front, which is true of depth of field in general.
Frequently Asked Questions
- Why is depth of field always deeper behind the subject than in front?
- This falls directly out of the near and far limit formulas -- the near limit is bounded (it can never get closer than half the hyperfocal distance, no matter how far the subject is), while the far limit grows without bound and reaches infinity once the subject is at or beyond the hyperfocal distance. The practical result is a roughly one-third in front, two-thirds behind split that photographers commonly rely on.
- Do smaller sensors really give more depth of field?
- Not directly -- for the exact same focal length, aperture, and subject distance, a smaller sensor actually has a very slightly narrower depth of field, because its smaller circle of confusion demands stricter sharpness. The common belief that small sensors give more depth of field comes from needing a shorter focal length to get the same framing on a smaller sensor, and it's that shorter focal length -- not the sensor size itself -- that increases depth of field.
- What exactly is the circle of confusion, and why does it change by sensor?
- It's the largest a point of light can blur into and still look like a sharp point to the human eye at a normal viewing distance -- it depends on how much an image needs to be enlarged to view, which depends on sensor size. This calculator uses standard reference circle-of-confusion values per sensor (based on each sensor's diagonal), matching what most published depth-of-field calculators use, rather than measuring your specific camera and viewing conditions.
- What happens if my subject is farther than the hyperfocal distance?
- Everything from roughly half the hyperfocal distance all the way to infinity comes into focus -- this is the basis of the "hyperfocal focusing" technique landscape photographers use: focus at the hyperfocal distance (rather than on any specific subject) to maximize the in-focus range from near foreground to infinity.
Subject distance is measured from the camera. Circle of confusion (the blur threshold used to define "acceptably sharp") is derived from each sensor's diagonal — these are standard reference values close to what most published depth-of-field calculators use, not an exact measurement of your specific camera. Note: for the same focal length, aperture, and distance, a smaller sensor actually has a very slightly narrower depth of field — the popular idea that small sensors give "more" depth of field comes from using a shorter focal length for equivalent framing, not from the sensor size itself.