Hyperfocal Distance and Depth of Field Calculator
Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 12/9/2026
Hyperfocal distance is H = f² / (N × c) + f. With a 50 mm lens at f/8 on full frame (c = 0.03 mm), H is about 10.5 m: focusing at that distance, everything is sharp from 5.2 m to infinity.
Explanation
In photography, depth of field is the zone of the image that looks sharp on either side of the plane you focus on. It depends on three settings: focal length, aperture and focus distance. The longer the focal length, the wider the aperture (small f-number) and the closer the subject, the shallower the sharp zone. Hyperfocal distance is a special case widely used in landscape work: it is the focus distance for which sharpness extends from half that distance to infinity. It is calculated as H = f² / (N × c) + f, where f is the focal length, N the f-number and c the circle of confusion, the largest blur spot the eye still perceives as a sharp point. That value depends on the sensor and the use: 0.03 mm is the common convention on full frame, 0.02 mm on APS-C. Once H is known, the sharpness limits for a focus distance s are Dn = s × (H − f) / (H + s − 2f) for the near limit and Df = s × (H − f) / (H − s) for the far limit, as long as s is less than H; beyond that, the far limit is infinite. The calculator shows results in meters and says whether sharpness reaches infinity. It also shows why stopping down, say from f/4 to f/11, increases depth of field: N rises, so H falls. Keep in mind that the calculation rests on a convention of acceptable sharpness; a very large print or close viewing may require a smaller circle of confusion, so tighter limits. Very small apertures, such as f/22, also introduce diffraction that softens the image. For the optics behind it, see the thin lens calculator and the angular resolution (Rayleigh criterion) calculator.
Example: a 50 mm lens at f/8 on a full-frame camera
Inputs
Focal length 50 mm, aperture f/8, circle of confusion 0.03 mm, focus at 5 m.
Calculation
H = 50² / (8 × 0.03) + 50 = 10,417 + 50 = 10,467 mm = 10.47 m. Near limit = 5,000 × 10,417 / (10,467 + 5,000 − 100) = 3,389 mm. Far limit = 5,000 × 10,417 / (10,467 − 5,000) = 9,527 mm.
Result
Sharp from 3.39 m to 9.53 m, a depth of field of 6.14 m; focusing at 10.47 m, everything would be sharp from 5.23 m to infinity.
Frequently asked questions
Why does the circle of confusion depend on the sensor?
Because it is expressed as a fraction of the sensor diagonal: a smaller sensor must be enlarged more to reach the same print size, so the tolerated blur is smaller.
Should I always aim for the hyperfocal distance in landscapes?
Not necessarily. It guarantees sharpness from half of H to infinity, but if a very close subject matters, or you want maximum sharpness at infinity, you may prefer to focus farther.
Why doesn’t a very small aperture give the best image?
From f/16 or f/22, diffraction of light on the aperture blades reduces overall sharpness. There is a trade-off between depth of field and sharpness.