GALAXY OF TOOLS

DESIGN SECTOR

Depth of Field Calculator – Near, Far and Background Blur

Near and far limits of sharp focus, total depth of field and background blur size for any lens and sensor.

Sensor width × height (mm)
mm
f/
Same unit. Gives the blur size of a detail at that distance.
mm
Leave empty for sensor diagonal ÷ 1500.
Total depth of field5.51 cmtotal depth of field — 1.97 m to 2.03 m, 85 mm at f/1.8 focused at 2 m
2.71 cmSharp in front of the focus point
2.79 cmSharp behind the focus point
139 mHyperfocal distance (focus here to be sharp to infinity)
0.044×Subject magnification on the sensor
1.4 mmBlur disc of a background detail at 6 m: 3.88% of image width, 48.4 × circle of confusion — strongly blurred
28.8 µmCircle of confusion (sensor diagonal ÷ 1500)

Depth of field by aperture

For the focal length, distance and background above. Blur is the size of the background disc as a share of image width.

ApertureNear limitFar limitTotalBackground blur
f/1.41.98 m2.02 m4.28 cm4.99%
f/21.97 m2.03 m6.12 cm3.49%
f/2.81.96 m2.04 m8.57 cm2.5%
f/41.94 m2.06 m12.2 cm1.75%
f/5.61.92 m2.09 m17.2 cm1.25%
f/81.88 m2.13 m24.6 cm0.87%
f/111.84 m2.18 m33.9 cm0.64%
f/161.78 m2.28 m49.7 cm0.44%
f/221.71 m2.4 m69.2 cm0.32%

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

How much of the picture will be in focus, and how blurred is the background

This depth of field calculator gives the nearest and farthest distances that will look sharp for your sensor, focal length, aperture and focus distance. Enter a background distance as well and it also works out the size of the blur disc behind your subject, which is what photographers mean by bokeh, as a share of the image width.

It handles portraits, landscapes and macro photography alike: distances can be metres, centimetres or feet, and the magnification on the sensor is shown. A table compares nine apertures at once. Everything runs in your browser.

How to use the depth of field calculator

  1. Pick a quick scenario or choose your sensor size; the circle of confusion is set automatically.
  2. Enter the focal length, aperture and the distance to your subject in metres, centimetres or feet.
  3. Read the near and far limits, the total depth of field and how much is sharp in front of and behind the focus point.
  4. Add a background distance to see the blur disc size. Use the table to see how f/2.8 compares with f/8.

Depth of Field Calculator features

Near, far and total

The sharp range in front of and behind the subject, in m, cm, mm or feet.

Background blur size

Blur disc in millimetres and as a percentage of image width for a detail at any distance.

Macro ready

Shows subject magnification and works at close distances with the full thin-lens formulas.

The formulas

With focal length f, f-number N, subject distance s and circle of confusion c, the hyperfocal distance is H = f² ÷ (N × c) + f. The limits of acceptable sharpness are near = s × (H − f) ÷ (H + s − 2f) and far = s × (H − f) ÷ (H − s); once s reaches H the far limit is infinite. These are the thin-lens relations for a symmetrical lens. The focus distance is the harmonic mean of the two limits, which gives a handy check.

For close work it is easier to think in magnification, m = f ÷ (s − f). Then the total depth of field is about 2 × N × c × (m + 1) ÷ m², so at 1:2 magnification (m = 0.5) with f/8 on full frame it is only about 2.8 mm. The calculator uses the exact limits, not this approximation, and shows both agree.

The blur of something that is not at the focus distance follows the formula in Wikipedia’s “Depth of field” article: the blur disc diameter is b = (f ÷ N) × m × |D − s| ÷ D, where D is the distance of the background or foreground detail. A detail looks sharp when b is no larger than the circle of confusion. For the default 85 mm f/1.8 portrait with the subject at 2 m and the background at 6 m, b is about 1.4 mm on the sensor, 3.9% of the frame width.

The circle of confusion, and what changes depth of field

Depth of field depends on how much blur you accept, so it is not a physical constant. The default circle of confusion is the sensor diagonal ÷ 1500, about 0.029 mm on full frame; type your own for large prints or high-resolution sensors. Depth of field grows with a smaller aperture, a shorter focal length at the same framing and a longer subject distance. A smaller sensor gives more depth of field at the same field of view and f-number.

Compare this with the hyperfocal distance calculator when you want everything to infinity sharp. Stopping down past about f/11 on full frame adds diffraction softness that no formula here includes.

Depth of Field Calculator FAQ

How do I calculate depth of field?

Compute the hyperfocal distance H = f² ÷ (N × c) + f, then the near limit s(H − f) ÷ (H + s − 2f) and far limit s(H − f) ÷ (H − s). This page does it for you.

How do I get a blurry background?

Use a longer focal length, a wider aperture, get closer to the subject and put more distance between the subject and the background. Enter the background distance to see the blur size.

Is depth of field calculator accurate for macro photography?

The thin-lens formulas are valid at close range for a symmetrical lens. Real macro lenses and extension tubes can differ, and diffraction limits how far you can stop down.

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

Only roughly, at moderate distances. The split moves towards half and half at high magnification and is lopsided near the hyperfocal distance. The tool shows the real split.

Does sensor size change depth of field?

Yes, through the circle of confusion and the focal length needed for the same view. Use the sensor menu rather than the full-frame default if you shoot a smaller format.

What is the difference from the hyperfocal calculator?

Hyperfocal focuses on landscape sharpness to infinity. This one is built around the subject and the background blur. Both use the same optics.

You might also need