OnSumoTools

Photography Depth of Field Calculator

Find hyperfocal distance, near and far focus limits, and total depth of field for your camera and lens.

Camera and lens

Total depth of field

0.58 m

At this setting, focus from 2.74 m to 3.32 m is acceptably sharp.

Near limit

2.74 m

Far limit

3.32 m

Hyperfocal

30.84 m

In front of subject

0.26 m

Behind subject

0.32 m

Depth of field diagram

camNear 2.7mSubject 3.0mFar 3.3m

Acceptably sharp zones depend on print size, viewing distance, and your lens. Use this as a planning guide, not a guarantee of edge sharpness.

How does the Depth of Field Calculator work step by step?

Select your sensor format (the calculator pre-fills the correct circle of confusion for that sensor), enter focal length, aperture, and focus distance, and the results update immediately.

What does a typical Depth of Field Calculator result look like?

Camera: Full Frame. Focal length: 50mm. Aperture: f/2.8. Focus distance: 3 meters. H = (50^2 / (2.8 x 0.029)) + 50 = (2500 / 0.0812) + 50 = 30,788mm + 50 = 30,838mm = ~30.8m Near = (3 x (30.8 - 0.05)) / (30.8 + 3 - 2 x 0.05) = (3 x 30.75) / (33.75) = 92.25 / 33.75 = ~2.73m Far = (3 x 30.75) / (30.8 - 3) = 92.25 / 27.8 = ~3.32m Depth of field: 3.32 - 2.73 = 0.59 meters (59 centimeters)

Related tools

Frequently asked questions

  • What is depth of field?

    Depth of field is the range of distances in a scene that appear acceptably sharp in a photograph. A wide aperture (low f-number like f/1.4) produces a shallow depth of field with a blurred background. A narrow aperture (high f-number like f/16) produces a deeper depth of field with more of the scene in focus.

  • What is hyperfocal distance?

    Hyperfocal distance is the focus distance at which everything from half that distance to infinity is acceptably sharp. Focusing at the hyperfocal distance is the standard technique for landscape, architecture, and street photography where you want maximum depth of field without losing the background.

  • What is circle of confusion?

    Circle of confusion (CoC) is the diameter of an out-of-focus point that still appears acceptably sharp to the human eye when viewed at standard print or screen size. It varies by sensor size, larger sensors have a larger CoC. The values used here are industry standards for each sensor format.

  • Why does sensor size affect depth of field?

    Sensor size affects depth of field because a smaller sensor requires a shorter focal length to achieve the same field of view, and shorter focal lengths produce more depth of field at the same aperture. A 25mm lens on Micro Four Thirds gives the same framing as 50mm on full frame, but significantly more depth of field at the same f-number.

  • How do I use hyperfocal distance in the field?

    Set your focus to the hyperfocal distance shown for your current focal length and aperture. Everything from half that distance to infinity will be acceptably sharp. For a 50mm lens at f/8 on full frame, hyperfocal distance is roughly 7.2 meters, set focus there and shoot without adjusting focus for landscapes.

  • Does aperture or focal length have a bigger effect on depth of field?

    Both matter, but focal length has a squared effect in the hyperfocal formula. Doubling focal length from 50mm to 100mm at the same aperture reduces depth of field by roughly 4x. Doubling aperture (e.g., f/2.8 to f/5.6) halves depth of field. For portraits, focal length choice is usually more impactful.

How much of the shot is sharp?

Depth of field is the stretch of distance in front of and behind your focus point that looks acceptably sharp. Shallow depth of field gives you a razor-thin plane, with a creamy blurred background. Deep depth of field keeps nearly everything crisp.

Plug in your sensor, focal length, aperture and subject distance. The calculator gives the near and far limits, total depth of field, and how much falls in front of and behind the subject. An SVG diagram draws it out for you.

The three big controls

Aperture. A wider opening (lower f-number) shrinks depth of field. A narrower one grows it.

Distance to the subject. Move closer and depth of field gets thinner. Step back and it widens.

Focal length. Longer lenses seem to have less depth of field at the same framing distance. Here's the catch: if you frame the same subject size by changing distance, focal length matters far less than people think. Distance and aperture do most of the work.

Why sensor size matters

To get the same framing, a bigger sensor needs a longer lens or a closer position. That makes depth of field shallower at the same f-number. It's why full-frame cameras are known for a blurrier background than phones. Choosing your sensor in the tool applies the right circle of confusion, so the math fits your camera.

Circle of confusion

This is the blur size limit that still looks sharp at normal viewing. It's the reference the whole calculation hangs on. Smaller sensors use smaller values. If you print big, your standard is tougher, and real depth of field is smaller than the tool shows.

Hyperfocal distance

Focus at the hyperfocal distance and sharpness stretches from half that distance to infinity. The calculator reports it, so you can set up quickly for wide scenic shots. See the hyperfocal tool on this site for a closer look.

In the field, the split matters. Depth of field isn't centered on your focus point. At typical distances about one third sits in front and two thirds behind, and it evens out as you get very close.

Practical use

For portraits, open wide and get the eyes sharp. For groups, stop down so everyone is in focus. For macro, even f/16 may give only millimeters, so stack shots if you need more.

Remember that diffraction softens the image at very small apertures. Beyond about f/16 on many cameras, extra depth of field comes at a cost in sharpness.

All calculations happen in your browser.