Depth of field calculator with hyperfocal

by Piotr · Photography Tips

Pick your sensor, focal length, aperture and focus distance. The calculator returns the near and far limits of sharpness, the total depth of field and the hyperfocal distance.

Depth of field calculator

Near limit
2.98 m
Far limit
6.07 m
Total depth
3.09 m
Hyperfocal
11.7 m

Circle of confusion 0.0188 mm (sensor diagonal / 1500). Thin-lens model, distance measured from the sensor. Focus at the hyperfocal distance and everything from half that distance to infinity is acceptably sharp.

In short: The calculator opens on a group photo: 35 mm at f/5.6 on APS-C, focused at 4 m. Everything from 2.98 m to 6.07 m is acceptably sharp, a zone 3.09 m deep. The hyperfocal distance is 11.67 m. Focus there instead, and everything from 5.83 m to infinity is sharp. All results use a circle of confusion of the sensor diagonal divided by 1500.

How to read the results

The calculator gives four numbers. Each one answers a different question.

  • Near limit: the closest point that still looks sharp.
  • Far limit: the farthest point that still looks sharp. It reads "infinity" once you focus at or beyond the hyperfocal distance.
  • Total depth: far limit minus near limit. This is the depth of field.
  • Hyperfocal: the focus distance that pushes the far limit to infinity. Focus there, and the near limit falls at half of it.

Switch the unit to feet and every result follows. The sensor menu sets the circle of confusion. The small print under the results shows the value in use.

Horizontal bars showing the sharp zone for a 35 mm lens at f/5.6 on APS-C focused at 1, 2, 4 and 6 m and at the hyperfocal distance of 11.7 m
The sharp zone for 35 mm at f/5.6 on APS-C as the focus moves out. The zone grows faster than the distance, and at 11.7 m (38 ft) it reaches infinity.

The chart shows the pattern behind every result. Close focus gives a short, nearly symmetric zone. Distant focus gives a long zone that leans backward. At the hyperfocal distance, the back half becomes infinite.

Worked examples

Each row is one calculator run. Enter the same values and you get the same numbers.

SituationSensor and lensFocusNear limitFar limitTotalHyperfocal
Head-and-shoulders portraitFull frame, 85 mm f/1.82 m1.97 m2.03 m5.5 cm139.2 m
Group of peopleAPS-C, 35 mm f/5.64 m2.98 m6.07 m3.09 m11.67 m
Close portrait, small sensorMicro Four Thirds, 25 mm f/1.41.5 m1.43 m1.58 m14.3 cm30.97 m
Landscape, near foregroundFull frame, 24 mm f/111.5 m0.83 m8.02 m7.20 m1.84 m
Same landscape, focus at HFull frame, 24 mm f/111.84 m0.92 minfinityinfinity1.84 m
Street scene, wide zoomAPS-C, 16 mm f/81.5 m0.80 m11.72 m10.92 m1.72 m

Three things stand out.

  1. The portrait zone is 5.5 cm deep. Focus on the near eye or lose it.
  2. The landscape row wastes the far end. Focused at 1.5 m, the far limit stops at 8.02 m. Move focus out 34 cm to the hyperfocal distance, and the far limit reaches infinity. The near limit moves out only 9 cm.
  3. The small sensor is not a shallow-focus machine. Micro Four Thirds at f/1.4 still holds 14.3 cm at 1.5 m. The depth of field guide tests why.

The formulas, in plain words

The calculator runs three formulas from the thin-lens model, the same ones in Wikipedia's hyperfocal distance article.

Hyperfocal distance: H = f² ÷ (N × c) + f

Near limit: s × (H − f) ÷ (H + s − 2f)

Far limit: s × (H − f) ÷ (H − s), and infinity when s reaches H

Here f is the focal length, N the f-number, c the circle of confusion and s the focus distance. All lengths are in millimeters inside the formulas.

The hyperfocal distance carries the work. It bundles the lens, the aperture and the sharpness standard into one distance. Once you have H, the near and far limits depend only on how your focus distance compares with it. Focus at H, and the near limit is H ÷ 2. Focus at H ÷ 3, and the near limit is about H ÷ 4 while the far limit is about H ÷ 2. The hyperfocal distance page uses this to test the "focus one third into the scene" rule.

Circle of confusion: why diagonal ÷ 1500

Every depth of field number depends on one choice: how large a blur disc can be and still look sharp. That limit is the circle of confusion. This calculator uses the sensor diagonal divided by 1500.

The figure comes from a print-viewing assumption. Wikipedia's circle of confusion article puts the visible limit at 0.2 mm on a print viewed from about 25 cm. It ties d/1500 to a print about 30 cm across the diagonal. The arithmetic for full frame:

  • Enlargement from a 43.27 mm sensor diagonal to a 300 mm print diagonal: 300 ÷ 43.27 = 6.93.
  • Allowed blur on the sensor: 0.2 mm ÷ 6.93 = 0.0288 mm.
  • Sensor diagonal ÷ 1500: 43.27 ÷ 1500 = 0.0288 mm.

The two routes give the same number. The convention scales with the sensor, because a smaller sensor needs more enlargement to reach the same print.

