Depth of Field Calculator

Quick answer

Depth of field is the zone that looks sharp, set by aperture, focal length and focus distance. A 50 mm lens at f/8 focused 5 metres away on full frame is sharp from about 3.4 to 9.2 metres. Enter your lens, aperture, distance and sensor to get the near and far limits.

Updated 2026-09-09By Shakeel MuzaffarReviewed by Prof. Dr. Khalil Mudassar, PhD
Try
Photography
The actual focal length of the lens.
The f-stop, such as 2.8, 5.6 or 8.
Distance from the camera to the subject.
Sets the circle of confusion used for sharpness.
Total depth of field
--
Near limit--
Far limit--
Hyperfocal distance--

Calculations run in your browser. Inputs are not sent to our servers; anything you Save stays in this browser only.

Saved results (0)

How to Use the Depth of Field Calculator

  1. Enter your lens focal length in millimetres.
  2. Enter the aperture as an f-number, such as 2.8 or 8.
  3. Enter the focus distance to the subject in metres.
  4. Choose your sensor, then read the near and far limits of sharp focus.
ResultWhat it means
Total depth of fieldThe depth of the zone that looks acceptably sharp.
Near limitThe closest distance in focus.
Far limitThe furthest distance in focus.
Hyperfocal distanceFocus here to get the deepest possible depth of field.

What Is Depth of Field?

Depth of field is the range of distances in a photo that appears acceptably sharp. Everything nearer or further than this zone falls progressively out of focus. It is one of the most creative controls in photography, from a portrait with a soft background to a landscape sharp front to back.

Three things set it: the aperture, the focal length and how far away you focus. The sensor size matters too, through the circle of confusion, the size a point can blur to before it looks unsharp. Getting depth of field right is often the difference between a snapshot and a deliberate image.

How Does the Depth of Field Calculation Work?

Formula: near = H x s / (H + (s - f)); far = H x s / (H - (s - f))
  1. Work out the hyperfocal distance H from focal length, aperture and circle of confusion.
  2. Find the near limit from H and the focus distance s.
  3. Find the far limit the same way with a minus sign.
  4. The depth of field is the far limit minus the near limit.

When you focus at or beyond the hyperfocal distance, the far limit becomes infinity, so everything from the near limit to the horizon is sharp.

Depth of Field Example

A 50 mm lens at f/8 on a full-frame camera, focused 5 metres away, has a hyperfocal distance of about 10.8 metres. The near limit works out to roughly 3.4 metres and the far limit to about 9.2 metres, so the depth of field is about 5.8 metres. Open up to f/2 for a portrait and that zone shrinks dramatically, throwing the background out of focus.

What Affects Depth of Field

Aperture

A smaller aperture, meaning a bigger f-number, deepens the field; a wide aperture makes it shallow.

Focal Length

Longer lenses give a shallower depth of field at the same aperture and framing.

Focus Distance

The closer you focus, the shallower the depth of field, which is why macro work is so thin.

Sensor Size

Larger sensors give a shallower depth of field for the same field of view, through the circle of confusion.

Apertures Compared for Depth of Field

Depth of field for a 50 mm lens on full frame, focused at 5 metres.

ApertureNear to farDepth
f/24.7 to 5.4 mAbout 0.7 m
f/5.64.1 to 6.4 mAbout 2.3 m
f/83.4 to 9.2 mAbout 5.8 m
f/162.4 to infinityVery deep

Each stop down roughly doubles the depth of field, until at small apertures the far limit reaches infinity.

When to Use a Depth of Field Calculator

Landscapes

Choose an aperture and focus point that keeps foreground and horizon sharp.

Portraits

Pick a wide aperture that softens the background while keeping the eyes sharp.

Product and Macro

Plan the thin depth of field of close-up work and where to focus.

Common Depth of Field Mistakes

1. Ignoring Focus Distance

Depth of field changes hugely with how close you focus, not just the aperture.

2. Forgetting Sensor Size

The same settings give different depth on a crop sensor than on full frame.

3. Stopping Down Too Far

Very small apertures deepen the field but soften the whole image through diffraction.

4. Trusting the Viewfinder

The viewfinder shows the widest aperture; use the preview or a calculator to judge the real depth.

Accuracy and Limitations

The formulas are the standard thin-lens model with a typical circle of confusion per sensor. Real sharpness also depends on the lens and your viewing size.

What it calculates accurately

  • Near and far limits of sharp focus
  • Total depth of field
  • Hyperfocal distance

What it does not do

  • Model diffraction softening
  • Account for lens sharpness or aberrations
  • Adjust for print or screen viewing size

How We Calculate the Result

Method
Standard thin-lens depth of field: hyperfocal from focal length, aperture and circle of confusion, then near and far limits.
Inputs used
Focal length, aperture, focus distance and sensor circle of confusion.
Assumptions
Typical circle of confusion per sensor; a thin-lens optical model.
Rounding
Distances to two decimal places.
Edge cases
At or beyond the hyperfocal distance the far limit is infinite.
Sources
See Sources below.
Last reviewed
2026-09-23.

Frequently Asked Questions

What is depth of field?

Depth of field is the range of distances in a photo that looks acceptably sharp, set by aperture, focal length, focus distance and sensor size.

How do you calculate depth of field?

Find the hyperfocal distance, then the near and far limits from the focus distance. A 50 mm lens at f/8 focused at 5 m on full frame is sharp from about 3.4 to 9.2 m.

Does aperture change depth of field?

Yes. A smaller aperture, a higher f-number, deepens the field; a wide aperture makes it shallow. Each stop down roughly doubles the depth.

Does focal length affect depth of field?

Yes. Longer lenses give a shallower depth of field at the same aperture and framing, which is why telephotos blur backgrounds strongly.

What is the circle of confusion?

The largest a point of light can blur to while still looking sharp. It is smaller on smaller sensors, which affects depth of field.

Does sensor size change depth of field?

Yes. A larger sensor gives a shallower depth of field for the same field of view, all else equal.

What is hyperfocal distance?

The focus distance that gives the deepest depth of field, sharp from half that distance to infinity. Our hyperfocal calculator focuses on it.

Why does my landscape look soft at f/22?

Very small apertures deepen depth of field but introduce diffraction, which softens the whole image. Many lenses are sharpest around f/8.

Is my data saved?

No. The calculator runs entirely in your browser and nothing you enter is stored or sent anywhere.

Sources

Related Calculators

For photography planning and educational use. Uses the standard thin-lens model with a typical circle of confusion; real sharpness also depends on the lens, diffraction and viewing size. Spotted an error? Let us know.

Author

shakeel-Muzaffar
Founder & Editor-in-Chief at  ~ Web ~  More Posts

Shakeel Muzaffar is the Founder and Editor-in-Chief of MultiCalculators.com, bringing over 15 years of experience in digital publishing, product strategy, and online tool development. He leads the platform's editorial vision, ensuring every calculator meets strict standards for accuracy, usability, and real-world value. Shakeel personally oversees content quality, formula verification workflows, and the platform's commitment to publishing tools that are genuinely useful for students, professionals, and everyday users worldwide.