On this page
Landscape photographers have a trick. Instead of focusing on the mountains, they focus a little closer, at a distance called the hyperfocal distance. A full-frame 50 mm lens at f/8, focused at 10.5 m, makes everything from 5.2 m to the horizon look sharp. The same idea explains why a phone's main camera barely needs to refocus for a landscape: its hyperfocal distance is only about 3.5 m. Both numbers come from the lens formula and one pair of similar triangles.
What does "sharp" mean for a photo?
A lens brings light from one point of a scene to one point on the sensor only for objects at the exact focus distance. Light from any other distance arrives as a small disc, called the circle of confusion. Our post on how camera aperture affects brightness and blur explains in words why a smaller aperture makes this disc smaller, and so gives a deeper zone of sharpness. It does not say how deep.
To get a number you have to decide how big a disc still looks like a point. That is a convention, not a law. It depends on how large the photo is printed or shown and how far away you look at it. ZEISS lens designer H. H. Nasse, in Depth of Field and Bokeh, calls 0.03 mm "the usual" circle of confusion for the 24 × 36 mm format, and ZEISS tables use the sensor diagonal divided by 1,500, which is 0.029 mm. "Sharp" in this post means acceptably sharp at that size, not perfectly focused.
How do you derive the hyperfocal distance?
Use the lens formula in the real-is-positive form, 1/s + 1/v = 1/f, where s is the object distance and v the image distance. (In the NCERT sign convention this is 1/v − 1/u = 1/f with u negative; the result is the same.) Let the aperture diameter be D = f/N, where N is the f-number.
Light from infinity comes to a point at v = f.
Focus at distance s. The sensor now sits at v = sf/(s − f), slightly behind f.
Blur from infinity. The cone from infinity has width D at the lens and shrinks to a point at f. Past that point it opens out again. By similar triangles, its width at the sensor is D(v − f)/f.
Set that blur equal to c. (f/N)(v − f)/f = c, so v − f = Nc.
Find the focus distance. Put v = f + Nc into the lens formula: s = fv/(v − f) = f(f + Nc)/(Nc).
So the hyperfocal distance is:
H = f²/(Nc) + f
Units check: mm² ÷ mm = mm.
Now ask what else is sharp when you focus at H. A point at distance H/2 focuses at about f + 2Nc, the same distance behind the sensor as infinity's image is in front of it. Its cone hits the sensor with a blur of about c as well. Nasse's paper makes the same point with light cones: the front edge of the depth of field lies at half the hyperfocal distance. So, focused at H, everything from H/2 to infinity is acceptably sharp.
Worked example: a 50 mm lens at f/8
Take a full-frame camera with c = 0.03 mm, a 50 mm lens and f/8.
Nc. 8 × 0.03 = 0.24 mm.
f²/(Nc). 50² ÷ 0.24 = 2,500 ÷ 0.24 = 10,417 mm.
H. 10,417 + 50 = 10,467 mm = 10.5 m.
Near limit. H/2 = 5.2 m. Everything from 5.2 m to infinity is acceptably sharp.
Change the aperture or the lens:
50 mm at f/2: H = 41.7 m, sharp from 20.9 m.
50 mm at f/16: H = 5.26 m, sharp from 2.63 m.
24 mm at f/8: H = 2.42 m, sharp from 1.21 m.
Halving the focal length cuts H by about four times, because H depends on f². Wide-angle lenses are the easy ones for landscapes.
What if you focus somewhere else?
For a focus distance s, the near and far limits of the sharp zone are:
Near limit: s(H − f)/(H + s − 2f), close to sH/(H + s).
Far limit: s(H − f)/(H − s), close to sH/(H − s), for s less than H.
Focus the same 50 mm f/8 lens at 5 m instead of 10.5 m. The sharp zone runs from 3.39 m to only 9.53 m. The mountains are now soft. With focus at 5 m, light from infinity makes a 0.063 mm blur, about twice the allowed 0.03 mm.
Focus beyond H and the far limit is still infinity, but the near limit moves away from you. Focusing at H gives the deepest possible zone.
Why does a phone camera rarely need to focus on a landscape?
Google's Pixel phone hardware tech specs list the Pixel 8 main camera as 50 megapixels, 1.2 μm pixels, f/1.68, an 82° field of view and a 1/1.31-inch sensor. Google does not print the focal length, so work it out, assuming the sensor is 4:3 and the 82° is measured across the diagonal, as phone makers usually quote it.
Sensor area. 50 × 10⁶ × (1.2 × 10⁻³ mm)² = 72 mm².
Diagonal. For a 4:3 sensor, 9.80 mm × 7.35 mm, diagonal 12.25 mm.
Focal length. (12.25/2) ÷ tan 41° = 7.04 mm.
Scale factor. 43.27 mm (the full-frame diagonal) ÷ 12.25 mm = 3.53. That makes the lens behave like a 25 mm lens on full frame.
Circle of confusion. 0.03 ÷ 3.53 = 0.0085 mm, the same fraction of the frame as 0.03 mm on full frame.
H. 7.04² ÷ (1.68 × 0.0085) + 7.04 = 3,479 + 7 mm, about 3.5 m.
Focused at about 3.5 m, the Pixel 8 main camera is acceptably sharp from about 1.7 m to the horizon, even at its widest aperture. That is why a landscape needs no refocusing. A close subject is a different story: focused at 1 m, the sharp zone is only 0.78 m to 1.40 m, which is why phones still need the autofocus described in how phone cameras focus automatically.
Why not just use f/22 for everything?
Stopping down shrinks H, but a very small aperture adds its own blur from diffraction. That trade-off is worked in why f/16 softens a photo. Also remember that c is a choice. Nasse notes that for the highest sharpness requirements the allowed blur should be halved. With c = 0.015 mm, the 50 mm f/8 lens has H = 20.9 m and is sharp from 10.4 m.
For more lens-formula problems worked one step at a time, the Fermi Problem Library has a step-by-step solver that explains the reasoning.
Quick checklist
Circle of confusion c: the largest blur that still looks sharp, a convention (0.03 mm for full frame).
Hyperfocal distance: H = f²/(Nc) + f.
Focused at H: sharp from H/2 to infinity.
50 mm f/8 full frame: H = 10.5 m, sharp from 5.2 m.
Focused at 5 m instead: sharp only from 3.39 m to 9.53 m.
Shorter focal length or smaller aperture gives a smaller H.
Pixel 8 main camera: H about 3.5 m, sharp from about 1.7 m.
Very small apertures add diffraction blur.