SensorImaging areaDiagonalCircle of confusion (diagonal ÷ 1500)
Full frame36 x 24 mm43.27 mm0.0288 mm
APS-C23.5 x 15.6 mm28.21 mm0.0188 mm
APS-C, Canon22.3 x 14.9 mm26.82 mm0.0179 mm
Micro Four Thirds17.3 x 13.0 mm21.64 mm0.0144 mm
1-inch13.2 x 8.8 mm15.86 mm0.0106 mm

The Micro Four Thirds row uses the imaging area listed by Wikipedia, not the nominal 18 x 13.5 mm size.

What changes if you print large

Print at 60 cm across the diagonal and view it from the same 25 cm, and the enlargement doubles. The allowed blur on the sensor halves: diagonal ÷ 3000. Depth of field shrinks hard.

Two horizontal bars comparing the sharp zone of a 24 mm lens at f/11 focused at 1.5 m with a circle of confusion of d/1500 and of d/3000
24 mm, f/11, full frame, focus 1.5 m (4.9 ft). Halving the circle of confusion shrinks the zone from 0.83 to 8.02 m down to 1.07 to 2.53 m.

The hyperfocal distance doubles too, from 1.84 m to 3.66 m. A landscape focused by the standard table can look soft at the far edge when printed large and inspected closely.

Calculator trick for big prints: the formulas use only the product N × c. Halving c is the same as halving N. So for a print twice the standard size, enter an f-number two stops wider than the one you shoot. Shooting f/11, read the result at f/5.6: 1.06 to 2.56 m, against the exact 1.07 to 2.53 m. If viewers stand back in proportion to the print, nothing changes, and the standard result holds.

Why two calculators disagree

Different calculators pick different circles of confusion. Wikipedia lists 0.029 mm, 0.030 mm and 0.033 mm as common for full frame. Far from the hyperfocal distance, the choice barely matters. Near it, the choice matters a lot.

Full framec = 0.0288 mm (d ÷ 1500)c = 0.030 mmc = 0.033 mm
85 mm f/1.8 at 2 m, total5.5 cm5.7 cm6.3 cm
24 mm f/11 at 1.5 m, far limit8.02 m9.72 m21.49 m
24 mm f/11, hyperfocal1.84 m1.77 m1.61 m

If a calculator changes its answer between two bodies with the same sensor size, it uses a different circle of confusion for each. The optics are identical. Neither answer is wrong. They describe different viewing standards.

Limits of the model

  • Thin lens. The formulas assume ideal optics. Wikipedia's depth of field article calls them suitable for practical photography and notes that lens designers use more complex ones.
  • Distance from the sensor. Measure from the sensor plane, not the front of the lens. Near the hyperfocal distance, 10 cm matters: 24 mm at f/11 focused at 1.4 m instead of 1.5 m loses the far limit from 8.02 m to 5.78 m.
  • Diffraction is not modeled. At high f-numbers the whole frame softens, as the same article notes. The calculator will happily report a deep zone at f/22 that diffraction blurs everywhere.
  • Sharp means acceptably sharp. Inside the zone, only the focus plane is perfectly sharp. The limits mark where blur becomes visible at the standard print size.

For the mechanism behind these numbers, read the depth of field guide. For landscape focusing charts, see the hyperfocal distance page.

Frequently asked questions

How do you calculate depth of field?
First compute the hyperfocal distance: H = f² ÷ (N × c) + f, with focal length f, f-number N and circle of confusion c. Then the near limit is s × (H − f) ÷ (H + s − 2f) and the far limit is s × (H − f) ÷ (H − s). Depth of field is far minus near. The calculator on this page runs exactly these formulas.
What circle of confusion does the calculator use?
The sensor diagonal divided by 1500. That gives 0.0288 mm on full frame, 0.0188 mm on APS-C and 0.0144 mm on Micro Four Thirds. The convention assumes a print about 30 cm across the diagonal, viewed from about 25 cm. For larger prints viewed from the same spot, a smaller circle of confusion applies.
How do you use the hyperfocal distance from the calculator?
Focus at the distance shown as hyperfocal. Everything from half that distance to infinity is then acceptably sharp. Take a 35 mm lens at f/5.6 on APS-C. Its hyperfocal distance is 11.67 m, and focusing there keeps everything from 5.83 m to infinity sharp. The hyperfocal distance page prints charts for wide lenses.
Why do depth of field calculators give different answers?
Mostly because they use different circles of confusion. Take a 24 mm lens at f/11 on full frame, focused at 1.5 m. A 0.0288 mm limit puts the far limit at 8.02 m. A 0.033 mm limit puts it at 21.49 m. Near the hyperfocal distance, a small change in the convention moves the far limit a long way.
Is the distance measured from the lens or the sensor?
This calculator measures from the sensor plane. A tape run from the front of the lens reads shorter by the length of the lens and mount. A 10 cm offset moves an 85 mm f/1.8 portrait at 2 m from 5.5 cm to 5.0 cm of depth. Near the hyperfocal distance the same offset matters far more, so measure from the sensor.

Sources

  1. Circle of confusion, Wikipedia (2026)
  2. Depth of field, Wikipedia (2026)
  3. Hyperfocal distance, Wikipedia (2026)
  4. Micro Four Thirds system, Wikipedia (2026)