Depth of Field and Hyperfocal Distance, Worked Out
What sets the near and far limits of sharpness, where the circle of confusion comes from, why sensor size changes depth of field, and how to use the hyperfocal distance for landscapes.
· 11 min read

Depth of field is the stretch of distance, in front of and behind the point you focus on, that looks acceptably sharp in the final picture. Only one plane is ever in perfect focus; everything else is blurred by some amount. Depth of field is simply the zone where that blur is too small to notice. This article explains where the near and far limits come from, why the answer depends on a viewing standard called the circle of confusion, and how to use the hyperfocal distance to keep a whole landscape sharp. Every number below can be checked with the Depth of Field Calculator, which uses the same formulas.
Why there is a zone of sharpness at all
A lens brings light from one distance to a point on the sensor. Light from a closer or farther object comes to a point slightly behind or in front of the sensor, so on the sensor itself it spreads into a small disc. That disc is the blur circle. Its size grows as the object moves away from the focus distance, and it grows faster with a wide aperture, because a wide aperture sends light into the sensor at a steeper cone.
If the blur disc is smaller than the eye can resolve in the final print or screen, the object looks sharp. The largest blur disc that still passes is the circle of confusion, written c. Depth of field is the range of distances where the blur disc is no bigger than c.
Four inputs decide it:
- Focal length (f). Longer lenses magnify the subject and the blur, so they give less depth of field at the same distance.
- Aperture (N, the f-number). Stopping down narrows the cone of light and shrinks every blur disc.
- Focus distance (s). Depth of field grows quickly as the subject moves away; it roughly follows the square of the distance.
- Circle of confusion (c). A stricter sharpness standard means a smaller c and a thinner zone.
The formulas
The calculator uses the thin-lens formulas published by DOFMaster and found in most optics textbooks. First the hyperfocal distance:
H = f² ÷ (N × c) + f
Then, for a focus distance s:
- Near limit: Dn = s × (H − f) ÷ (H + s − 2f)
- Far limit: Df = s × (H − f) ÷ (H − s), for s smaller than H
- When s is at or beyond H, the far limit is infinity.
Distances are measured from the lens, not from the sensor mark on the camera body. For anything farther than a few focal lengths away the difference does not matter, but at macro distances it does, and so does the fact that real lenses are not thin.
Worked example: 50 mm at f/8, focused at 3 m
Take a full-frame camera, a 50 mm lens at f/8 and the traditional c = 0.03 mm.
- H = 50² ÷ (8 × 0.03) + 50 = 2,500 ÷ 0.24 + 50 = 10,467 mm, about 10.5 m.
- Near = 3,000 × (10,467 − 50) ÷ (10,467 + 3,000 − 100) = 2,338 mm.
- Far = 3,000 × (10,467 − 50) ÷ (10,467 − 3,000) = 4,185 mm.
- Total depth of field = 4,185 − 2,338 = 1,847 mm, about 1.85 m.
Notice that the zone is not centred on the subject. Only 0.66 m (36%) lies in front of the subject and 1.19 m (64%) lies behind it. The old rule of thumb of "one third in front, two thirds behind" is close here, but it is not a law: at close range the split approaches 50/50, and as you approach the hyperfocal distance almost all of the zone lies behind.
How aperture changes the zone
Here is the same 50 mm lens, still focused at 3 m with c = 0.03 mm, across the aperture range:
| Aperture | Near limit | Far limit | Total depth | Share in front |
|---|---|---|---|---|
| f/1.4 | 2.86 m | 3.16 m | 0.30 m | 47.5% |
| f/2.8 | 2.73 m | 3.33 m | 0.60 m | 45.0% |
| f/5.6 | 2.50 m | 3.74 m | 1.24 m | 40.1% |
| f/8 | 2.34 m | 4.19 m | 1.85 m | 35.8% |
| f/11 | 2.16 m | 4.91 m | 2.75 m | 30.5% |
| f/16 | 1.92 m | 6.92 m | 5.00 m | 21.7% |
Two patterns stand out. Doubling the f-number (two full stops) roughly doubles the depth while the zone is small compared with the distance, and as the far limit races off toward the hyperfocal distance, the zone grows faster than that and tips further behind the subject.
For portraits, the opposite end matters. An 85 mm lens at f/1.8 focused at 2 m gives a near limit of 1.972 m and a far limit of 2.029 m: about 5.7 cm in total. That is enough to keep both eyes sharp when the face is square to the camera, and not enough when the head is turned, which is why portrait photographers focus on the nearer eye.
The circle of confusion, and why sensor size matters
The value of c is a convention about viewing, not a property of the lens. The classic standard assumes an 8 × 10 inch print viewed from about 25 cm by someone with normal eyesight. On that print the eye can resolve roughly 0.2 mm, and scaling back down to the sensor gives c as about the sensor diagonal divided by 1,500. Zeiss used a stricter divisor of 1,730.
| Format | Diagonal | c = d ÷ 1500 | c = d ÷ 1730 |
|---|---|---|---|
| Full frame (36 × 24 mm) | 43.3 mm | 0.029 mm | 0.025 mm |
| APS-C (23.5 × 15.6 mm) | 28.2 mm | 0.019 mm | 0.016 mm |
| Micro Four Thirds (17.3 × 13 mm) | 21.6 mm | 0.014 mm | 0.012 mm |
Many published tables round the full-frame value up to 0.030 mm. The calculator lets you pick d/1500, d/1730 or your own value. If you judge sharpness by zooming to 100% on a high-resolution screen, or you print very large, use a smaller c, for example half the default. The near and far limits pull in accordingly.
Because c scales with the sensor, a smaller sensor does not simply give more depth of field. What matters is how you take the picture:
- Same lens, same position, same f-number. A 50 mm lens at f/8 focused at 3 m on APS-C (c = 0.0188 mm) gives 2.55 to 3.65 m, about 1.10 m of depth. On full frame (c = 0.0288 mm) the same settings give 2.36 to 4.12 m, about 1.77 m. The smaller sensor shows less depth because its image is enlarged more, but it also shows a tighter crop of the scene.
- Same framing, same f-number. To match the full-frame 50 mm framing, the APS-C shooter uses about 33 mm. At f/8 and 3 m that gives 2.13 to 5.08 m, about 2.96 m of depth: more than full frame. This is the everyday case behind "small sensors give more depth of field".
The equivalence works out to about one and a quarter stops for APS-C (crop 1.53) and two stops for Micro Four Thirds (crop 2) when the framing is matched: an APS-C camera at f/5.6 shows roughly the depth of full frame at f/8.5. To see how the framing itself changes with sensor size, the Field of View Calculator shows the angle of view and the crop factor for each format.
Hyperfocal distance for landscapes
The hyperfocal distance H is the closest focus distance at which the far limit reaches infinity. Focus exactly at H and everything from H ÷ 2 to infinity is acceptably sharp. That is the most depth of field a given lens and aperture can deliver while keeping the horizon sharp.
| Lens and aperture (c = 0.03 mm) | Hyperfocal distance | Sharp from |
|---|---|---|
| 16 mm at f/8 | 1.08 m | 0.54 m |
| 24 mm at f/11 | 1.77 m | 0.88 m |
| 35 mm at f/8 | 5.14 m | 2.57 m |
| 50 mm at f/8 | 10.47 m | 5.23 m |
A wide-angle lens at a moderate aperture has a short hyperfocal distance, which is why landscape photographers can put a rock 1 m from the camera and the mountains in the same sharp frame. A 24 mm lens at f/11 focused at 1.77 m keeps everything from 0.88 m to infinity in the zone.
Compare that with focusing at infinity. With the lens at infinity the near limit sits at H itself, 1.77 m, so you give away everything between 0.88 and 1.77 m for no gain. Focusing much past H wastes near depth in the same way: at 100 m the near limit is 1.72 m.
Three practical points:
- Leave a margin. The formulas assume perfect focus and a specific c. Many landscape photographers focus a little beyond H so the horizon is comfortably inside the zone, accepting a slightly farther near limit.
- Do not chase f/22. Small apertures increase diffraction blur, which softens the whole frame. On full frame, f/8 to f/11 is usually the best compromise; on smaller sensors diffraction appears sooner.
- Use the calculator's button. The "Focus at the hyperfocal distance" link in the tool sets the focus distance to H for the current lens and aperture, so you can read the near limit straight away.
Common mistakes
- Using the 35 mm equivalent focal length. Enter the actual focal length printed on the lens. The calculator applies the sensor size through c.
- Treating the limits as hard edges. Sharpness falls off gradually. An object just outside the limit is only slightly soft.
- Assuming the zone is split one third, two thirds. Check the front and behind figures; the split changes with distance.
- Judging at 100% with the print standard. Pixel-level sharpness needs a smaller c than a print viewed at arm's length.
- Ignoring focus breathing and macro. At magnifications above about 0.1×, use a macro-specific formula; the thin-lens model starts to drift.
Exposure and depth of field are linked through the aperture. If stopping down for depth makes the shutter too slow, the Exposure Calculator gives the equivalent shutter speed or ISO for the new aperture.
Sources
- DOFMaster, "Depth of Field Equations" (the hyperfocal, near and far formulas used here).
- Wikipedia, "Depth of field" and "Circle of confusion" (derivation, the d/1500 and Zeiss d/1730 conventions).
- Sidney F. Ray, Applied Photographic Optics, 3rd edition, Focal Press (thin-lens depth of field and the viewing standard).
Work through your own lenses and apertures with the Depth of Field Calculator.
Related searches
- depth of field calculator
- hyperfocal distance formula
- circle of confusion full frame
- does sensor size affect depth of field
- depth of field at f/8 50mm
- how to focus for landscapes
- depth of field in front and behind subject
- aps-c vs full frame depth of field
- near and far focus limits