ES EN FR PT DE IT

Depth of Field Calculator

Depth of Field Calculator. Free online calculator with formula, examples and step-by-step guide.

The Depth of Field Calculator is a free photography calculator. Depth of Field Calculator. Free online calculator with formula, examples and step-by-step guide. Optimize your photographic settings with precise optical formulas for better results.
Inputs
Dimensions
Technical Parameters
Result
Enter values and press Calculate

Depth of Field Calculator: Master Your Camera’s Focus Zone

The depth of field calculator computes the zone of acceptable sharpness in your photographs based on aperture, focal length, subject distance, and sensor size. Whether you are a portrait photographer aiming for silky background bokeh, a landscape shooter maximizing front-to-back sharpness, or a macro photographer working with millimeters of focus, understanding your depth of field is essential for getting the shot you envision every time.

Depth of Field Formulas

H = f² / (N × c) + f

Dn = (H × s) / (H + s)

Df = (H × s) / (H − s)

Where H is the hyperfocal distance, f is the focal length, N is the aperture f-number (e.g., 2.8 for f/2.8), c is the circle of confusion (typically 0.030 mm for full-frame, 0.020 mm for APS-C, 0.015 mm for Micro Four Thirds), s is the subject distance, Dn is the near limit of acceptable sharpness, and Df is the far limit. All distances are in the same unit (typically millimeters or meters). The total depth of field is Df − Dn.

The circle of confusion represents the maximum blur spot that the human eye perceives as a point rather than a disc. Larger sensors have larger circle of confusion values because the final image requires less magnification to reach a given print or display size. This is why medium format cameras produce shallower depth of field than full-frame, which produces shallower DOF than APS-C, and so on down the sensor size chain.

Worked Examples

Example 1: Portrait Photography

You are shooting a portrait with a full-frame camera, 85mm lens at f/1.8, subject distance of 2 meters. The circle of confusion is 0.030 mm.

Hyperfocal distance: H = (85)² / (1.8 × 0.000030) + 85 = 7225 / 0.000054 + 85 = 133,796,296 mm + 85 ≈ 133.8 meters

Near limit: Dn = (133.8 × 2) / (133.8 + 2) = 267.6 / 135.8 = 1.97 m

Far limit: Df = (133.8 × 2) / (133.8 − 2) = 267.6 / 131.8 = 2.03 m

Total DOF = 2.03 − 1.97 = 0.06 m (6 cm). This shallow depth of field isolates the subject's eyes and face while smoothly blurring the background and even softening the ears slightly. This is the classic portrait look that separates professional images from snapshots.

Example 2: Landscape at f/11

You are shooting a landscape on a full-frame camera with a 24mm lens at f/11, focused at the hyperfocal distance. Circle of confusion is 0.030 mm.

Hyperfocal distance: H = (24)² / (11 × 0.000030) + 24 = 576 / 0.00033 + 24 = 1,745,455 mm + 24 ≈ 1.75 meters

When you focus at 1.75 meters, everything from H/2 = 0.87 meters to infinity is acceptably sharp. This allows you to capture foreground detail at less than a meter while maintaining sharp mountains on the horizon. At f/16, the hyperfocal distance drops to approximately 1.2 meters, and at f/22 it drops to 0.87 meters, though diffraction begins to soften overall image quality beyond f/11 on most full-frame sensors.

Common Uses

  • Portrait photography planning to achieve the ideal balance between subject sharpness and background blur (bokeh)
  • Landscape photography to maximize depth of field by calculating and focusing at the hyperfocal distance
  • Macro photography where depth of field is measured in millimeters and precise aperture selection is critical
  • Product and tabletop photography requiring uniform sharpness across a three-dimensional subject
  • Wedding and event photography to quickly determine settings for group shots versus individual portraits
  • Cinematography and video production where pulled focus shots require precise knowledge of the focus plane range

Common Mistakes

  • Using the wrong circle of confusion value for your sensor size — using a full-frame value on an APS-C camera underestimates DOF and produces softer-than-expected images
  • Focusing at infinity for landscape shots instead of at the hyperfocal distance, which wastes half the available DOF beyond infinity
  • Not accounting for the fact that DOF extends approximately 1/3 in front of and 2/3 behind the focus point at typical distances (though this approaches 1:1 at macro distances)
  • Pixel-peeping at 100% on a high-resolution monitor and expecting perfect sharpness at the DOF limits — DOF is based on standard viewing conditions, not extreme magnification
  • Using the widest possible aperture without considering the subject's depth — if the subject is not flat, parts will be outside the DOF zone and appear soft

Pro Tip

For critical focus in landscape photography, use the double-distance method instead of calculating hyperfocal distance: focus at a point twice as far as your nearest foreground subject. This gives a more balanced distribution of sharpness and avoids the issue where traditional hyperfocal focusing makes distant objects look slightly soft when viewed at full resolution. With modern high-megapixel sensors (40+ MP), the standard circle of confusion values may be too generous. Consider using a circle of confusion value of 0.015 mm for full-frame sensors when you intend to print large or view at 100% on high-resolution displays. This conservative approach ensures critically sharp results even in demanding viewing conditions.

Frequently Asked Questions

Depth of field (DOF) is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in a photograph. It is controlled by three main factors: aperture (smaller f-number = shallower DOF), focal length (longer lens = shallower DOF), and subject distance (closer subject = shallower DOF). Sensor size also plays a role, with larger sensors producing shallower DOF at the same settings.

To achieve background blur (bokeh) in portraits, use the widest aperture your lens allows (f/1.4, f/1.8, or f/2.8), get as close to your subject as your composition allows, use a longer focal length (85mm to 200mm), and position your subject far from the background. The combination of wide aperture and distance between subject and background creates the most pronounced blur.

The hyperfocal distance is the closest distance at which you can focus your lens while keeping objects at infinity acceptably sharp. When you focus at the hyperfocal distance, everything from half that distance to infinity appears sharp. Landscape photographers commonly use this technique to maximize depth of field by focusing at the hyperfocal point rather than at infinity.

Yes, sensor size significantly affects depth of field. With the same lens settings (same aperture, focal length, and distance), a full-frame camera produces shallower DOF than an APS-C or Micro Four Thirds camera. This is because the smaller sensor requires a shorter focal length to achieve the same field of view, and shorter focal lengths inherently produce deeper DOF.

Written and reviewed by the CalcToWork editorial team. Last updated: 2026-04-29.

Frequently Asked Questions

The combination of aperture (f-number), shutter speed and ISO sensitivity. Changing one forces compensating another to keep the same exposure.
Wider aperture (smaller f-number) gives shallower depth of field. f/1.8 blurs backgrounds; f/11 keeps everything sharp.
Max exposure without star trails = 500 / equivalent focal length (mm). With 24 mm full-frame ≈ 20.8 s.
APS-C sensors are ~1.5× smaller. Multiply focal length by the crop factor for the equivalent (50 mm APS-C ≈ 75 mm).