Skip to content
PictureToLink logoPictureToLink
Menu

Depth of field calculator

A 50 mm lens at f/2.8 focused at 3 m on full frame is sharp from 2.73 m to 3.33 m, a zone 0.6 m deep. Choose your sensor, focal length, aperture and focus distance to get the same figures for your shot, with the hyperfocal distance and a table for every common aperture.

Change any value and the result updates as you type.

mm

The real focal length on the lens, not the 35 mm equivalent.

f/

Measured from the sensor plane; the focus distance you set.

Depth of field

0.6 m (1.97 ft)

Sharp from 2.73 m to 3.33 m

Near limit
2.73 m (8.95 ft)
Far limit
3.33 m (10.93 ft)
In front of the subject
0.27 m (0.89 ft), 45%
Behind the subject
0.33 m (1.08 ft), 55%
Hyperfocal distance
29.81 m (97.81 ft)Focus here and everything from 14.91 m to infinity is acceptably sharp
Circle of confusion used
0.03 mm
Depth of field at other apertures (50 mm lens focused at 3 m)
ApertureNear limitFar limitDepth of fieldHyperfocal
f/1.42.86 m3.16 m0.3 m59.57 m
f/22.8 m3.23 m0.43 m41.72 m
f/2.82.73 m3.33 m0.6 m29.81 m
f/42.63 m3.49 m0.87 m20.88 m
f/5.62.5 m3.74 m1.24 m14.93 m
f/82.34 m4.19 m1.85 m10.47 m
f/112.16 m4.91 m2.75 m7.63 m
f/161.92 m6.92 m5 m5.26 m
f/221.69 m13.56 m11.88 m3.84 m

Calculated in your browser; nothing you type is sent or stored. Spotted a wrong result? Tell us.

By Mudasir Ahsan (Founder) · Updated 10 November 2026

On this page

How to use the depth of field calculator

  1. 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.
  2. Enter the focal length printed on the lens. Use the real focal length, not a 35 mm equivalent.
  3. Enter the aperture you plan to use, such as 2.8 for f/2.8.
  4. 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.

SetupHyperfocalSharp fromSharp toTotal
50 mm, f/2.8, focused at 3 m, full frame (c = 0.03 mm)29.81 m2.73 m3.33 m0.6 m, 45% in front
35 mm, f/8, focused at 5 m, APS-C (c = 0.02 mm)7.69 m3.03 m14.22 m11.19 m
12 mm, f/8, focused at 5 m, Micro Four Thirds (c = 0.015 mm)1.21 m0.97 minfinityinfinite

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:

SensorCircle of confusion
Medium format 44 × 33 mm0.037 mm
Full frame / 35 mm film0.030 mm
APS-C (Nikon, Sony, Fujifilm, Pentax)0.020 mm
APS-C (Canon)0.019 mm
Micro Four Thirds0.015 mm
1-inch type0.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):

ApertureNear limitFar limitDepth of fieldHyperfocal
f/1.42.86 m3.16 m0.30 m59.57 m
f/22.80 m3.23 m0.43 m41.72 m
f/2.82.73 m3.33 m0.60 m29.81 m
f/42.63 m3.49 m0.87 m20.88 m
f/5.62.50 m3.74 m1.24 m14.93 m
f/82.34 m4.19 m1.85 m10.47 m
f/112.16 m4.91 m2.75 m7.63 m
f/161.92 m6.92 m5.00 m5.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 distanceNear limitFar limit
1 m0.92 m1.10 m
2 m1.68 m2.46 m
3 m2.34 m4.19 m
5 m3.39 m9.53 m
10 m5.11 minfinity

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 lengthf/5.6f/8f/11f/16
14 mm1.18 m0.83 m0.61 m0.42 m
16 mm1.54 m1.08 m0.79 m0.55 m
20 mm2.40 m1.69 m1.23 m0.85 m
24 mm3.45 m2.42 m1.77 m1.22 m
28 mm4.69 m3.29 m2.40 m1.66 m
35 mm7.33 m5.14 m3.75 m2.59 m
50 mm14.93 m10.47 m7.63 m5.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.

Questions and answers

How do you work out the sharp zone?

Find the hyperfocal distance H first, then put it into the near and far formulas above, with s as the focus distance. Subtract the near limit from the far limit to get the DoF. It takes a minute by hand. The calculator does it as you type.

What controls how much is sharp?

Three settings are in your hands. A smaller opening (a bigger f-number) gives more, a longer focus distance gives more, and a shorter focal length gives more at the same distance. Sensor size matters too, through the blur limit c and the lens you need for the same framing. A smaller sensor gives more at the same framing and f-number.

Does a crop sensor have more DoF?

At the same framing and the same f-number, yes. A crop sensor needs a shorter lens for the same view, and that more than makes up for its smaller circle of confusion. A 50 mm f/1.8 on a 1.5× APS-C camera gives about the DoF of a 75 mm f/2.7 on full frame. The crop factor calculator works out the equivalent aperture.

What is the best aperture for a portrait with a blurred background?

A wide aperture such as f/1.8 or f/2.8 on a short-telephoto lens gives a shallow zone. An 85 mm lens at f/1.8 focused at 2 m on full frame is sharp over only about 6 cm, enough for the eyes but not the ears, so focus on the nearest eye. For groups, stop down to f/4 or more so every face sits inside the sharp zone.

Is everything sharp at f/8?

No, only what falls between the near and far limits. A 50 mm lens at f/8 focused at 3 m on full frame is sharp from 2.34 m to 4.19 m. To get the most out of f/8, focus at the hyperfocal distance, here 10.47 m, and everything from about 5.2 m to infinity is sharp.

Why do two calculators give different results?

Usually it is the value of c. One calculator might use 0.03 mm for full frame and another 0.029 mm, or a stricter value for high-resolution sensors. Some also measure distance from the lens instead of the sensor plane, which matters only for close-ups. Give both the same c and the results will match closely.

All image, photo and design calculators