Photography Depth of Field Calculator

How Much of the Frame Is Actually Sharp?

Depth of field is the zone in front of and behind your focus point that still reads as acceptably sharp. It isn't a hard edge — it's governed by the circle of confusion, the largest blur spot the eye accepts as a point on a given sensor size — but it can be calculated precisely once focal length, aperture, subject distance, and sensor format are known. This calculator resolves that zone into exact near and far limits instead of the rough "stop down for more depth" guidance most photographers rely on.

The Formula

The calculation runs in two stages: first the hyperfocal distance, then the near and far limits around the actual focus point.

Hyperfocal Distance H = f² / (N × c) + f
Near Limit = (H × s) / (H + (s − f))
Far Limit = (H × s) / (H − (s − f)) — Infinity if s ≥ H

Here f is focal length, N is the f-number, c is the circle of confusion for the sensor format, and s is subject distance. The circle of confusion values used are 0.030 mm (full frame), 0.020 mm (APS-C), 0.015 mm (Micro Four Thirds), 0.011 mm (1-inch), and 0.045 mm (medium format).

Where Depth of Field Control Matters

  • Portraits — a shallow depth of field at wide apertures (f/1.4–f/2.8) separates a subject from the background; knowing the exact near/far limits prevents an eye or ear falling outside the sharp zone.
  • Landscape work — stopping down to f/8–f/16 extends depth of field so foreground rocks and distant ridgelines are both sharp.
  • Macro photography — at close subject distances depth of field shrinks to millimeters, so this calculation becomes essential rather than optional.
  • Product and tabletop shots — confirming depth of field in advance avoids reshoots when part of a product falls outside focus.

Worked Example

A 50 mm lens on a full-frame body at f/8, focused on a subject 5 m away:

50 mm, f/8, full frame (c = 0.030 mm), subject at 5 m
QuantityValue
Hyperfocal distance10.47 m
Near limit3.39 m
Far limit9.49 m
Total depth of field6.1 m

Depth of field grows quickly with subject distance and aperture number, and shrinks quickly as focal length increases — the same f/8 aperture on an 85 mm lens produces a much narrower zone than on a 24 mm lens.

How to Use This Calculator

  1. Enter the lens focal length in millimeters.
  2. Enter the aperture as an f-number (for example, 2.8 or 8).
  3. Enter the subject distance in meters.
  4. Select the sensor format — Full Frame, APS-C, Micro Four Thirds, 1-inch, or Medium Format.
  5. Select Calculate to get the near limit, far limit, and total depth of field.

Related Calculations

For the distance that maximizes depth of field at a given aperture, see the Hyperfocal Distance Calculator. To translate sensor size into full-frame equivalent focal length and aperture, use the Camera Crop Factor Calculator.