Skip to content

Depth of Field Calculator

Depth of field for any lens, aperture and focus distance: near and far limits of sharpness, hyperfocal distance, circle of confusion by sensor and crop factor.

Calculator Details

Depth of field:6.138 mSee results ↓

The real focal length printed on the lens (not the full-frame equivalent)

f/1.4 to f/22 on most lenses; a bigger number means a smaller opening and more depth of field

Distance from the camera to the subject you focus on

Sets the circle of confusion: 0.030 mm on full frame divided by the crop factor (DOFMaster convention)

Your Results

Depth of field: 6.138 m

Depth of field

6.138 m

From 3.389 m to 9.527 m

Near limit

3.389 m

1.611 m in front of the subject

Far limit

9.527 m

4.527 m behind the subject

Hyperfocal distance

10.47 m

Focus here: sharp from 5.233 m to infinity

Circle of confusion

0.03 mm

Crop 1×: like 50 mm at f/8 on full frame

Everything from 3.389 m to 9.527 m is acceptably sharp, a depth of field of 6.138 m (1.611 m in front of the subject and 4.527 m behind).

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Depth of field by aperture

Depth of field by aperture

Detailed Breakdown

Near and far limits at 50 mm, focused at 5 m
ApertureNear (m)Far (m)Depth (m)
f/1.44.6165.4540.8374
f/24.4695.6741.205
f/2.84.2875.9981.711
f/44.046.5582.518
f/5.63.7527.4923.74
f/8 (yours)3.3899.5276.138
f/113.02414.4311.4
f/162.564100.898.24
f/222.168∞∞

Same lens, focus distance and circle of confusion; full stops from f/1.4 to f/22.

How This Calculator Works

How It’s Calculated

Hyperfocal H = f² ÷ (N × c) + f
Near = s(H − f) ÷ (H + s − 2f) · Far = s(H − f) ÷ (H − s), or ∞ when s ≥ H

Your calculation: with f = 50 mm, N = 8 and c = 0.03 mm, H = 10.47 m. Focused at s = 5 m, the near limit is 3.389 m and the far limit 9.527 m.

The circle of confusion is the largest blur spot that still looks sharp in a normal print or screen view: 0.030 mm on full frame, smaller on smaller sensors because their images are enlarged more.

Frequently Asked Questions

What is depth of field?

The range of distances that look acceptably sharp in a photo. Only one distance is truly in focus; in front of and behind it the blur grows gradually, and depth of field is where it stays too small to notice. A 50 mm lens at f/8 focused at 5 m on full frame keeps everything from 3.39 m to 9.53 m sharp.

How does aperture change depth of field?

A smaller opening (a bigger f-number) narrows the cone of light and shrinks the blur, so depth of field grows. The same 50 mm shot at f/2 is sharp only from 4.47 m to 5.67 m, 1.21 m deep instead of 6.14 m at f/8.

What is the hyperfocal distance?

The closest focus distance at which everything out to infinity is still sharp. Focus there and the sharp zone runs from half that distance to infinity. For 50 mm at f/8 on full frame it is 10.5 m, sharp from about 5.23 m. Landscape photographers use it to get the foreground and the horizon both sharp: an 18 mm lens at f/11 on APS-C has a hyperfocal distance of only 1.49 m.

Why is a portrait background so blurry?

A longer lens, a wide aperture and a close subject all shrink depth of field. An 85 mm lens at f/1.8 focused on a face 3 m away has only 0.13 m of depth, about 0.064 m in front of the eyes and 0.067 m behind, so the background falls well out of focus.

What circle of confusion should I use?

This calculator follows DOFMaster’s convention: 0.03 mm for full frame divided by the crop factor (Full frame (35 mm) 0.03 mm; APS-H (1.3×) 0.023 mm; APS-C (1.5×: Nikon, Sony, Fujifilm) 0.02 mm; APS-C Canon (1.6×) 0.019 mm; Micro Four Thirds (2×) 0.015 mm; 1-inch (2.7×) 0.011 mm). It assumes a print about 20 × 25 cm viewed at arm’s length. If you print large or view at 100% on screen, use a smaller value, which gives a shallower, more critical depth of field.

Do smaller sensors give more depth of field?

Yes, for the same framing and f-number. A Micro Four Thirds camera with a 25 mm lens at f/2.8 frames like a 50 mm lens on full frame and has the depth of field of f/5.6: 3.76 m at 5 m, against 3.74 m for 50 mm at f/5.6 on full frame. Multiply both the focal length and the f-number by the crop factor to get the full-frame equivalent.

Is depth of field split evenly in front of and behind the subject?

No. At normal distances more of it lies behind the subject: about one third in front and two thirds behind is a common rule, and at the default 5 m it is 26.2% in front. Close up (macro) the split approaches half and half; near the hyperfocal distance the part behind stretches to infinity.

Uses the thin-lens depth-of-field formulas (Ray, Applied Photographic Optics, ch. 6) with DOFMaster’s circle of confusion convention, 0.030 mm on full frame divided by the crop factor. Distances are measured from the lens. It leaves out macro distances (where the lens extension and pupil magnification matter), focus breathing, lens aberrations and diffraction softening at small apertures, and the viewing size and eyesight that the circle of confusion stands in for. Treat the limits as a guide, not a hard edge.

Depth of Field Calculator: Near and Far Limits and Hyperfocal Distance

By FindMySum · Last reviewed

