Skip to content

Depth of field calculator

Estimate near and far focus limits, total depth of field and hyperfocal distance using your circle of confusion.

Inputs

Processed in your browser.

1–2000

0.5–128

0.001–1000000

0.001–1

Result

Enter your settings, then calculate.

How to use

  1. Enter actual focal length in millimetres and the aperture f-number, such as 8 for f/8. Do not substitute an equivalent focal length.
  2. Enter focus distance in metres: the distance to the plane you focus on, not the lens’s focal length. Use a distance consistent with the ideal thin-lens principal-plane reference.
  3. Choose a circle of confusion in millimetres for your intended sharpness criterion. The example 0.03 mm is a conventional starting point, not a universal sensor property. Calculate to view the near limit, far limit, total depth and hyperfocal distance.

The initial values are editable examples, not detected camera settings. Enter plain numbers with a decimal point or decimal comma and without thousands separators. The range below each field states the supported limits. Press Calculate, or Enter in a field, to confirm the current inputs. The diagram above the fields updates immediately with valid settings, including the starting example. Editing clears the confirmed Result and Copy state; press Calculate to confirm again. Incomplete or invalid settings remove the preview geometry. Clear empties the numeric inputs, result and diagram; it keeps the calculation selection. Copy result copies the displayed values with labels. Calculations stay in your browser. Changing the site language opens a translated page and asks before leaving your current inputs; it does not convert a saved camera configuration.

Calculation and interpretation

Depth of field is a range judged acceptably sharp, not a region in which every object is perfectly focused. This calculator estimates that range with a geometric thin-lens model. The circle of confusion is the largest blur-circle diameter you decide to accept at the image plane. A smaller value sets a stricter criterion and gives a narrower range.

Let f be focal length, N the f-number, c the circle of confusion and s focus distance, all lengths converted to millimetres. Define q = f² / (N × c), then hyperfocal distance H = q + f. Near limit = s × q / (q + s − f). When s < H, far limit = s × q / (H − s); when s ≥ H, the far limit is infinity. Total depth is far minus near. Results are converted back to metres.

These expressions retain the focal-length terms of the thin-lens model. Some tables use simplified distant-subject expressions, which can differ slightly. At s = H, the near limit is H/2 and the far limit is infinite. The compressed diagram puts the focus marker halfway along its transformed distance axis and labels near and far limits separately. Infinity is an open end, never a finite distance substituted into a linear scale.

Worked examples

With 50 mm, f/8, focus at 3 m and c = 0.03 mm, hyperfocal distance is 10.47 m. The near limit is about 2.34 m, far limit 4.19 m and total depth 1.85 m. Objects at the focus plane satisfy the geometric focus condition; objects near the limits only satisfy your chosen blur criterion.

With 50 mm, f/8 and c = 0.025 mm, H is exactly 12.55 m. Focusing at 12.55 m gives a near limit of 6.275 m, displayed as 6.28 m, and an infinite far limit. Total depth is also infinite in the model. This does not mean every distant detail will look equally sharp at every print size.

Practical uses and limits

Use the estimates to compare focus placement for a landscape, a group arrangement or a static subject. Inspect the near limit as carefully as the far limit: setting focus farther away may lose a foreground object. For critical work, check the actual photograph at the intended output size instead of relying only on a distance marking on the lens.

The accepted ranges are shown at each input. Focus distance must be greater than focal length after unit conversion. The tool does not model diffraction, subject motion, camera shake, field curvature, pupil magnification, focus breathing or computational image processing. Very close-up work can require a magnification-based treatment, and smaller apertures can increase geometric depth while diffraction reduces fine-detail contrast.

Frequently asked questions

Which circle of confusion should I use?

Choose a criterion appropriate to sensor format, enlargement, viewing distance and intended detail. The default is an example. Smaller values demand tighter sharpness and reduce the calculated depth.

Does infinity mean the far limit is unknown?

No. It is the model’s explicit result when focus reaches or exceeds H. The diagram’s open end represents an unbounded range, and the text states infinity.

Is hyperfocal focus always best?

No. It balances a chosen near-to-infinity range. You may prefer the best focus on a particular subject or a stricter distant-detail criterion.

Why is the depth not one-third in front and two-thirds behind?

That ratio is not universal. Near and far limits depend on focal length, aperture, focus distance and the chosen blur criterion; the formulas calculate them individually.

Formula references