Photography

Depth of Field Calculator

Calculate the near limit, far limit and total depth of field for any focal length and aperture.

Last updated · View algorithm, constants and default inputs (JSON)

Enter your values

Near focus limit 2.730m
Results

About this calculator

Estimate near and far focus limits with the thin-lens hyperfocal formula. Choose a circle-of-confusion value in millimetres; the result depends on acceptable sharpness, sensor format and viewing conditions.

Worked example

calculated with the default values below

Focal length 50 mm · Aperture 2.8 f/ · Focus distance 3 m · Circle of confusion (mm) Full frame (0.030 mm) Near focus limit 2.730 m · Far focus limit 3.329 m · Total depth of field 0.600 m · Hyperfocal distance 29.81 m · Depth in front of the subject 0.270 m · Depth behind the subject 0.329 m

General background references

Disclaimer

These calculators give general estimates. Sizing, pricing, availability and standards vary by brand, retailer and country, so treat the output as a starting point and confirm it against the seller's or authority's own figures.

Maintained by: CalcDelta

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

H = (f² ÷ (N c) + f) ÷ 1000; D_n = H d ÷ (H + d − f ÷ 1000)

f
Focal length (mm)
N
Aperture (f-number)
c
Circle of confusion (mm)
d
Focus distance (m)
H
Hyperfocal distance (m)
D_n
Near limit (m)

Use focal length and circle of confusion in millimetres and focus distance in metres; use the selected circle-of-confusion value directly in mm.

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

Why does aperture affect depth of field more than focus distance?

The hyperfocal formula is H = f²/(N·c) + f, with focal length f and circle of confusion c in the same units. This calculator uses millimetres for both and metres for focus distance; the selected c is a convention for acceptable sharpness, not a physical sensor size.