Depth of Field Calculator

Calculate depth of field, near/far focus limits, and hyperfocal distance for any lens, aperture, sensor size, and subject distance combination.

mm
f/
m
Total Depth of Field
13.1 cm
Range of acceptable sharpness
Near Focus Limit
2.94 m
Closest acceptably sharp distance
Far Focus Limit
3.07 m
Farthest acceptably sharp distance
Hyperfocal Distance
133.88 m
Focus here for max DOF to infinity
Front DOF
6.4 cm
49% of total DOF in front
Rear DOF
6.7 cm
51% of total DOF behind

DOF Range Visualization

0
3.07 m

Aperture Comparison (85mm at 3m)

f-stopNear LimitFar LimitTotal DOF
f/1.42.95 m3.05 m10.2 cm
f/22.93 m3.07 m14.5 cm
f/2.82.90 m3.11 m20.4 cm
f/42.86 m3.15 m29.1 cm
f/5.62.81 m3.22 m40.9 cm
f/82.74 m3.32 m58.6 cm
f/112.65 m3.46 m81.3 cm
f/162.51 m3.72 m1.21 m
f/222.37 m4.09 m1.72 m
Planning notes, formulas, and examples

About the Depth of Field Calculator

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.

When This Page Helps

Depth of field is what separates a portrait with clean subject isolation from a landscape that holds detail front to back. This calculator helps you choose aperture and focus distance with enough precision to predict blur, sharpness, and hyperfocal behavior before you press the shutter.

How to Use the Inputs

  1. Select your camera sensor format for the correct circle of confusion.
  2. Enter the focal length of your lens in millimeters.
  3. Enter your lens aperture (f-stop number).
  4. Enter the distance to your subject.
  5. Review the depth of field, near limit, far limit, and hyperfocal distance.
  6. Use the aperture comparison table to find the ideal f-stop for your needs.
Formula used
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.

Example Calculation

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.

Tips & Best Practices

  • For portraits, use the widest aperture that keeps both eyes sharp—typically f/2.0–f/2.8 depending on the distance.
  • For landscapes, focus at the hyperfocal distance rather than infinity to maximize front-to-back sharpness.
  • In macro photography, DOF can be measured in millimeters—consider focus stacking for greater depth.
  • Stopping down beyond f/16 on full-frame (or f/11 on APS-C) introduces diffraction blur that offsets DOF gains.
  • Use the 1/3-2/3 rule: focus 1/3 into the scene for optimal depth distribution.
  • For video, select an aperture that provides enough DOF for slight subject movement without losing sharpness.

The Physics of Depth of Field

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.

Creative Applications

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.

Focus Stacking for Extended DOF

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.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • 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.