Calculate depth of field, near/far focus limits, and hyperfocal distance for any lens, aperture, sensor size, and subject distance combination.
Depth of field (DOF) is the range of distance in a photograph that appears acceptably sharp. It's one of the most powerful creative tools in photography, determining whether a portrait has a buttery blurred background or a landscape is tack-sharp from foreground to infinity.
Three primary factors control depth of field: aperture (f-stop), focal length, and subject distance. A wider aperture (lower f-number) produces shallower DOF, giving more background blur. A longer focal length at the same framing distance also narrows DOF. Moving closer to the subject reduces DOF further. Sensor size plays an indirect role through the circle of confusion.
This calculator computes the total depth of field, near and far focus limits, hyperfocal distance, and the percentage of DOF in front of and behind the focus point. It also shows how DOF changes across a range of apertures and distances, making it easy to plan your shot for the exact amount of blur or sharpness you need.
Whether you're a portrait photographer looking for maximum subject separation, a macro photographer calculating razor-thin focus zones, or a landscape photographer wanting front-to-back sharpness, understanding DOF numerically transforms your creative control from intuition into precision.
Depth of field calculations help photographers make intentional creative decisions rather than guessing aperture settings. This calculator is especially valuable for portrait, macro, and landscape photographers who need precise control over focus zones. Keep these notes focused on your operational context. Tie the context to the calculator’s intended domain. Use this clarification to avoid ambiguous interpretation.
Hyperfocal H = f²/(N×c) + f. Near limit = s×(H-f) / (H+s-2f). Far limit = s×(H-f) / (H-s). DOF = far - near. Where f = focal length, N = f-number, c = circle of confusion, s = subject distance.
Result: 0.08m DOF (7.9cm)
An 85mm lens at f/1.8 focused at 3 meters on full-frame gives only 7.9cm of depth of field—from 2.96m to 3.04m. This creates strong subject isolation.
Depth of field arises from the wave nature of light and the finite size of the lens aperture. When a lens focuses at a specific distance, only objects at that exact distance form a perfect point on the sensor. Objects nearer or farther form a small disc called the circle of confusion (CoC). When this disc is smaller than the sensor's resolving ability (determined by pixel pitch and viewing conditions), the object appears sharp.
The standard CoC for a full-frame sensor is 0.03mm, derived from a 25cm viewing distance of an 8×10 inch print. Modern high-resolution sensors and large displays often benefit from using a stricter CoC value.
Portrait photographers manipulate DOF to isolate subjects from busy backgrounds. At 85mm f/1.4 on full-frame focused at 2m, DOF is only 3.5cm—enough for eyes and nose but not ears. This requires precise focus and is why eye-tracking AF has become essential in modern portrait photography.
Landscape photographers work in the opposite direction, seeking maximum DOF. Using the hyperfocal distance technique with a wide-angle lens stopped down to f/11 can achieve sharpness from 1.5 meters to infinity.
When optical DOF is insufficient (common in macro, product, and some landscape photography), focus stacking combines multiple frames focused at different distances. Software like Helicon Focus or Photoshop blends the sharp regions of each frame. This technique can extend DOF from millimeters to centimeters in macro work, or from foreground flowers to distant mountains in landscapes.
The circle of confusion (CoC) depends on the sensor size and acceptable print/viewing size. Standard values: full-frame 0.03mm, APS-C 0.02mm, M4/3 0.015mm.
No. At typical distances, about 1/3 of DOF is in front of the focus point and 2/3 behind it. This ratio shifts toward 50/50 at close focus and at long distances.
Smaller sensors have greater DOF for the same field of view because you use a shorter focal length to achieve equivalent framing. This is why smartphone photos look “flat” with everything in focus.
The hyperfocal distance is the focus distance where everything from half that distance to infinity is acceptably sharp. Landscape photographers focus at the hyperfocal distance to maximize sharpness.
Focus distance affects bokeh size (closer = more blur) but not quality. Bokeh quality depends on lens optical design, aperture blade count, and corrections for spherical aberration.
Most lenses are sharpest 2–3 stops down from wide open (e.g., f/5.6–f/8 for an f/2.8 lens). Beyond f/11–f/16, diffraction softens the image even as DOF increases.