Depth of Focus Calculator

Tune sensor placement tolerance with depth of focus. Use f-number, magnification, or wavelength criteria rigorous. Export tables, verify units, and document your calculations easily.

Typical camera values: 1.4 to 22.
Adjust output rounding for reporting.

Circle of Confusion Options

CoC is the acceptable blur diameter on the sensor.
Common guideline: 10–30 µm for many sensors.

Magnification Inputs

Used by magnification-aware method.
Optional alternative to magnification.
If v and f are provided, uses (v/f).

Formula Used

Depth of focus describes how far the image sensor (or film) can shift along the optical axis while maintaining acceptable sharpness. This is an image-space tolerance and differs from depth of field.

Geometric guideline

A widely used guideline is t ≈ 2 N c, where t is total depth of focus, N is f-number, and c is the acceptable circle of confusion on the sensor.

Magnification-aware form

When working closer (macro), an improved estimate is t = 2 N c (1 + m), where m is magnification. If image distance v and focal length f are known, you may use (1+m) = v/f.

Diffraction-limited criterion

For diffraction-limited systems, a common defocus tolerance uses Δf = ± 2 λ N², where λ is wavelength. The total span is 4 λ N².

Tip: Smaller apertures (higher f-number) increase depth of focus, but reduce light and may increase diffraction blur.

How to Use This Calculator

  1. Select a method based on your application: guideline, magnification-aware, or diffraction-limited.
  2. Enter the f-number. For geometric methods, choose how to set the circle of confusion.
  3. For close-up work, provide magnification, or use image distance and focal length.
  4. For diffraction-limited systems, enter wavelength and keep CoC fields ignored.
  5. Press Calculate. Results appear above the form, with CSV and PDF exports.

Example Data Table

These sample cases illustrate typical outcomes. Values are approximate.

Method F-number CoC / Wavelength Magnification Total Depth of Focus
Guideline 8 15 µm 0.24 mm
Magnification-aware 8 15 µm 0.5 0.36 mm
Guideline 2.8 10 µm 0.056 mm
Diffraction-limited 10 550 nm 0.22 mm
Diffraction-limited 4 550 nm 0.0352 mm

Depth of Focus Guide

1. Why depth of focus matters

Depth of focus is the allowable axial shift of the sensor or film while the image remains acceptably sharp. It is a tolerance problem: if the sensor plane moves beyond this limit, blur grows beyond your chosen criterion. This matters in cameras, microscopes, relay optics, and machine-vision modules where assembly variation is real.

2. Depth of focus versus depth of field

Depth of field describes object-space range that appears sharp in front of the lens, while depth of focus is image-space tolerance behind the lens. A system can have large depth of field but still require precise sensor positioning. Treat depth of focus as a mechanical and alignment specification, not a scene-property.

3. The key inputs: f-number and blur tolerance

For geometric blur, the calculator uses total depth of focus t ≈ 2Nc, where N is f-number and c is the acceptable circle of confusion. If N = 8 and c = 15 µm, then t ≈ 2×8×0.015 mm = 0.24 mm. Tightening c from 15 µm to 8 µm reduces tolerance by about 47%.

4. Choosing circle of confusion from sensor geometry

When you do not have a project-specific blur limit, a common engineering approach is to set c from sensor diagonal. Using diagonal/divisor, a 43.3 mm diagonal with a divisor of 1500 yields c ≈ 0.0289 mm (28.9 µm). Increasing the divisor to 2000 gives a stricter 21.7 µm value.

5. Using pixel pitch for modern sensors

With small pixels, you may prefer a pixel-based tolerance. If pixel pitch is 4.3 µm and you choose a 2× factor, then c ≈ 8.6 µm (0.0086 mm). This can better match digital sampling expectations and helps avoid overly optimistic tolerances when sensors have very fine resolution.

6. Magnification increases required tolerance span

In close-up and macro work, magnification affects defocus behavior. The magnification-aware estimate uses t = 2Nc(1+m). At m = 0.5, the tolerance increases by 50% compared with the small-magnification guideline. This is useful for inspection systems and macro rigs where m is known from design.

7. Diffraction-limited systems and wavelength dependence

If diffraction dominates, defocus tolerance scales as N². The calculator uses Δf = ±2λN² (total span 4λN²). For λ = 550 nm and N = 10, total span is 4×0.55 µm×100 = 220 µm (0.22 mm). Shorter wavelengths tighten tolerance; longer wavelengths loosen it.

8. Practical production considerations

Real assemblies face tilt, spacing stack-ups, filter thickness variation, and temperature drift. If you allocate only half the computed depth of focus to sensor placement, the remainder can cover tilt and mechanical aging. Use the export buttons to document assumptions, then iterate CoC and method to match your quality target.

FAQs

1. What is a typical circle of confusion value?

Many designs start with 10–30 µm on the sensor, then adjust using pixel pitch or image-quality requirements. Smaller CoC means stricter sharpness and a smaller depth of focus.

2. Which method should I choose for camera-like systems?

Use the geometric guideline for general estimates. If you know magnification or you work near macro distances, choose the magnification-aware method for a more realistic tolerance.

3. When should I use the diffraction-limited option?

Use it when the system is near diffraction-limited, such as microscopes, well-corrected optics, or small apertures. It is especially useful when CoC is not the primary limitation.

4. Why does a higher f-number increase depth of focus?

A smaller aperture reduces the cone angle of rays, so defocus creates a smaller blur circle at the image plane. That increases allowable sensor shift, but reduces light and can increase diffraction blur.

5. Does focal length affect depth of focus directly?

In these formulas, f-number and tolerance dominate. Focal length matters indirectly through magnification and working distance. If you provide image distance and focal length, the calculator uses v/f to estimate (1+m).

6. Are the results symmetric around best focus?

The calculator reports a symmetric ± tolerance for simplicity. In real optics, asymmetry can occur from aberrations, sensor stack effects, or non-ideal focusing mechanisms.

7. How can I use this in manufacturing documentation?

Pick a method, record your CoC or wavelength choice, and export the results. Then state the allowed sensor spacing tolerance in your drawing notes and reserve margin for tilt and thermal drift.

Related Calculators

root mean square speed calculatorraman shift calculatorrecoil velocity calculatorknudsen number calculatorponderomotive energy calculatorfret distance calculatorthermal de broglie wavelength calculatorconfocal pinhole size calculatorvacuum conductance calculatornumerical aperture calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.