Depth of field: how aperture, distance, focal length and sensor size work together

A lens focuses one distance. Depth of field is the zone in front of that distance and behind it where the blur is still too small to notice, so the picture looks sharp from the near limit to the far limit.

What do you want the photo to do?

You do not need the formulas while you are shooting. Most choices are one of these three.

Depth of field calculator

Sharpness
0.030 mm

Camera on the left, looking into the scene: near, then focus, then far. Not to scale. The yellow gate is the circle of confusion, drawn larger than life.

Total depth of field
4.5 cm
1.978 m – 2.023 m
Front / rear
49.4% (2.2 cm) / 50.6% (2.3 cm)
Hyperfocal
172.1 m
Blur at the subject
60.7 mm at the subject, not on the sensor
Open these exact settings in the 3D portrait simulator

Standard is the usual limit for a print or a photo on a screen: 0.030 mm on full frame. The circle in use is 0.030 mm. 12 MP, 24 MP and 48 MP count one pixel of a 3:2 picture (0.0085 mm, 0.006 mm and 0.0042 mm on full frame), which is much stricter. Other sensors scale the circle with the diagonal.

Why there is a sharp zone instead of one thin line

Light from a point on the subject comes in through the whole aperture and narrows to a cone. Only the focused distance meets as a point on the sensor.

A point a little nearer or farther reaches the sensor before or after that tip, so it leaves a disc. While the disc stays inside the circle of confusion, c = 0.030 mm on full frame, it still looks sharp.

Stop down and the blades pinch that cone. A narrower cone stays inside c for a longer distance, so the sharp zone gets deeper.

Aperture, distance, and the one-third myth

Aperture scales the zone in proportion to the f-number. From f/2 to f/4 the entrance pupil is cut in half. At 85 mm and 2 m the sharp zone grows from 6.4 cm to 12.7 cm.

Subject distance scales it much faster. At 50 mm f/1.8 the zone is 4.1 cm at 1.0 m and 16.9 cm at 2.0 m. Double the distance and the zone is about four times as deep.

The rule “one third in front, two thirds behind” is one particular distance, not a law. In front of the subject the zone is s minus the near limit. Behind it, the far limit minus s. That split is about one to two only when the subject sits at one third of the hyperfocal distance. At a portrait distance the split is nearly even. At the hyperfocal distance the far limit is infinity and the near limit sits near half that distance.

85 mm on full frame, focused at 2.00 m. c = 0.030 mm.
ApertureEntrance pupilNearFarTotalFront / rearHyperfocal
f/1.270.8 mm1.981 m2.019 m3.8 cm49.5% (1.9 cm) / 50.5% (1.9 cm)200.8 m
f/1.460.7 mm1.978 m2.023 m4.5 cm49.4% (2.2 cm) / 50.6% (2.3 cm)172.1 m
f/1.847.2 mm1.972 m2.029 m5.7 cm49.3% (2.8 cm) / 50.7% (2.9 cm)133.9 m
f/2.830.4 mm1.956 m2.045 m8.9 cm48.9% (4.4 cm) / 51.1% (4.5 cm)86.10 m
f/421.3 mm1.938 m2.066 m12.7 cm48.4% (6.2 cm) / 51.6% (6.6 cm)60.29 m
f/5.615.2 mm1.915 m2.093 m17.8 cm47.8% (8.5 cm) / 52.2% (9.3 cm)43.09 m
f/810.6 mm1.881 m2.135 m25.5 cm46.8% (11.9 cm) / 53.2% (13.5 cm)30.19 m
50 mm f/1.8 on full frame. c = 0.030 mm.
Subject distanceNearFarTotalFront / rearTypical framing
0.70 m0.690 m0.710 m2.0 cm49.3% (1.0 cm) / 50.7% (1.0 cm)Tight headshot
1.00 m0.980 m1.021 m4.1 cm49.0% (2.0 cm) / 51.0% (2.1 cm)Head and shoulders
1.50 m1.454 m1.548 m9.4 cm48.4% (4.6 cm) / 51.6% (4.8 cm)Half-body portrait
2.00 m1.919 m2.088 m16.9 cm47.9% (8.1 cm) / 52.1% (8.8 cm)Environmental portrait
3.00 m2.820 m3.204 m38.3 cm46.8% (18.0 cm) / 53.2% (20.4 cm)Full body
5.00 m4.518 m5.598 m1.08 m44.7% (48.2 cm) / 55.3% (59.8 cm)Group
10.0 m8.233 m12.734 m4.50 m39.3% (1.77 m) / 60.7% (2.73 m)Street
Left, 35 mm, standing closer. Right, 85 mm, standing farther away, head the same size. Both at f/2. Open this pair larger

Does a longer lens give less depth of field?

It depends on whether you stay where you are. A longer lens often blurs the background more. That is two different photographs, not one rule.

Stay at 2.0 m and the longer lens zooms in. A 24 mm f/2 keeps 85.7 cm sharp. A 135 mm f/2 from the same spot keeps 2.5 cm. The person is much larger in the frame, and the sharp zone collapses.

Step back so the head stays the same size and the zone around the person comes back. A 24 mm at 0.96 m and a 135 mm at 5.40 m both keep about 18.9 cm to 18.7 cm sharp. The photos still look different. The 135 mm shows a narrower slice of the background, and distant detail looks much softer. Lens compression

