Depth of Field (DoF) Calculator
Calculate exact near and far limits of acceptable sharpness, total depth of field, front-to-rear focus distribution, and hyperfocal distance for any camera sensor and lens combination. Toggle between US customary (feet/inches) and metric (meters/centimeters) units anytime.
Camera, Lens & Focus Settings
Optical Depth of Field Results Mag: 0.017x (1:59.0)
Acceptable sharpness extends from 9.08 ft to 11.12 ft.
Depth of Field Across Standard Apertures (Current Lens & Subject Distance)
| Aperture | Near Limit | Far Limit | Total DoF | In Front / Behind | Hyperfocal Distance |
|---|
Optical Formulas & Calculation Method
Depth of field is governed by four physical variables: actual lens focal length (f), aperture f-number (N), subject focus distance (s), and the maximum acceptable blur spot diameter on the sensor known as the Circle of Confusion (c). All calculations are performed internally in millimeters (1 ft = 304.8 mm, 1 m = 1,000 mm):
Near Focus Limit (Dₙ) = [ s × (H - f) ] / [ H + s - (2 × f) ]
Far Focus Limit (D_f) = [ s × (H - f) ] / (H - s) (when s < H; otherwise ∞)
Total Depth of Field (DoF) = D_f - Dₙ (when s < H; otherwise ∞)
Illustrative Example
Scenario (Illustrative): Full Frame 35mm camera (c = 0.030 mm) with a 50 mm lens at f/2.8, focused on a subject 10 ft (3,048 mm) away:
- Hyperfocal Distance (H):
(50² / (2.8 × 0.030)) + 50 = 29,811.9 mm = 97.81 ft (29.81 m) - Near Focus Limit (Dₙ):
[3048 × (29811.9 - 50)] / [29811.9 + 3048 - 100] = 2,769.1 mm = 9.08 ft (9 ft 1.0 in) - Far Focus Limit (D_f):
[3048 × (29811.9 - 50)] / (29811.9 - 3048) = 3,389.4 mm = 11.12 ft (11 ft 1.4 in) - Total Depth of Field:
11.12 ft - 9.08 ft = 2.04 ft (2 ft 0.4 in)— with45.0% (11.0 in)in front of the subject and55.0% (13.4 in)behind.
How to Use This Depth of Field Calculator
- Select Camera Sensor Format: Pick your camera format (Full Frame, APS-C, Micro Four Thirds, Medium Format, Cinema, or Custom CoC).
- Enter Actual Lens Focal Length: Input the physical focal length marked on your lens in millimeters (not the 35mm equivalent).
- Set Aperture & Focus Distance: Choose your f-stop and subject distance in either US (feet) or Metric (meters). Click Focus at Hyperfocal Distance if you want to maximize landscape sharpness from half the hyperfocal distance to infinity.
- Review & Export: Inspect the live focus zone diagram and the multi-aperture reference table, or use Copy Result / Print / Save PDF for field notes.
Frequently Asked Questions
Should I enter the actual focal length on my lens or the 35mm equivalent focal length?
Always enter the actual physical focal length printed on the lens barrel (for example, enter 35mm on an APS-C camera, not 52.5mm). Sensor crop factor is already accounted for by the sensor's Circle of Confusion diameter (c).
Is it true that depth of field is always split 1/3 in front and 2/3 behind the subject?
The "1/3 in front, 2/3 behind" rule is only a rough rule of thumb at moderate distances. At close macro distances, depth of field splits nearly 50% in front and 50% behind. As your focus distance approaches the hyperfocal distance, the rear portion expands toward 100% (infinity).
What is hyperfocal distance and how do landscape photographers use it?
Hyperfocal distance is the closest focus distance at which a lens can be focused while keeping objects at infinity acceptably sharp. When you focus your lens exactly at the hyperfocal distance H, everything from H / 2 (half the hyperfocal distance) all the way to the horizon stays within acceptable focus.
What is the Circle of Confusion (CoC)?
An optical lens only focuses perfectly at a single plane; points in front of or behind that plane project as tiny blur discs on the sensor. The Circle of Confusion (c) is the largest blur disc diameter on the sensor that still appears as a sharp point when enlarged to an 8×10-inch print viewed from 10 inches (or equivalent diagonal viewing angle), typically 0.030 mm on Full Frame.