Depth of Field Calculator
Enter your camera sensor, focal length, aperture, and focus distance to instantly calculate near/far DoF limits and hyperfocal distance.
Camera Settings
Must be greater than 0. Enter the distance from camera to subject.
—
Focus here to maximize sharpness from half this distance to infinity.
—
Closest sharp point
—
Farthest sharp point
—
Far limit minus near limit — the complete sharp zone.
Sharp Zone Visualization
Blue bar = sharp zone relative to hyperfocal distance (capped at hyperfocal).
Formulas Used
H = f² / (N × c) + f
Dnear = (H × d) / (H + d − f)
Dfar = (H × d) / (H − d + f) [∞ if d ≥ H]
f = focal length, N = f-number, c = CoC, d = focus distance
Summary
Enter your camera sensor, focal length, aperture, and focus distance to instantly calculate near/far DoF limits and hyperfocal distance.
How it works
- Select your camera sensor size from the preset list (or choose Custom to enter a circle of confusion manually).
- Enter the focal length in millimeters (e.g. 50 for a 50mm lens).
- Choose the aperture f-stop from the dropdown (e.g. f/2.8).
- Enter the focus distance in meters or feet — the unit selector applies throughout.
- The calculator instantly shows hyperfocal distance, near DoF limit, far DoF limit, and total depth of field.
- Switch between metric and imperial units at any time; all values recalculate.
Use cases
- Pre-visualize how much of a scene will be sharp before you shoot.
- Find the hyperfocal distance for maximum landscape sharpness.
- Compare f-stops to decide how much bokeh a portrait lens will produce.
- Plan macro shots where depth of field is only a few millimeters.
- Teach photography students the relationship between aperture, focal length, and DoF.
- Cross-check results when renting an unfamiliar camera body or lens.
- Determine whether a telephoto lens at f/8 gives enough depth for group shots.
- Calculate the minimum aperture needed to keep foreground and background sharp.