● GeneratorNest

Depth of Field Calculator

Find out exactly how much of your picture will be sharp – and preview how the background blurs – for any lens, aperture and camera.

Near limit
2.74 m
Far limit
3.32 m
Depth of field
57.7 cm
Hyperfocal distance
31.00 m

In front of the subject: 26.1 cm · behind it: 31.6 cm. Focus at 31.00 m and everything from 15.50 m to infinity is acceptably sharp.

Sharp zone
75.0 cmsubject 3.00 m30.00 m
Blur preview
Foreground1.50 m
Subject3.00 m
Background6.00 m
Far away18.00 m

Blur is the size of the out-of-focus disc relative to the frame width, scaled for this preview – compare settings with it, it is not a photo render.

Free text tools · No sign-up needed

More free tools

How it works

  1. Step 1

    Enter your lens

    Type the focal length and pick the aperture you plan to shoot at.

  2. Step 2

    Set distance and sensor

    Enter how far away your subject is and choose your camera's sensor size.

  3. Step 3

    Read the sharp zone

    See the near and far limits, the total depth of field, the hyperfocal distance and a blur preview of foreground and background.

Depth of field in one view

Depth of field is the zone in front of and behind your subject that still looks acceptably sharp. It depends on four things: focal length, aperture (f-number), focus distance and sensor size. This calculator uses the standard thin-lens formulas to give the near limit, far limit, total depth of field and hyperfocal distance, and draws the sharp zone on a distance scale. The blur preview works like a simple depth of field simulator: it shows how strongly objects at half, double and six times the subject distance are blurred with your settings, so you can compare f/1.8 against f/8 or a 35 mm lens against an 85 mm lens before you shoot.

How the calculation works

First the hyperfocal distance is calculated: H = f² ÷ (N × c) + f, where f is the focal length, N the f-number and c the circle of confusion – the largest blur spot that still looks sharp in a normally viewed print. The near limit is s(H − f) ÷ (H + s − 2f) and the far limit is s(H − f) ÷ (H − s) for a subject at distance s; when s reaches H, the far limit becomes infinity. The default circle of confusion is the sensor diagonal divided by 1500 (about 0.029 mm for full frame). You can type your own value if you print large or check images at 100 %, where a smaller value gives stricter results.

Getting more or less background blur

To make the depth of field shallower and blur the background more: open the aperture (smaller f-number), move closer to your subject, use a longer focal length, or increase the distance between subject and background. For more depth of field – landscapes, groups, product shots – stop down to f/8 or f/11, step back, or focus at the hyperfocal distance so that everything from half that distance to infinity is acceptably sharp. Very small apertures such as f/22 can soften the whole image through diffraction, so they are not always sharper.

Sensor size and crop factor

With the same framing and f-number, a smaller sensor gives more depth of field, because you use a shorter lens or stand further away to get the same picture. That is why phone cameras keep almost everything sharp and full-frame cameras blur backgrounds more easily. Pick your sensor in the list – the calculator adjusts the circle of confusion and shows the crop factor. Phone portrait modes create their blur in software, so real phone optics behave like the 'phone' setting here.

Frequently asked questions

What is the hyperfocal distance?

It is the focus distance that gives the most depth of field: focus there and everything from half that distance to infinity is acceptably sharp. Landscape photographers use it to keep both foreground and horizon sharp.

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

No. At normal distances there is usually more sharp space behind the subject than in front of it, and the share behind grows as you focus further away. The calculator shows both parts.

Which circle of confusion should I use?

The default (sensor diagonal ÷ 1500) suits normal viewing sizes. Use a smaller value, for example half, if you make large prints or inspect images at 100 %.

Does the blur preview show my actual photo?

No. It compares how large the out-of-focus blur is at different distances with your settings. Real bokeh also depends on the lens design and the scene.

Does it work for any camera?

Yes. Choose the sensor size closest to your camera, or set your own circle of confusion. Use the lens's real focal length, not the full-frame equivalent.

Guides

Try it free

100% free – no sign-up needed.

Open the tool