The hyperfocal distance formula
H = f² ÷ (N × c) + f
- f is the real focal length of the lens in mm.
- N is the f-number, for example 11 for f/11.
- c is the circle of confusion in mm: the largest blur spot that still looks sharp.
For 21 mm at f/11: 21² = 441, 441 ÷ (11 × 0.03) = 1,336.4 mm, plus 21 mm gives 1,357.4 mm, or 1.36 m. Many calculators drop the final + f, which gives 1.34 m. The difference is only the focal length itself and does not matter in the field.
A hyperfocal table in Excel
Put the focal lengths down column A and the f-numbers across row 3. One formula with mixed references fills the whole table: =($A4^2/(B$3*$B$1)+$A4)/1000. The $ before A keeps the focal length column fixed, the $ before 3 keeps the f-number row fixed, and $B$1 always points to the circle of confusion. Dividing by 1000 turns millimetres into metres.
The table shows how strongly H depends on the focal length, because f is squared: a 16 mm lens at f/22 is sharp from 0.20 m to infinity when focused at 0.40 m, while a 50 mm lens at f/8 needs to be focused at 10.47 m. To read one value, look it up with =INDEX(B4:E8,MATCH(B11,A4:A8,0),MATCH(B12,B3:E3,0)).
Worked example: hyperfocal table for 16–50 mm on full frame
The circle of confusion in B1, the f-numbers in row 3 and the focal lengths in column A are inputs (yellow). B4:E8 is one copied formula. Rows 11 to 18 plan a landscape shot with a 21 mm lens at f/11.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Circle of confusion c (mm) | 0.030 | |||
| 2 | Hyperfocal distance H (m) | f/8 | f/11 | f/16 | f/22 |
| 3 | f-number N → | 8 | 11 | 16 | 22 |
| 4 | 16 | 1.08 | 0.79 | 0.55 | 0.40 |
| 5 | 21 | 1.86 | 1.36 | 0.94 | 0.69 |
| 6 | 28 | 3.29 | 2.40 | 1.66 | 1.22 |
| 7 | 35 | 5.14 | 3.75 | 2.59 | 1.89 |
| 8 | 50 | 10.47 | 7.63 | 5.26 | 3.84 |
| 9 | |||||
| 10 | Landscape plan | Value | |||
| 11 | Focal length (mm) | 21 | |||
| 12 | f-number | 11 | |||
| 13 | Hyperfocal distance H (m) | 1.36 | |||
| 14 | Sharp from (m), focused at H | 0.68 | |||
| 15 | Focus distance s (m) | 0.90 | |||
| 16 | Near limit at s (m) | 0.54 | |||
| 17 | Far limit at s (m) | 2.67 | |||
| 18 | Formula without + f (m) | 1.34 |
- B4
=($A4^2/(B$3*$B$1)+$A4)/1000Hyperfocal distance in m, copied to B4:E8 - B13
=INDEX(B4:E8,MATCH(B11,A4:A8,0),MATCH(B12,B3:E3,0))Look up the plan - B16
=B13*B15/(B13+B15)Near limit when focused at s - B17
=IF(B15>=B13,"infinity",B13*B15/(B13-B15))Far limit when focused at s
Thin-lens approximations, distances in metres, full-frame circle of confusion 0.03 mm. Educational calculations, with no affiliation with any camera or lens maker.
Choosing the circle of confusion
The circle of confusion is a viewing standard, not a property of the lens. The traditional value for full frame is about 0.03 mm (some use 0.029 mm, the sensor diagonal ÷ 1500), based on a print of about 8 × 10 inches seen from normal viewing distance. Smaller sensors need a smaller c in proportion to the crop factor, roughly 0.02 mm for APS-C and 0.015 mm for Micro Four Thirds.
Because c is in the denominator, halving it doubles the hyperfocal distance. If you print large or check images at 100% on a high-resolution sensor, use a smaller c, or simply focus a little beyond the value in the table.
Focusing closer or farther than H
If you focus at a distance s instead of H, the sharp zone changes. A good approximation when s is much larger than the focal length:
- Near limit ≈
H × s ÷ (H + s) - Far limit ≈
H × s ÷ (H − s), and infinity once s ≥ H
Focusing the 21 mm lens at 0.9 m, closer than H, gives a sharp zone from 0.54 m to 2.67 m: the foreground gets sharper, but the horizon is lost. Focusing at infinity is the opposite mistake: everything is sharp only from H, 1.36 m, onwards, and the near half of the zone is wasted. At exactly H, the near limit is H ÷ 2 and the far limit is infinity, the widest zone possible.
Why not just stop down to f/22?
A smaller aperture shortens the hyperfocal distance, but very small apertures soften the whole image through diffraction. On full frame, many landscape photographers prefer to stay around f/8 to f/11 and use the hyperfocal distance of that aperture, rather than f/22 everywhere. Compare the f/11 and f/22 columns of the table to see what you gain in depth.
Hyperfocal distance and depth of field
The hyperfocal distance is a special case of depth of field: the focus distance at which the far limit just reaches infinity. The general near and far limits use the same ingredients, f, N, c and the focus distance. The optics behind the focal length itself, how a lens forms an image at a given distance, are covered in the thin lens equation guide.
Common mistakes
- Mixing millimetres and metres. Keep f and c in mm inside the formula and convert the result once at the end.
- Using the full-frame circle of confusion on a smaller sensor. Divide 0.03 mm by the crop factor, about 0.02 mm for APS-C.
- Using the equivalent focal length. Use the real focal length printed on the lens with the smaller c of your sensor, not the full-frame equivalent.
- Focusing at infinity for landscapes. Everything closer than H is then soft. Focus at H to start the sharp zone at H ÷ 2.
- Treating "acceptably sharp" as pixel-sharp. The result depends on the chosen c. For large prints, use a smaller c.
Frequently asked questions
What is the formula for hyperfocal distance?
H = f² ÷ (N × c) + f, with the focal length f, the f-number N and the circle of confusion c in millimetres. Divide by 1000 for metres.
What is the hyperfocal distance of a 50 mm lens at f/8?
On full frame with c = 0.03 mm, it is about 10.47 m. Focused there, everything from about 5.2 m to infinity is acceptably sharp.
Does the hyperfocal distance depend on sensor size?
Yes, through the circle of confusion. A smaller sensor is enlarged more for the same print, so it needs a smaller c, which gives a longer hyperfocal distance at the same focal length and f-number.
Should I focus at infinity or at the hyperfocal distance?
For a scene with foreground interest, focus at the hyperfocal distance: the sharp zone then starts at half that distance and still reaches infinity. Focusing at infinity starts the sharp zone only at the hyperfocal distance itself.