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.
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
- Enter your lens focal length in millimetres.
- Enter the aperture as an f-number, such as 2.8 or 8.
- Enter the focus distance to the subject in metres.
- Choose your sensor, then read the near and far limits of sharp focus.
| Result | What it means |
|---|---|
| Total depth of field | The depth of the zone that looks acceptably sharp. |
| Near limit | The closest distance in focus. |
| Far limit | The furthest distance in focus. |
| Hyperfocal distance | Focus 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?
near = H x s / (H + (s - f)); far = H x s / (H - (s - f))- Work out the hyperfocal distance H from focal length, aperture and circle of confusion.
- Find the near limit from H and the focus distance s.
- Find the far limit the same way with a minus sign.
- 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.
| Aperture | Near to far | Depth |
|---|---|---|
| f/2 | 4.7 to 5.4 m | About 0.7 m |
| f/5.6 | 4.1 to 6.4 m | About 2.3 m |
| f/8 | 3.4 to 9.2 m | About 5.8 m |
| f/16 | 2.4 to infinity | Very 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
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
- Depth of field (Wikipedia).
- Circle of confusion (Wikipedia).
- Hyperfocal distance (Wikipedia).
Related Calculators
Planning a shot?
Explore all hobby calculatorsFor 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 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.




