By Mudasir Ahsan (Founder) · Updated 10 November 2026
On this page
How to use the depth of field calculator
- Pick your sensor size. It sets the circle of confusion, which is the amount of blur that still counts as sharp. Choose Custom to type your own value.
- Enter the focal length printed on the lens. Use the real focal length, not a 35 mm equivalent.
- Enter the aperture you plan to use, such as 2.8 for f/2.8.
- Enter the distance to the subject you are focusing on, in meters, feet or centimeters.
You get the near and far limits of acceptable sharpness, the total DoF, how much of it falls in front of the subject and how much behind, and the hyperfocal distance. Underneath, a table repeats the sums from f/1.4 to f/22, so you can see what stopping down does without retyping anything. It runs fine on a phone. Out on a shoot, that makes it a depth of field calculator app with nothing to install.
Distances are measured from the sensor plane, which many camera bodies mark with a circle crossed by a line. At normal shooting distances the gap between that mark and the lens is too small to matter.
Depth of field formula
Depth of field is the distance between the nearest and farthest points that look acceptably sharp in a photo. Four things set it: focal length, aperture, subject distance, and how much blur you accept as sharp. We use the standard thin-lens formulas, starting with the hyperfocal distance:
H = f² ÷ (N × c) + f
Then the limits for a subject at distance s:
- Near limit = s × (H − f) ÷ (H + s − 2f)
- Far limit = s × (H − f) ÷ (H − s), or infinity when s is at or beyond H
- DoF = far limit − near limit
Here f is the focal length in mm, N the f-number (8 for f/8), c the circle of confusion in mm, and s the focus distance converted to mm.
| Setup | Hyperfocal | Sharp from | Sharp to | Total |
|---|---|---|---|---|
| 50 mm, f/2.8, focused at 3 m, full frame (c = 0.03 mm) | 29.81 m | 2.73 m | 3.33 m | 0.6 m, 45% in front |
| 35 mm, f/8, focused at 5 m, APS-C (c = 0.02 mm) | 7.69 m | 3.03 m | 14.22 m | 11.19 m |
| 12 mm, f/8, focused at 5 m, Micro Four Thirds (c = 0.015 mm) | 1.21 m | 0.97 m | infinity | infinite |
Those are the same three cases the calculator is tested against. Work the first one by hand and you get H = 2,500 ÷ 0.084 + 50 = 29,812 mm. Near = 3,000 × 29,762 ÷ 32,712 = 2.73 m, and far = 3,000 × 29,762 ÷ 26,812 = 3.33 m. In the third row the subject sits beyond H, which is why the far limit runs to infinity.
Stopping down, moving back or fitting a wider lens makes the zone deeper. A longer lens or a closer subject makes it shallower. Don't read the limits as a hard edge in the picture, though. They describe what looks sharp at a normal viewing size, so a large print can show softness sooner.
Circle of confusion: what "sharp" means
A lens makes a point perfectly sharp only at the exact focus distance. In front of it and behind it, each point becomes a small disc. The circle of confusion is the largest disc that still looks like a point in a normal print viewed from a normal distance. One common rule sets it at the sensor's diagonal divided by 1,500, which gives full frame about 0.029 mm, usually rounded to 0.03 mm. Wikipedia's article on the circle of confusion explains where the convention comes from.
Presets on this page use these values:
| Sensor | Circle of confusion |
|---|---|
| Medium format 44 × 33 mm | 0.037 mm |
| Full frame / 35 mm film | 0.030 mm |
| APS-C (Nikon, Sony, Fujifilm, Pentax) | 0.020 mm |
| APS-C (Canon) | 0.019 mm |
| Micro Four Thirds | 0.015 mm |
| 1-inch type | 0.011 mm |
Your choice here changes the answer more than people expect. Why? That convention dates from film and small prints. If you view photos at 100% on a high-resolution screen, or make big prints, blur that passes the standard test will show. My advice for a 40 MP+ camera: halve c (0.015 mm on full frame), which gives a stricter, smaller zone you can actually trust at 100%. To use the page as a Canon depth of field calculator, take the Canon APS-C preset for Canon's 1.6× bodies and the full-frame preset for full-frame Canon cameras.
Posting a test shot on Reddit to ask why it looks soft? Upload it as an Image post and give the focal length, aperture and focus distance, so people can check it against these numbers. Our guide to posting images on Reddit has the steps.
Depth of field table: 50 mm at 3 m on full frame
Stop down and the sharp zone grows. Each row below keeps a 50 mm lens focused at 3 m (c = 0.03 mm):
| Aperture | Near limit | Far limit | Depth of field | Hyperfocal |
|---|---|---|---|---|
| f/1.4 | 2.86 m | 3.16 m | 0.30 m | 59.57 m |
| f/2 | 2.80 m | 3.23 m | 0.43 m | 41.72 m |
| f/2.8 | 2.73 m | 3.33 m | 0.60 m | 29.81 m |
| f/4 | 2.63 m | 3.49 m | 0.87 m | 20.88 m |
| f/5.6 | 2.50 m | 3.74 m | 1.24 m | 14.93 m |
| f/8 | 2.34 m | 4.19 m | 1.85 m | 10.47 m |
| f/11 | 2.16 m | 4.91 m | 2.75 m | 7.63 m |
| f/16 | 1.92 m | 6.92 m | 5.00 m | 5.26 m |
Two patterns show up. Behind the subject the zone grows faster than in front, because blur builds up more slowly as a point moves away from the focus distance than as it comes closer. And it speeds up again once the far limit nears the hyperfocal distance. Nothing comes free here. Each stop you close halves the light, and the exposure calculator finds the shutter speed or ISO that makes up for it.
f/8 depth of field at different distances
Now keep that lens at f/8 and move the focus point instead:
| Focus distance | Near limit | Far limit |
|---|---|---|
| 1 m | 0.92 m | 1.10 m |
| 2 m | 1.68 m | 2.46 m |
| 3 m | 2.34 m | 4.19 m |
| 5 m | 3.39 m | 9.53 m |
| 10 m | 5.11 m | infinity |
At 10 m the subject is just inside the 10.47 m hyperfocal distance. Strictly, the far limit is 223 m. For practical purposes that's infinity.
You may have learned "one third in front, two thirds behind". It's only a rough guide, and it fails at both ends. Close up the split is nearer half and half. At the hyperfocal distance, everything beyond the subject is sharp, so the "behind" share has no end at all.
Hyperfocal distance calculator
Focus at the hyperfocal distance and you get the most DoF the lens can give at that aperture. Everything from half that distance to infinity is acceptably sharp. Landscape photographers use it to hold the foreground and the horizon in one frame.
Say you have a 24 mm lens at f/11 on full frame. H = 576 ÷ 0.33 + 24 = 1,769 mm, so 1.77 m. Focus there and the scene is sharp from about 0.88 m to infinity.
Hyperfocal distances on full frame (c = 0.03 mm):
| Focal length | f/5.6 | f/8 | f/11 | f/16 |
|---|---|---|---|---|
| 14 mm | 1.18 m | 0.83 m | 0.61 m | 0.42 m |
| 16 mm | 1.54 m | 1.08 m | 0.79 m | 0.55 m |
| 20 mm | 2.40 m | 1.69 m | 1.23 m | 0.85 m |
| 24 mm | 3.45 m | 2.42 m | 1.77 m | 1.22 m |
| 28 mm | 4.69 m | 3.29 m | 2.40 m | 1.66 m |
| 35 mm | 7.33 m | 5.14 m | 3.75 m | 2.59 m |
| 50 mm | 14.93 m | 10.47 m | 7.63 m | 5.26 m |
Why not use f/22 for everything? Because small apertures soften the whole picture slightly through diffraction, even as they add depth. Many landscape photographers stop at f/8 to f/11 for that reason. If you're unsure, err on the far side when you focus. A slightly soft foreground is easier to live with than a soft horizon.
Macro depth of field calculator
Close up, the sharp zone shrinks to millimeters, and it's easier to work from magnification than from distance. A good approximation for the total is:
Depth of field ≈ 2 × N × c × (m + 1) ÷ m²
Here m is the magnification (1 for life size, 0.5 for half life size). At 1:1, f/8 and c = 0.03 mm, that's 2 × 8 × 0.03 × 2 ÷ 1 = 0.96 mm. Less than a millimeter. So macro photographers stop down further, or take several shots at different focus points and stack them. You can still use the main calculator for close-ups if you enter the distance from the lens, but expect small differences from your lens scale at very short range.
