Depth of Field (DOF) Calculator
Calculate near and far depth-of-field limits and the hyperfocal distance from focal length, aperture, focus distance, and sensor size.
Result
How to use this calculator
- Enter the lens focal length in mm and the aperture f-number.
- Enter the focus (subject) distance in metres.
- Select your sensor format so the right circle of confusion is used.
- Read the near and far limits, total DOF, and hyperfocal distance.
About this calculator
Depth of field (DOF) is the range of distances in a photo that appear acceptably sharp. It depends on four things: the lens focal length, the aperture, how far away you focus, and the sensor format โ which sets the "circle of confusion," the largest blur spot still perceived as a point. This calculator computes the near and far limits of sharpness, the total depth of field, and the hyperfocal distance: the focus distance at which everything from half that distance to infinity is sharp. Wider apertures (smaller f-numbers), longer lenses, and closer subjects all shrink the depth of field; stopping down, using a shorter lens, or focusing farther away expands it. When your focus distance reaches or exceeds the hyperfocal distance, the far limit extends to infinity.
How it works โ the formula
Hyperfocal H = fยฒ/(Nยทc) + f
Near limit = Hยทs / (H + (s โ f))
Far limit = Hยทs / (H โ (s โ f)) [โ if s โฅ H]
(f, c in mm; s = focus distance)The hyperfocal distance sets the scale of sharpness for a given focal length, aperture, and circle of confusion. Near and far limits are derived from it and the focus distance; the far limit diverges to infinity once you focus at or beyond the hyperfocal distance.
Worked examples
- Inputs:
- focal=50, aperture=8, distance=3, sensor=ff
- Output:
- Hโ10.8 m, near 2.36 m, far 4.12 m, DOFโ1.77 m
- Inputs:
- focal=24, aperture=11, distance=2, sensor=ff
- Output:
- Hโ1.83 m; 2 m โฅ H โ far = โ
- Inputs:
- focal=85, aperture=1.8, distance=1.5, sensor=ff
- Output:
- DOF โ 0.03 m (very shallow)
Limitations
- Circle of confusion is a convention (sensor diagonal รท 1500); your sharpness standard may differ.
- Diffraction softening at small apertures is not modelled.
- Assumes the focus distance is measured to the subject, not the sensor plane offset.
DOF is perceptual; treat the limits as guidance, not a hard sharp/blurred boundary.
Frequently asked
What is depth of field?+
What is the hyperfocal distance?+
What is the circle of confusion?+
How does aperture affect depth of field?+
Why is depth of field not symmetric around the subject?+
Does a crop sensor change depth of field?+
Related calculators
More tools you might like
Hand-picked tools that pair well with this one โ same audience, same intent.
Work the exposure triangle: enter aperture, shutter speed, and ISO to get the EV, or solve for the aperture or shutter that hits a target EV.
Estimate video file size from bitrate and duration, or get a recommended bitrate from resolution and frame rate using a bits-per-pixel target.
1/f = 1/d_o + 1/d_i. Solve for any of focal length, object distance, image distance.
Size a solar array from daily kWh use and peak sun hours, and size an off-grid battery bank by autonomy days and depth of discharge.
Compute uncompressed PCM audio bitrate and file size per minute from sample rate, bit depth, and channel count.
Add a labeled signature-line area to an existing PDF โ a bordered text field where the recipient drops an image-based signature later.