Full frame, f/2, c = 0.030 mm. Same head size means the head matches a 50 mm lens at 2.00 m. The blur column is that size at the subject, not a circle on the sensor.
Focal lengthSharp zone if you stay at 2.0 mDistance for the same head sizeSharp zone at that sizeBlur at the subject
24 mm85.7 cm0.96 m18.9 cmØ 12.0 mm
35 mm38.8 cm1.40 m18.8 cmØ 17.5 mm
50 mm18.7 cm2.00 m18.7 cmØ 25.0 mm
85 mm6.4 cm3.40 m18.7 cmØ 42.5 mm
135 mm2.5 cm5.40 m18.7 cmØ 67.5 mm

Sensor size, circle of confusion and equivalence

A smaller sensor must be enlarged more to reach the same print, so the largest disc that still looks sharp is smaller. The circle here is 0.030 mm times the sensor diagonal divided by the full-frame diagonal.

Matching a 50 mm full-frame angle means a shorter lens, by the crop factor. Focal length is squared in the formula and the circle only shrinks with the crop, so that shorter lens at the same f-number keeps more of the subject sharp, by about the crop factor. To match the angle and the depth of field, divide the f-number by the crop as well.

Crop factor 56mm APS-C vs 85mm full frame

Same angle as 50 mm on full frame, focused at 2.00 m, all at f/2. The focal length is the real focal length on that sensor.
FormatSizeCropCircle of confusionFocal lengthDepth of fieldHyperfocal
1-inch13.2×8.82.73×0.0110 mm18.3 mm52.7 cm15.30 m
Micro Four Thirds17.3×132.00×0.0150 mm25.0 mm38.2 cm20.86 m
APS-C23.6×15.71.53×0.0197 mm32.8 mm28.9 cm27.33 m
Full frame36×241.00×0.0300 mm50.0 mm18.7 cm41.72 m
Digital medium format43.8×32.90.79×0.0380 mm63.3 mm14.7 cm52.82 m
Medium format 64556×41.50.62×0.0483 mm80.5 mm11.4 cm67.20 m
Medium format 6×770×560.48×0.0622 mm103.6 mm8.8 cm86.43 m
Large format 4×5121×960.28×0.1071 mm178.5 mm4.9 cm148.9 m
Large format 8×10240×1900.14×0.2122 mm353.7 mm2.2 cm295.1 m

Hyperfocal distance

Focus at the hyperfocal distance and the sharp zone runs from about half that distance out to infinity. That is as deep as the zone can be while still reaching infinity.

The table is full frame, c = 0.030 mm. At the same focal length and f-number, a smaller sensor pushes the hyperfocal distance farther out, because its circle of confusion is smaller. At 50 mm f/2 that is 41.72 m on full frame, 63.65 m on APS-C and 83.36 m on Micro Four Thirds: about 1.53 times and twice. Divide by the crop factor only in the other case, when the focal length is shortened as well so the angle of view stays the same. The sensor control above uses the exact diagonal.

The four formulas

  • H = f² / (N c) + f
  • Near = H s / (H + s − f)
  • Far = H s / (H − s + f), or infinity once s reaches H
  • Distant blur disc at the subject = f / N
Hyperfocal distance on full frame, c = 0.030 mm. Same focal length on a smaller sensor: multiply by the crop factor. Same angle of view: divide by it.
Focal lengthf/1.4f/2f/2.8f/4f/5.6f/8f/11f/16
16 mm6.11 m4.28 m3.06 m2.15 m1.54 m1.08 m0.79 m0.55 m
24 mm13.74 m9.62 m6.88 m4.82 m3.45 m2.42 m1.77 m1.22 m
28 mm18.69 m13.09 m9.36 m6.56 m4.69 m3.29 m2.40 m1.66 m
35 mm29.20 m20.45 m14.62 m10.24 m7.33 m5.14 m3.75 m2.59 m
50 mm59.57 m41.72 m29.81 m20.88 m14.93 m10.47 m7.63 m5.26 m
85 mm172.1 m120.5 m86.10 m60.29 m43.09 m30.19 m21.98 m15.14 m
135 mm434.1 m303.9 m217.1 m152.0 m108.6 m76.07 m55.36 m38.10 m
200 mm952.6 m666.9 m476.4 m333.5 m238.3 m166.9 m121.4 m83.53 m

See also Bokeh, Lens compression and How the portrait view measures the zone.

Questions

Which circle of confusion is used?

Standard viewing uses 0.030 mm on full frame, the usual limit for a print or a photo on a screen. 12 MP, 24 MP and 48 MP use one pixel of a 3:2 picture: 0.0085 mm, 0.006 mm and 0.0042 mm. The circle in use is 0.030 mm. Other sensors scale it with the diagonal.

Is depth of field always one third in front and two thirds behind?

No. That split happens when the subject is at one third of the hyperfocal distance. At portrait distance the split is nearly even. At the hyperfocal distance the far limit is infinity and the near limit is about half the hyperfocal distance.

Does a longer focal length give less depth of field?

If you stay in the same spot, yes. The person gets larger and the sharp zone collapses. If you step back so the head stays the same size, the zone around the person stays about the same. The distant background still blurs more, because the longer lens magnifies a narrower slice of it.

What is the hyperfocal distance?

H = f² / (N c) + f. Focus there and the zone runs from about H/2 to infinity. Closer than that, infinity is no longer inside the sharp zone.

Why does APS-C show more depth of field than full frame?

The same angle of view needs a shorter lens, and the shorter lens at the same f-number keeps a deeper zone. To match both the angle and the depth of field, divide the f-number by the crop factor as well.