Depth of Field Calculator

Find the near limit, far limit and total depth of field for any focal length, aperture and focus distance, with the hyperfocal distance for your sensor. Calculated in your browser.

Total depth of field

-

Near limit-
Far limit-
In front of subject-
Behind subject-
Hyperfocal distance-

Show the math

Depth of field grows from the hyperfocal distance H, which depends on focal length f, aperture N and the sensor's circle of confusion c:

H = f² ÷ (N · c) + f

near = s(H − f) ÷ (H + s − 2f)  far = s(H − f) ÷ (H − s)

Once your focus distance reaches the hyperfocal distance, the far limit becomes infinity. Circle of confusion is taken from the selected sensor. Everything is computed in your browser.

What this does

A depth of field calculator finds the near limit, far limit, and total depth of field for any focal length, aperture, and focus distance, plus the hyperfocal distance for your sensor.

How to use it

  1. Pick your sensor or format.
  2. Enter focal length and aperture.
  3. Enter the focus distance.
  4. Read the near, far, and total depth.

How it works

The hyperfocal distance H sets the sharp zone; the near and far limits follow from your focus distance, where f is focal length, N the f-number, and c the sensor’s circle of confusion.

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

Understanding your result

The near and far limits show the zone that will read as acceptably sharp, but sharpness falls off gradually, so treat the edges as approximate rather than a hard cut. Depth of field is always deeper behind the focus point than in front, roughly twice as much, so focus a little into the scene, not on the nearest object, to use the zone efficiently. It depends on the sensor size baked into the calculation.

Example

A 50 mm lens at f/8 focused at 3 m on full frame holds roughly 2.4–4 m sharp.

Sources & methodology

Last updated .

Frequently asked questions

How is depth of field calculated?

From the hyperfocal distance H = f²/(N·c) + f, the near and far sharp limits are derived using your focus distance, where f is focal length, N is the f-number and c is the sensor’s circle of confusion.

Why does the far limit say infinity?

Once your focus distance reaches the hyperfocal distance, everything from roughly half that distance to infinity is acceptably sharp, so the far limit has no finite value.

Is anything uploaded?

No. Every calculation runs entirely in your browser — nothing you enter is sent to a server.