Depth of Field Calculator
See exactly how much of your scene will be in focus. Choose your sensor, then enter focal length, aperture and subject distance to get the near and far limits of sharpness, total depth of field, the hyperfocal distance and a table for every common f-stop.
How to use the Depth of Field Calculator
- Pick your sensor size, for example full frame or APS-C, or enter a custom size.
- Enter the real focal length printed on the lens and the aperture you will shoot at.
- Enter the subject distance in meters or feet.
- Read the near and far limits, total depth of field and hyperfocal distance.
- Compare apertures in the table to choose the f-stop that gives the depth you want.
Depth of field formulas
This calculator uses the standard thin-lens depth of field equations:
- Hyperfocal distance: H = f² ÷ (N × c) + f
- Near limit: Dn = s(H − f) ÷ (H + s − 2f)
- Far limit: Df = s(H − f) ÷ (H − s), or infinity when s ≥ H
- Depth of field: Df − Dn
where f is the focal length, N the f-number, c the circle of confusion and s the focus distance, all in millimeters.
Example: a 50 mm lens at f/2.8 on full frame (c = 0.029 mm) focused at 3 m. H = 50² ÷ (2.8 × 0.0288) + 50 ≈ 31,000 mm (31 m). The near limit is about 2.74 m and the far limit about 3.32 m, so roughly 58 cm is sharp, a little more behind the subject than in front.
Hyperfocal distance chart (full frame, c = 0.029 mm)
| Focal length | f/4 | f/8 | f/11 | f/16 |
|---|---|---|---|---|
| 16 mm | 2.23 m | 1.13 m | 0.82 m | 0.57 m |
| 24 mm | 5.02 m | 2.52 m | 1.84 m | 1.27 m |
| 35 mm | 10.6 m | 5.34 m | 3.90 m | 2.69 m |
| 50 mm | 21.7 m | 10.9 m | 7.93 m | 5.47 m |
| 85 mm | 62.7 m | 31.4 m | 22.9 m | 15.7 m |
Focus at the hyperfocal distance and everything from half that distance to infinity will be acceptably sharp.
What changes depth of field
- Aperture: each stop smaller (higher f-number) increases depth of field roughly in proportion to N.
- Distance: depth of field grows roughly with the square of the subject distance until you approach the hyperfocal distance.
- Focal length: at the same distance, a longer lens gives much less depth of field (roughly with 1/f²).
- Sensor and output size: the circle of confusion depends on how much the image is enlarged; bigger prints call for a smaller c.
Frequently asked questions
How is depth of field calculated?
First the hyperfocal distance is found with H = f² ÷ (N × c) + f, where f is focal length, N the f-number and c the circle of confusion. The near limit is s(H − f) ÷ (H + s − 2f) and the far limit is s(H − f) ÷ (H − s), where s is the focus distance. Depth of field is far minus near; if s is at or beyond H, the far limit is infinity.
What is the hyperfocal distance?
It is the focus distance that gives the most depth of field: when you focus at the hyperfocal distance, everything from half that distance to infinity looks acceptably sharp. Landscape photographers use it to keep both the foreground and the horizon in focus.
What is the circle of confusion?
It is the largest blur spot that still looks like a sharp point in the final image at a normal viewing size. A common standard is the sensor diagonal divided by 1500, about 0.029 mm for full frame and 0.019 mm for APS-C. Use a smaller value (diagonal ÷ 3000) if you make large prints or inspect images at 100%.
Does a smaller sensor give more depth of field?
At the same framing and the same f-number, yes. A smaller sensor needs a shorter focal length for the same view, which increases depth of field, even though its circle of confusion is smaller. That is why phone cameras show almost everything in focus.
How do I get a blurry background?
Use a wider aperture (smaller f-number such as f/1.8), a longer focal length, move closer to your subject and put more distance between the subject and the background. The table shows how quickly depth of field shrinks as you open up.
Should I enter the equivalent focal length?
No. Enter the real focal length printed on the lens (for example 25 mm on Micro Four Thirds) and pick the sensor. The calculator accounts for the sensor size through the circle of confusion and also shows the full-frame equivalent.