calculate depth of field

Depth of Field Calculator

Use this tool to calculate hyperfocal distance, near focus limit, far focus limit, and total depth of field for your camera setup.

Please enter valid positive values for all fields.
  • Hyperfocal Distance:
  • Near Focus Limit:
  • Far Focus Limit:
  • Total Depth of Field:
  • In Front of Subject:
  • Behind Subject:
All calculations are approximate and assume a standard lens model and acceptable sharpness criteria.

What Depth of Field Means (and Why It Matters)

Depth of field (DOF) is the range in front of and behind your focus point that appears acceptably sharp. A shallow depth of field creates soft, blurred backgrounds and strong subject separation. A deep depth of field keeps more of the scene in focus, which is often useful for landscapes, architecture, and documentary work.

If you have ever wondered why portraits shot at f/1.8 look dreamy while photos at f/11 look crisp from front to back, depth of field is the reason. Understanding it gives you more creative and technical control over every image you shoot.

How to Use the Calculator

Step 1: Choose your sensor format

Sensor format affects the circle of confusion value. The calculator automatically applies a typical value for each format, but you can choose Custom and type your own value if you prefer a stricter or looser sharpness standard.

Step 2: Enter focal length, aperture, and distance

  • Focal length (mm): Longer focal lengths tend to produce shallower depth of field at the same framing and aperture.
  • Aperture (f-number): Lower f-number (like f/1.8) means shallower DOF; higher f-number (like f/11) means deeper DOF.
  • Subject distance: The closer you focus, the shallower your depth of field becomes.

Step 3: Read the results

The calculator returns six values:

  • Hyperfocal distance: Focus here to maximize depth of field for a given lens and aperture.
  • Near limit: Closest distance that appears sharp.
  • Far limit: Farthest distance that appears sharp (or infinity).
  • Total DOF: The full sharp range from near to far limit.
  • Front DOF: Sharp range in front of the subject.
  • Rear DOF: Sharp range behind the subject.

The Core Formula Behind Depth of Field

The calculator uses standard photographic equations:

  • Hyperfocal distance: H = (f² / (N × c)) + f
  • Near limit: Dn = (H × s) / (H + (s - f))
  • Far limit: Df = (H × s) / (H - (s - f)), when denominator is positive; otherwise infinity

Where:

  • f = focal length (mm)
  • N = aperture (f-number)
  • c = circle of confusion (mm)
  • s = subject distance (mm)

Practical Photography Tips for Better DOF Control

For portraits

  • Use a wider aperture (f/1.4 to f/2.8).
  • Keep enough distance between subject and background.
  • Focus carefully on the eye closest to camera.

For landscapes

  • Use narrower apertures like f/8 to f/16.
  • Consider focusing near the hyperfocal distance.
  • Use a tripod when shutter speed becomes slow.

For macro photography

Depth of field can become razor-thin at close distances. Even at f/11 or f/16, the sharp zone may still be tiny. In these cases, techniques like focus stacking are often necessary for edge-to-edge sharpness.

Common Depth of Field Mistakes

  • Assuming aperture is everything: Distance and focal length are just as important.
  • Ignoring sensor format: Different sensor sizes influence perceived DOF.
  • Using very small apertures all the time: Diffraction can reduce overall sharpness.
  • Trusting only the rear screen: Zoom in during playback to verify critical focus.

Quick Reference: How to Get More or Less DOF

To get shallower DOF (more blur)

  • Open aperture (smaller f-number)
  • Use longer focal length
  • Move closer to your subject
  • Increase distance from subject to background

To get deeper DOF (more in focus)

  • Close aperture (larger f-number)
  • Use shorter focal length
  • Focus farther away
  • Use hyperfocal focusing when appropriate

Final Thoughts

Mastering depth of field is one of the fastest ways to improve your photography. It helps you guide the viewer’s eye, isolate subjects, and make intentional creative choices. Use the calculator before a shoot to plan your settings, then adjust in the field based on your artistic goal.

Whether you are shooting portraits, travel, wildlife, or landscapes, a strong understanding of DOF turns technical settings into visual storytelling tools.

🔗 Related Calculators