Depth of Field Calculator

Enter the lens, the distance to your subject and the sensor. The calculator gives the nearest and farthest distances that look acceptably sharp, the depth between them, the hyperfocal distance, and the depth at each common aperture.

Free Runs in your browser Checked Tuesday, November 10, 2026

The focal length of the lens in millimetres, for example 50.

The f-number of the aperture, for example 2.8 for f/2.8.

The distance from the camera to the subject you focus on, in metres. It must be longer than the focal length.

The size of your camera's sensor. A full-frame camera has a 36 × 24 mm sensor.

Result

Total depth of field — The far limit minus the near limit: the depth that looks sharp.
Near limit — The closest distance that looks acceptably sharp.
Far limit — The farthest distance that looks acceptably sharp. It is infinity when the focus reaches the hyperfocal distance.
Hyperfocal distance — Focused here, everything from half this distance to infinity looks acceptably sharp.
Circle of confusion — The sensor diagonal divided by 1500.
Depth at other apertures

This tool runs in your browser. What you enter is not sent to us.

How to use it

  1. Type the Focal length of the lens in millimetres, and the Aperture as an f-number, such as 2.8.
  2. Type the Subject distance in metres and choose your camera's Sensor.
  3. Read the Total depth of field, the Near limit and the Far limit in metres.
  4. Use the table to see the same subject distance at other apertures.

How the limits are calculated

The hyperfocal distance H is the focus distance at which everything from H / 2 to infinity looks acceptably sharp. It depends on the focal length f, the f-number N and the circle of confusion c, the largest blur spot that still looks sharp.

When the lens is focused at a distance s, the near limit is s H / (H + s). The far limit is s H / (H − s) when s is shorter than H, and infinity otherwise. The Depth of field article on Wikipedia states that the focus distance is the harmonic mean of the near and far limits, which gives the far limit from the near one.

The circle of confusion is the sensor diagonal divided by 1500. For full frame that is 43.27 ÷ 1500 = 0.029 mm, the value the Circle of confusion article gives for the 35 mm format.

H = f² ÷ (N × c) + f
Near limit = s × H ÷ (H + s)
Far limit = s × H ÷ (H − s), infinity when s ≥ H
Total depth = far limit − near limit
c = sensor diagonal ÷ 1500

What the calculator does not cover

  • Close-up and macro work, where the subject is only a few focal lengths away: the formulas are for subjects at ordinary distances.
  • A different print size or viewing distance: the circle of confusion is a convention, and a larger print shows the blur more easily.
  • Diffraction at very small apertures and the sharpness of the lens itself: the limits only use the circle of confusion.

Worked example: 50 mm at f/8, subject at 3 m, full frame

The circle of confusion of a full-frame sensor is 43.27 ÷ 1500 = 0.02884 mm. The hyperfocal distance is 50² ÷ (8 × 0.02884) + 50 = 10,884 mm, or 10.88 m.

With the focus at 3 m, the near limit is 3 × 10.88 ÷ (10.88 + 3) = 2.35 m and the far limit is 3 × 10.88 ÷ (10.88 − 3) = 4.14 m. The total depth is 4.14 − 2.35 = 1.79 m, so everything from 2.35 m to 4.14 m looks sharp.

Question Answer
Circle of confusion, full frame 0.02884 mm (0.029 mm)
Hyperfocal distance 10.88 m
Near limit 2.35 m
Far limit 4.14 m
Total depth of field 1.79 m

Frequently asked questions

What is depth of field?

Depth of field is the distance between the nearest and the farthest objects that look acceptably sharp in a photograph. The Depth of field article on Wikipedia defines it this way, and the calculator gives both ends of that range.

What is the hyperfocal distance?

The hyperfocal distance is the focus distance at which everything from half that distance to infinity looks acceptably sharp. The Hyperfocal distance article gives the formula H = f² ÷ (N × c) + f for it.

Why does a smaller aperture give more depth of field?

The f-number multiplies the circle of confusion in the formulas. A higher f-number, a smaller aperture, makes the hyperfocal distance shorter and the total depth larger, as the table shows at each aperture.

Does a smaller sensor change the depth of field?

Yes. The circle of confusion is the sensor diagonal divided by 1500, so a smaller sensor has a smaller circle and a shallower depth at the same focal length, f-number and distance. To match the framing you need a shorter focal length, which changes the depth again; the Crop factor tool shows that.

Is the circle of confusion the same for every camera?

No. It is a convention, and the calculator uses the sensor-diagonal rule of the Circle of confusion article. Other rules and other print sizes give other values, so the limits differ a little between sources.

Why is the far limit infinity in some cases?

When the focus distance reaches the hyperfocal distance, the far limit moves to infinity, because every distance beyond the subject is then acceptably sharp. The calculator shows a note when this happens.

Sources

Figures and text last checked on Tuesday, November 10, 2026.

We use necessary cookies to run the site. With your consent, Google also uses advertising cookies to show personalised ads. If you reject them, you still see ads, but they are not personalised.