No photograph is sharp everywhere. A lens focuses perfectly at one distance, and things nearer or farther blur a little more the further they are from it. Depth of field is the zone in which that blur stays too small to notice. This depth of field calculator gives the near and far limits of that zone for any lens, aperture, focus distance and sensor size, the total depth and how it splits in front of and behind your subject, the hyperfocal distance, and a table of the same shot at every full stop from f/1.4 to f/22.

The circle of confusion

A point that is slightly out of focus records as a small disc instead of a point. If the disc is small enough, the eye still sees a point. That largest acceptable disc on the sensor is the circle of confusion, c. For a full-frame (35 mm) sensor the usual value is 0.030 mm, which corresponds to a print about 20 × 25 cm viewed from arm's length.

Smaller sensors have to be enlarged more for the same print, so their circle of confusion is smaller, by the crop factor: 0.020 mm on a 1.5× APS-C camera, about 0.019 mm on Canon's 1.6× APS-C, and 0.015 mm on Micro Four Thirds. These are the DOFMaster values the calculator uses. You can enter your own if you print very large or inspect images at 100%.

The formulas

With focal length f, f-number N, circle of confusion c and focus distance s:

  • hyperfocal distance H = f² ÷ (N × c) + f
  • near limit = s(H − f) ÷ (H + s − 2f)
  • far limit = s(H − f) ÷ (H − s), or infinity when s is at or beyond H

These come from the thin-lens equation and similar triangles. They are accurate for normal shooting distances; for close-up and macro work the lens's extension and pupil magnification matter and these formulas understate the sharp zone's thinness.

Worked example: a 50 mm lens at f/8

The calculator opens with a 50 mm lens on a full-frame camera at f/8, focused on a subject 5 m away:

  • H = 50² ÷ (8 × 0.030) + 50 = 10,467 mm, or 10.47 m
  • near limit = 5 × (10.47 − 0.05) ÷ (10.47 + 5 − 0.10) = 3.39 m
  • far limit = 5 × (10.47 − 0.05) ÷ (10.47 − 5) = 9.53 m
  • depth of field = 9.53 − 3.39 = 6.14 m: 1.61 m in front of the subject and 4.53 m behind

Open up to f/2 and the sharp zone shrinks to about 1.2 m; stop down to f/16 and it runs from about 2.6 m to about 100 m.

What controls depth of field

  • Aperture: the biggest lever. Each stop smaller (a larger f-number) deepens the zone.
  • Distance: depth of field grows rapidly with the focus distance. Close-ups are razor thin; distant scenes are sharp throughout.
  • Focal length: at the same distance, a longer lens has much less depth of field.
  • Sensor size: for the same framing and f-number, a smaller sensor gives more depth of field. Multiply the focal length and the f-number by the crop factor to find the full-frame equivalent: a 25 mm lens at f/2.8 on Micro Four Thirds frames and renders depth like a 50 mm lens at f/5.6 on full frame.

The hyperfocal distance

Focus at the hyperfocal distance and everything from half that distance to infinity is acceptably sharp: the deepest depth of field you can get at that aperture. Landscape and street photographers use it to keep both the foreground and the horizon sharp, or to pre-focus without autofocus. With an 18 mm lens at f/11 on an APS-C camera, the hyperfocal distance is only about 1.5 m, so focusing there covers everything from 0.75 m to the horizon.

In front of and behind the subject

At ordinary distances, about a third of the depth of field lies in front of the focus point and two thirds behind it, which is why it is often better to focus a little into a scene than on its nearest point. Close up, the split tends toward half and half. Near the hyperfocal distance, the part behind stretches to infinity.

Limits

Depth of field is a convention, not a hard boundary: sharpness fades gradually. Diffraction softens the whole image at very small apertures, and real lenses have aberrations the thin-lens model ignores. Use the numbers as a reliable guide, then check on the camera.

More questions

Why do my landscape photos look soft at f/22?

Diffraction. At very small apertures, light spreading around the edges of the opening blurs fine detail across the whole image, even though the depth of field is huge. On most modern sensors the sharpest results come around f/5.6 to f/11. Focusing at the hyperfocal distance at f/8 or f/11 usually gives more overall sharpness than stopping down to f/22.

Does focal length really change depth of field?

At the same framing of the subject, much less than people think: moving back with a longer lens to keep the subject the same size leaves the depth of field around the subject roughly unchanged. What changes is how blurred the distant background looks and how much of it is in the frame. At the same distance, though, a longer lens has much less depth of field.

What is bokeh?

The look of the out-of-focus parts of an image: how smooth the blur is and the shape of out-of-focus highlights. Depth of field tells you where the blur starts; bokeh describes its character, which depends on the lens design and the shape of the aperture blades.

How do I use the hyperfocal distance in practice?

Set your aperture, look up the hyperfocal distance, and focus there, either by the lens's distance scale or on something at about that distance. Everything from half that distance to the horizon will be acceptably sharp. Many landscape photographers focus a little beyond the hyperfocal distance to protect the horizon.

Is depth of field the same as depth of focus?

No. Depth of field is the range of subject distances that look sharp. Depth of focus is the tiny range of positions of the sensor behind the lens that keep a given subject sharp, which matters to lens and camera makers for manufacturing tolerances.

Does the calculator work for phones?

Yes, if you enter the real focal length (often 5 to 7 mm) and a custom circle of confusion of about 0.030 mm divided by the phone's crop factor, often 4 to 7. The tiny sensor is why phones get so much depth of field, and why portrait modes simulate background blur in software.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy