Skip to content
Omnikalc

Depth of field calculator: near and far limits of sharpness

Calculate how much of a photo is in focus from the focal length, aperture, focus distance and sensor size, with the hyperfocal distance.

Updated on
Your inputs
mm

Value out of range

Value out of range

Results

Total depth of field

2.04 ft

Near limit of sharpness

9.08 ft

Far limit of sharpness (0 = infinity)
11.12 ft
Hyperfocal distance
97.81 ft
Share of the sharp zone in front of the subject
45%

What depth of field means

A lens focuses sharply at only one distance. Objects a little nearer or farther are slightly blurred, but as long as the blur is too small to see, they still look sharp. Depth of field is the range of distances that look acceptably sharp, from a near limit to a far limit.

The formulas

The calculator first finds the hyperfocal distance H from the focal length f, the f-number N and the circle of confusion c, the largest blur spot that still looks like a point:

  • H = f² ÷ (N × c) + f
  • Near limit = s(H − f) ÷ (H + s − 2f)
  • Far limit = s(H − f) ÷ (H − s), or infinity once the focus distance s reaches H

Worked example

A 50 mm lens at f/2.8 on a full-frame camera (c = 0.030 mm), focused at 10 ft:

Result Value
Near limit 9.08 ft
Far limit 11.12 ft
Total depth of field 2.04 ft
Hyperfocal distance 97.81 ft
Share in front of the subject 45%

Stop down to f/8 and the hyperfocal distance falls to about 34 ft. Focus there and everything from about 17 ft to the horizon is sharp, a classic landscape setting.

What changes depth of field

  • Aperture: each stop smaller (f/2.8 to f/4) widens the sharp zone.
  • Distance: depth of field grows roughly with the square of the focus distance, so close-ups have very little.
  • Focal length: at the same distance, a longer lens gives less depth of field.
  • Sensor size: smaller sensors use a smaller circle of confusion, but they need a shorter lens for the same framing, so at equal framing and f-number they give more depth of field.

The circle of confusion

The usual values assume a print about 8 × 10 inches viewed at normal distance: about 0.030 mm on full frame, 0.020 mm on APS-C and 0.015 mm on Micro Four Thirds. If you crop heavily or view pictures large on a sharp screen, use a smaller value to be safe.

Tips

  • The sharp zone is not centered: at normal distances, about a third to half of it lies in front of the subject.
  • For portraits, a wide aperture and a longer lens blur the background, but make sure both eyes fall inside the sharp zone.
  • Diffraction softens the whole image at very small apertures, so f/22 is rarely sharper overall than f/11.

Frequently asked questions

What is depth of field?

The range of distances in a photo that look acceptably sharp. It extends from a near limit in front of the subject to a far limit behind it.

How do I get a shallower depth of field?

Use a wider aperture (a smaller f-number), a longer focal length, or move closer to the subject. A larger sensor also gives shallower depth of field at the same framing.

What is the hyperfocal distance?

The closest focus distance at which everything out to infinity is sharp. Focus there and the sharp zone runs from half that distance to the horizon, which is useful for landscapes.

What is the circle of confusion?

The largest blur spot the eye still sees as a point in a normal-size print. It is about 0.03 mm on full frame and scales down with smaller sensors.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.