Depth of Field Calculator

Find the near and far limits of sharpness, total depth of field and hyperfocal distance for any focal length, aperture, focus distance and sensor size.

The interactive tool loads here when JavaScript runs.

About this tool

What is the Depth of Field Calculator?

Enter your lens, aperture and the distance you focus at, and this depth of field calculator shows how close and how far things stay acceptably sharp, how deep that zone is, and how it splits in front of and behind your subject. It also gives the hyperfocal distance: focus there and everything from half that distance to the horizon is sharp, which is the standard trick for landscapes.

Pick your sensor format and the circle of confusion is set for you from the sensor diagonal, so the same numbers work for a full-frame body, an APS-C camera, Micro Four Thirds or a 1-inch compact. A table compares the same shot from f/1.4 to f/22, and a bar diagram shows where the sharp zone sits between the camera and infinity. Distances work in metres or feet.

  • Near limit, far limit, total depth and front and back split
  • Hyperfocal distance with one-click focusing at H
  • Sensor presets from 1/2.3-inch to 645 medium format, plus custom sizes
  • Circle of confusion from the sensor diagonal, Zeiss value or custom
  • Aperture comparison table and a sharp-zone diagram
  • Metres or feet, copy results and shareable links
Read the guide: Depth of Field and Hyperfocal Distance, Worked Out

How to use the Depth of Field Calculator

  1. Choose the sensor format, or Custom to type its width and height in millimetres.
  2. Enter the real focal length printed on the lens (not the full-frame equivalent) and the f-number you shoot at.
  3. Enter the focus distance and choose metres or feet.
  4. Leave the circle of confusion on the sensor-based default, or pick the Zeiss value or a custom one for large prints and pixel-level sharpness.
  5. Read the near and far limits, total depth and hyperfocal distance, and use the aperture table to see how stopping down changes them.

Worked examples

Standard lens at f/8

Input

Full frame, 50 mm, f/8, focused at 3 m, CoC 0.03 mm (custom)

Output

Near 2.34 m, far 4.19 m, total 1.85 m; hyperfocal 10.5 m

About 0.66 m is in front of the subject and 1.19 m behind it, the familiar one third to two thirds split.

Portrait with a fast short telephoto

Input

Full frame, 85 mm, f/1.8, focused at 2 m, CoC 0.03 mm

Output

Near 1.972 m, far 2.029 m, total about 5.7 cm

Less than 6 cm is sharp, so focus on the near eye. Stopping down to f/8 widens it more than fourfold.

Landscape at the hyperfocal distance

Input

Full frame, 24 mm, f/11, CoC 0.03 mm

Output

Hyperfocal 1.77 m; focused there, sharp from 0.88 m to infinity

Focusing on the horizon would waste the near half of the zone. The link under the inputs sets the focus to H for you.

Background and insight

Depth of field is not a property of the lens alone. A lens focuses perfectly on one plane; points in front of and behind it are imaged as small blur discs. Depth of field is the range over which those discs stay smaller than a chosen limit, the circle of confusion (CoC), so that a viewer cannot tell them from a point. The calculator uses the thin-lens formulas found in optics texts and in DOFMaster: hyperfocal distance H = f²/(N·c) + f, near limit s(H − f)/(H + s − 2f) and far limit s(H − f)/(H − s), which becomes infinite once the focus distance reaches H.

The CoC depends on how large the picture will be seen. The long-standing convention assumes roughly an 8 × 10 inch print viewed from about 25 cm and sets the limit at the sensor diagonal divided by about 1500, which gives 0.029 mm for 36 × 24 mm (tables usually round to 0.03 mm), 0.019 mm for APS-C and 0.014 mm for Micro Four Thirds. Zeiss used the stricter diagonal ÷ 1730. If you inspect files at 100% on a high-resolution sensor, the useful CoC is closer to two pixel widths, so set a custom value.

Two practical facts follow from the maths. At normal distances the zone extends further behind the subject than in front, approaching one third in front and two thirds behind as you focus further away, and it becomes nearly symmetrical in close-up work. And a smaller sensor gives more depth of field for the same framing and f-number, because it needs a shorter focal length to show the same view; that is why phone cameras find it hard to blur a background.

Common use cases

  • Portraits with a blurred background

    Check that a fast aperture still keeps both eyes sharp at your working distance, or how far to stop down for a couple.

  • Landscapes sharp from front to back

    Find the hyperfocal distance and the near limit so a foreground rock and the mountains are both in focus.

  • Group photos

    Make sure the front and back rows fit inside the sharp zone before you take the picture.

  • Product and food photography

    See how little depth there is at close range and decide whether to stop down or focus stack.

  • Comparing camera systems

    See how APS-C, Micro Four Thirds and full frame differ at the same framing and aperture.

Tips and limitations

  • Use the actual focal length. A 25 mm lens on Micro Four Thirds is still 25 mm for depth of field; the crop factor enters through the circle of confusion.
  • Distances are measured from the lens. Cameras mark the sensor plane with a ⊖ symbol; the difference matters only at close range.
  • Depth of field is not a hard edge. Sharpness falls off gradually either side of the focus plane, so treat the limits as a guide.
  • Past about f/11 on full frame (wider on smaller sensors) diffraction softens the whole frame, so extra depth of field costs overall detail.
  • The thin-lens formulas lose accuracy for macro work above about 0.5× magnification; use a macro-specific calculation there.
  • For prints larger than A4 or for 100% viewing, halve the circle of confusion to get a stricter answer.

Frequently asked questions

What circle of confusion should I use for full frame?

The convention is about 0.03 mm (the diagonal 43.3 mm divided by 1500 is 0.029 mm). For large prints or pixel-level viewing on a 40 MP or larger sensor, 0.015 to 0.02 mm is more realistic.

Does a crop sensor give more depth of field?

At the same framing and f-number, yes. A smaller sensor needs a shorter lens for the same view, and that more than offsets its smaller circle of confusion. At the same focal length and distance, the crop sensor shows a narrower view with slightly less depth of field.

What is the hyperfocal distance?

The closest focus distance at which the far limit of depth of field reaches infinity. Focus there and everything from half the hyperfocal distance to infinity is acceptably sharp.

Why is there more depth of field behind the subject than in front?

Blur grows faster for objects closer than the focus point than for objects beyond it, so the far limit sits further away. At ordinary distances the split is roughly one third in front and two thirds behind; at macro distances it is close to half and half.

Is depth of field measured from the lens or the sensor?

These formulas measure from the lens. Focus scales and laser rangefinders often measure from the sensor plane; the difference is a few centimetres and matters only close up.

How do I get the whole landscape sharp?

Pick an aperture such as f/8 to f/11 on full frame, focus at the hyperfocal distance and keep the nearest important object beyond half of it. If the foreground is closer than that, focus stack several frames instead of stopping down into diffraction.

Is there an in-depth guide to the Depth of Field Calculator?

Yes. “Depth of Field and Hyperfocal Distance, Worked Out” covers the background, how it works, common pitfalls and worked examples. Read the full guide.

People also search for

  • depth of field for 50mm at f/8 and 3 metres
  • hyperfocal distance for a 24mm lens at f/11
  • how much depth of field at f/1.8 for a portrait
  • circle of confusion value for aps-c
  • is more depth of field in front or behind the subject
  • depth of field micro four thirds vs full frame same framing
  • where to focus for a landscape so everything is sharp
  • depth of field in feet for a group photo