Depth of Field Calculator – Focal Length, Aperture and Distance
Calculate depth of field from focal length, aperture and subject distance, with near and far limits, hyperfocal distance and the sensor's circle of confusion, plus an exposure compensation tool for ND filters.
Calculator InputsFormula v1.0
1/125 s is 0.008 s.
Hyperfocal H = f² ÷ (N × c) + f; near = s(H − f) ÷ (H + s − 2f); far = s(H − f) ÷ (H − s); DOF = far − near; ND-adjusted time = base time × 2^(stops)
Depth of field
1.85 m in focus at 50 mm, f/8, 3 m
• The circle of confusion is a convention based on viewing a print at normal distance. A large print or a close crop reveals blur that this calculation treats as sharp.
• Diffraction reduces resolution at very small apertures, so the sharpest result is usually a few stops down rather than at the minimum aperture.
Step-by-Step Mathematical Working
Formula and method
Hyperfocal H = f² ÷ (N × c) + f; near = s(H − f) ÷ (H + s − 2f); far = s(H − f) ÷ (H − s); DOF = far − near; ND-adjusted time = base time × 2^(stops)Depth of field widens with a smaller aperture, a wider lens and a greater subject distance, and narrows as the sensor shrinks for the same framing. The hyperfocal distance is the focus point that puts infinity acceptably sharp while leaving half that distance sharp too, which is the usual landscape technique.
Variables
- Focal length
- Lens focal length in millimetres
- Aperture
- f-number at which the photograph is taken
- Subject distance
- Distance from the camera to the plane of focus in metres
- Circle of confusion
- Blur circle acceptable as sharp, about 0.03 mm for full frame and 0.019 mm for APS-C
Worked example
A 50 mm lens at f/8 focused at 3 m on full frame has a hyperfocal distance of 10.47 m, near limit 2.34 m and far limit 4.19 m, so depth of field is 1.85 m. A 10-stop ND filter turns a 1/125 s exposure into about 8.2 seconds.
Who this calculator is for
Photographers planning a landscape or portrait, anyone deciding where to focus for a deep scene, and long-exposure shooters adding an ND filter.
Complete guide to the depth of field calculator – focal length, aperture and distance
Every figure below comes from this calculator itself. The method is Hyperfocal H = f² ÷ (N × c) + f; near = s(H − f) ÷ (H + s − 2f); far = s(H − f) ÷ (H − s); DOF = far − near; ND-adjusted time = base time × 2^(stops), applied to the tool's default inputs and then stress-tested one input at a time.
What the Depth of Field Calculator – Focal Length, Aperture and Distance works out
Depth of Field Calculator – Focal Length, Aperture and Distance answers one specific question: Calculate depth of field from focal length, aperture and subject distance, with near and far limits, hyperfocal distance and the sensor's circle of confusion, plus an exposure compensation tool for ND filters. It is written for photographers planning a landscape or portrait, anyone deciding where to focus for a deep scene, and long-exposure shooters adding an ND filter.
The method is Hyperfocal H = f² ÷ (N × c) + f; near = s(H − f) ÷ (H + s − 2f); far = s(H − f) ÷ (H − s); DOF = far − near; ND-adjusted time = base time × 2^(stops). The inputs are Focal length (mm), Aperture (f-number), Subject distance (m), Sensor size, Unfiltered shutter speed (seconds), ND filter strength (stops), Crop factor for focal-length equivalent (×). With the default values - Focal length = 50 mm, Aperture = 8 f-number, Subject distance = 3 m, Sensor size = fullframe, Unfiltered shutter speed = 0.008 seconds, ND filter strength = 10 stops, Crop factor for focal-length equivalent = 1× - the result is Depth of field: 2.34 m to 4.19 m. Raising Focal length from 50 mm to 55.00 mm moves the headline result from 2.34 m to 4.19 m to 2.43 m to 3.91 m.
What each figure in the breakdown means
Alongside 2.34 m to 4.19 m this method reports 11 supporting quantities: Total depth of field: 1.85 m; Near focus limit: 2.34 m; Far focus limit: 4.19 m; Hyperfocal distance: 10.47 m. The supporting figures show whether the result came from the rate, the period or the size of the inputs.
The arithmetic as executed: Hyperfocal = f² ÷ (N × c) + f = (0.0500)² ÷ (8 × 0.000030) + 0.0500 = 10.47 m. Near limit = s × (H − f) ÷ (H + s − 2f) = 2.34 m. Far limit = s × (H − f) ÷ (H − s) = 4.19 m. ND exposure = base × 2^stops = 0.008 × 1024 = 8.2 s. Check one step independently; if it lands on the same figure, the inputs and the model agree.
How to interpret the answer
Depth of field widens with a smaller aperture, a wider lens and a greater subject distance, and narrows as the sensor shrinks for the same framing. The hyperfocal distance is the focus point that puts infinity acceptably sharp while leaving half that distance sharp too, which is the usual landscape technique.
Applying that reading here: 2.34 m to 4.19 m alongside total depth of field of 1.85 m describes one specific scenario, not a range of possibilities. Adjust the quantity that is genuinely uncertain in your case, then read both figures again.
Common mistakes to avoid
Using the full-frame circle of confusion for a crop sensor, which overstates the near and far limits. Changing focal length and distance at the same time, then attributing the blur change to the aperture alone. Focusing at the hyperfocal distance for a portrait, which puts the subject outside the sharp zone. Forgetting that stacking an ND filter changes exposure by the filter's stops but not the depth of field.
Before you act on the result, re-read Focal length (mm), Aperture (f-number), Subject distance (m), Sensor size, Unfiltered shutter speed (seconds), ND filter strength (stops), Crop factor for focal-length equivalent (×) and confirm each entry matches its label, including whether a quantity is entered in the unit the label names. Change Focal length deliberately and check that the result moves the way the formula predicts - here 2.34 m to 4.19 m should shift smoothly rather than jump.
Limitations and responsible use
Uses the thin-lens formula, so it ignores lens aberrations, focus breathing and field curvature. Circle-of-confusion values are conventions, not absolutes; what counts as sharp also depends on final print size and viewing distance. Diffraction softens the image at small apertures in a way this calculation does not show.
All of the above holds only within those limits. You can retrace every step from the formula printed above; what cannot be checked from here is whether the inputs describe your situation accurately. For a consequential decision, verify the operative figures against a primary source before relying on the answer.
Frequently asked questions
What is the circle of confusion?
The largest blur circle that still looks sharp on the final image. It is conventionally 0.03 mm for full frame, 0.019 mm for APS-C and 0.015 mm for Micro Four Thirds.
What is hyperfocal distance?
The closest focus distance at which everything from half that distance to infinity is acceptably sharp. Focusing there maximises depth of field for a given aperture and focal length.
How do I calculate a 10-stop ND exposure?
Multiply the unfiltered shutter speed by 2¹⁰, or 1,024. A 1/125 s exposure becomes about 8.2 seconds.
Does a smaller aperture always increase sharpness?
It increases depth of field but eventually reduces sharpness through diffraction, which usually starts to matter beyond about f/11 on full frame.
Related searches for this calculator
People also look for depth of field calculator, dof calculator, hyperfocal distance calculator, circle of confusion calculator, nd filter calculator and long exposure calculator. Everything on this page is calculated in your browser from the formula shown above.
Related Lifestyle Calculators
Explore another calculator in this subject.
Aspect Ratio Calculator – Resize Images and Video Without Distortion
Find the aspect ratio of any width and height, and resize to a target width or height while preserving the ratio for photos, video, and design canvases.
Unit Converter – Length, Weight, Volume, Area, Speed, Temperature & Time
Convert between metric and imperial units across seven measurement families, with exact SI factors, a full cross-reference table, and reverse-direction handling.
Scientific Calculator – Free Online Calculator With Trig, Logs & Memory
A full scientific calculator with DEG/RAD trigonometry, inverse and hyperbolic functions, powers, roots, logarithms, factorials, percentages, constants, memory registers, Ans recall and a running calculation tape.