Depth of Field vs Depth of Focus in Microscopy

Table of Contents

What Are Depth of Field and Depth of Focus in Microscopy?

Loupe-binoculaire-p1030891
binocular microscope
Artist: Rama

When observers say an image looks “in focus,” they often mean most of the subject appears sharp. In optical microscopy, two related but distinct quantities describe this experience: depth of field (DOF) and depth of focus. Though the names differ by only one letter, their meanings occupy different sides of the imaging process—one in object space and the other in image space.

  • Depth of field (object space): the axial range in the specimen over which structures appear acceptably sharp in the recorded image or visual observation. If a sample feature lies within the DOF around the focal plane, it will appear crisp enough according to a chosen sharpness criterion.
  • Depth of focus (image space): the axial tolerance at the image plane (for example, at the camera sensor) within which the sensor can move toward or away from the objective’s image plane while maintaining acceptable sharpness. It is a measure of focus tolerance of the imaging system at the detector, not a property of the scene in the specimen.

In everyday terms: DOF tells you how much of the sample along the z-axis will look sharp at once; depth of focus tells you how forgiving the system is to slight camera or sensor misplacement. They are related because both depend on numerical aperture (NA), wavelength, and the sharpness criterion used, but they answer different practical questions. If you want a thicker specimen region to look sharp in one shot, you care about DOF. If you want to know how precisely you must place the sensor to avoid softness, you care about depth of focus. We will analyze both in detail and show how they scale with the same underlying optics described in Optical Foundations.

Optical Foundations: NA, Wavelength, and Magnification

The behavior of DOF and depth of focus follows directly from diffraction and basic imaging geometry. Three ingredients dominate: numerical aperture (NA), wavelength, and magnification. Understanding how these combine sets the stage for correct intuition and accurate estimations presented later in Estimating and Calculating Depth of Field and Image-Side Depth of Focus.

Microscope Objective Specifications
Your quick guide to decipher the specifications of your microscope objective. www.micro-shop.zeiss.com/
Artist: ZEISS Microscopy

Numerical aperture (NA)

Numerical aperture is defined as NA = n sin(θ), where n is the refractive index of the medium between sample and the objective’s front lens, and θ is the half-angle of the maximum cone of light that can enter (or exit) the objective. NA captures both the geometric light-gathering ability and the resolving power of the objective. As NA increases, lateral resolution improves (smaller details can be resolved), but the DOF generally decreases—a necessary trade-off imposed by diffraction.

Wavelength

Resolution and DOF are wavelength-dependent. Shorter wavelengths reduce the size of the diffraction-limited blur and tighten the axial spread of the point-spread function, which typically reduces DOF (and improves resolution). Longer wavelengths increase DOF but sacrifice absolute resolving power in the lateral direction. Throughout this article, unless otherwise specified, we will refer to the free-space wavelength λ0. When formulas explicitly include the refractive index, they usually use λ0. Some treatments instead use the wavelength in the medium, λ = λ0/n; either convention can be applied consistently—what matters is not mixing them.

Magnification

Magnification influences sampling at the camera and, therefore, perceived sharpness depending on the detection criterion. The objective’s optical performance (resolution, DOF) is fundamentally governed by NA and wavelength. However, practical assessments of “acceptable” sharpness involve the detector or the human eye. On a camera, larger magnification spreads a given object detail over more pixels, affecting whether blur is visible. For DOF, magnification enters the commonly used two-term estimate through a detection-limited term involving the pixel size (or a chosen “circle of confusion”). For depth of focus, magnification enters via the effective f-number seen by the camera system.

Diffraction and the axial spread

Incoherent widefield imaging under typical white-light illumination produces a three-dimensional point-spread function (PSF) with a central lobe and side lobes. The PSF’s axial extent underpins both axial resolution and DOF. A commonly used axial resolution estimate (Rayleigh-type criterion) in widefield microscopy is:

The reflected point spread function of perfect cube corner reflector (CCR) in white light
The reflected point spread function of perfect cube corner reflector (CCR) in white light.
Artist: Alex Ershov

Axial resolution δz ≈ (2 n λ0) / NA2.

This is not the same as DOF, but both scale as 1/NA2 and increase with wavelength and refractive index terms in similar ways, so the two are related in trend even if they differ in interpretation and constant factors. We revisit this relationship in Common Misconceptions.

How Depth of Field Scales with Key Variables

Before diving into equations, it helps to build reliable intuition. The following scaling behaviors are robust across common definitions:

Numerical Aperture and bending loss machine
It represents a machine which is used to measure Numerical Aperture and Bending losses
Artist: Happie1Soul

  • DOF decreases rapidly with increasing NA (approximately as 1/NA2). Higher NA yields finer resolution but a thinner slab of acceptable focus.
  • DOF increases with wavelength. Blue light (short λ) yields smaller DOF than red light (long λ), all else equal.
  • DOF depends on the sharpness criterion. What counts as “acceptably sharp” can be tied to the detector pixel size, a visual acuity standard through an eyepiece, or a fraction of the diffraction-limited spot. Tighter criteria reduce DOF.
  • Magnification influences perceived DOF through sampling. On a camera, higher magnification spreads blur over more pixels, potentially making it more visible and effectively reducing the acceptable DOF when judged by a pixel-based criterion.
  • Illumination coherence affects the constants in DOF formulas. Coherent (laser-like) and incoherent illumination yield different PSFs and therefore different numeric prefactors, but the 1/NA2 trend remains.
  • Refractive index n enters through NA and in explicit n-factors depending on the convention used. In practice, switching from air to oil objectives usually reduces DOF because the main effect is a jump to higher NA, which dominates any explicit n factor that might appear in a formula.

These principles hold whether you are imaging with a 10×/0.25 objective or a 100×/1.45 oil immersion lens. In both cases, improving resolution by increasing NA shrinks the axial range that appears sharp. The sections on estimating DOF and image-side depth of focus give you practical, calculation-ready expressions consistent with these trends.

Estimating and Calculating Depth of Field (Object Space)

Because DOF is a perceptual threshold (“acceptable sharpness”), there is no single universally correct constant. However, a widely used engineering approximation for widefield, incoherent imaging combines a diffraction-limited term and a detection-limited term. This two-term model captures the main trade-offs and sampling effects:

DOF ≈ α (n λ0) / NA2 + β (n e) / (M NA)

  • n is the refractive index of the immersion medium on the object side (e.g., ~1.0 for air, ~1.33 for water, ~1.515 for typical oils).
  • λ0 is the free-space wavelength. For broadband light, a representative wavelength (e.g., 550 nm for green light) is commonly used.
  • NA is the objective’s numerical aperture.
  • M is the lateral magnification onto the camera (objective magnification times any intermediate optics affecting the image scale at the sensor).
  • e is the detector-based sharpness criterion measured on the camera sensor. Many users set e to the pixel size p, but you can use a fraction or multiple of p depending on your threshold for visible blur (e.g., e = 1.5p).
  • α and β are constants of order unity (or a small multiple) depending on illumination coherence and the sharpness criterion (Rayleigh, Sparrow, visual threshold, etc.). Using α ≈ 1–2 and β ≈ 1–2 is typical for first-pass estimation.

This formula decomposes DOF into two contributors:

  • Diffraction-limited component α (n λ0) / NA2, which shrinks steeply as NA increases.
  • Detection-limited component β (n e) / (M NA), which shrinks with higher magnification and higher NA, and grows if you tolerate a larger blur on the sensor (larger e).

The 1/NA2 dependence of the diffraction-limited term dominates at high NA; at more modest NA and limited magnification, the detection-limited term can be significant. The split is helpful in planning because it shows two independent levers: optics (NA, wavelength) and sampling criteria (M, e).

Worked examples

Microscope lens NA0.65 Mag40x
Cross section of a microscope objective: Achromatic objective with a numerical aperture of 0.65 and a 40-times magnification
Artist: Ice Boy Tell

To build intuition, consider three cases using α = 1.5 and β = 2 as representative constants (values chosen to reflect a commonly conservative sharpness threshold; change them to match your criterion). We will use λ0 = 550 nm and assume air on the object side (n = 1.0) unless noted.

  1. 40×/0.65 air objective, camera pixel p = 6.5 μm, M = 40
    Diffraction term: 1.5 × (1.0 × 0.55 μm) / (0.65)2 ≈ 1.5 × 0.55 / 0.4225 ≈ 1.95 μm.
    Detection term: 2 × (1.0 × 6.5 μm) / (40 × 0.65) ≈ 13 / 26 ≈ 0.50 μm.
    Estimated DOF ≈ 1.95 μm + 0.50 μm ≈ 2.45 μm.

  2. 20×/0.40 objective, same camera, M = 20
    Diffraction term: 1.5 × 0.55 / 0.16 ≈ 5.16 μm.
    Detection term: 2 × 6.5 / (20 × 0.40) = 13 / 8 ≈ 1.63 μm.
    Estimated DOF ≈ 6.8 μm. Here both terms contribute more because NA is lower (weaker resolving power but more generous DOF), and magnification is lower so each pixel corresponds to a larger object-space distance.

  3. 100×/1.30 oil objective, n ≈ 1.515, M = 100, same camera
    Diffraction term: 1.5 × (1.515 × 0.55 μm) / (1.30)2 ≈ 1.5 × 0.833 / 1.69 ≈ 0.74 μm.
    Detection term: 2 × (1.515 × 6.5 μm) / (100 × 1.30) ≈ 19.7 / 130 ≈ 0.15 μm.
    Estimated DOF ≈ 0.89 μm. Despite the higher refractive index appearing in the numerator, the much higher NA dominates the scaling, yielding a thin DOF appropriate for high-resolution imaging.

These numbers are approximate—substitute your own α and β to match your image sharpness definition. If you use the lens visually (eyepiece) instead of a camera, replace e with the eye’s resolution criterion mapped to the intermediate image scale, or consider the camera pixel as a proxy for what you can critically focus on the screen.

Short code to experiment with DOF

If you want to explore the sensitivity to parameters, the following pseudo-code illustrates the two-term estimate. You can implement it in your preferred language and adjust α and β.


# Inputs: n, lambda0_um, NA, M, pixel_um, alpha=1.5, beta=2.0
# Output: DOF in micrometers (object space)

def estimate_dof(n, lambda0_um, NA, M, pixel_um, alpha=1.5, beta=2.0):
diffraction = alpha * (n * lambda0_um) / (NA**2)
detection = beta * (n * pixel_um) / (M * NA)
return diffraction + detection

# Example:
# Air (n=1.0), lambda0=0.55 µm, NA=0.65, M=40, pixel=6.5 µm
print( estimate_dof(1.0, 0.55, 0.65, 40, 6.5) ) # ~2–3 µm depending on alpha/beta

A simple two-term depth-of-field estimator for widefield microscopy in object space.

Remember that these are first-order estimates for planning and intuition. Exact DOF depends on the chosen sharpness threshold, details of illumination, and post-processing.

Image-Side Depth of Focus and Focus Tolerance

Depth of focus refers to the allowable motion of the image plane (or camera sensor) along the optical axis without producing unacceptable blur. It is sometimes expressed with two parts analogous to the object-space DOF: a diffraction-limited tolerance and a detection-limited tolerance tied to the sensor’s acceptable blur diameter (often taken as a pixel size). A helpful way to express this uses the effective f-number at the sensor:

Optical Microscope Objective Lens
these were left unattended in the lab- had to screw around :p
Artist: Kiran Foster

  • For a microscope objective forming an image at the camera (via a tube lens or finite system), a common approximation for the effective f-number is Neff ≈ M / (2 NA), where M is the magnification from object to sensor.

In photography, a diffraction-limited depth-of-focus tolerance scales like 2 λ N2. Translating to microscopy with Neff yields a convenient scaling law for the diffraction component in image space:

Depth of focus (diffraction component) ∝ λ0 (M / NA)2

The proportionality hides a criterion-dependent constant, often of order unity. A sensor-limited tolerance (how much defocus before the blur circle exceeds a chosen diameter c on the sensor) scales approximately as:

Depth of focus (detection component) ∝ (M c) / NA

Here, c can be taken as the pixel size p or a fraction/multiple of p depending on your sharpness standard. These relations show:

  • Higher magnification increases image-side depth of focus tolerance in the diffraction term because the effective f-number increases with M. But higher M can make blur more visible in the object-space DOF assessment. These are different stories: one is sensor placement tolerance; the other is how much of the specimen looks sharp at once.
  • Higher NA reduces depth-of-focus tolerance (you must place the sensor more precisely) and also reduces object-space DOF.

Illustrative calculation

Consider the 40×/0.65 setup with λ0 = 550 nm. Using the scaling above with representative constants, the diffraction-limited depth-of-focus tolerance is on the order of λ0 (M / NA)2. Plugging M = 40, NA = 0.65 gives a factor (40 / 0.65)2 ≈ (61.5)2 ≈ 3780. Multiplying by λ0 ≈ 0.55 μm yields a few millimeters times a small constant, but the missing constant brings the tolerance back to a physically realistic sub-millimeter range for typical microscope cameras. The key point is not the exact number (which depends on the criterion) but the trend: relatively small movements of the camera mount, on the order of tens of micrometers, can be consequential at high NA, which is why rigid couplings and parfocal calibration matter.

If the sensor blur criterion is c = p = 6.5 μm, the detection-limited contribution scales ~ (M c) / NA ≈ 40 × 6.5 / 0.65 ≈ 400 μm, again to within a modest constant. This explains why precise back focal plane spacing and stable camera adapters are important: small defocus at the image plane can soften images even when the sample itself is within the object-space DOF.

For practical system design and troubleshooting, use these relations to guide tolerances: the higher the NA, the tighter both object-space and image-space focus tolerances become.

Practical Implications Across Common Microscopy Use Cases

Depth of field and depth of focus influence setup choices, focusing technique, and expectations for what can be captured in a single frame. The following scenarios illustrate typical considerations. When relevant, links point to deeper discussions in Calculating DOF, Image-Side Depth of Focus, and Managing DOF.

Thick specimens in brightfield

In brightfield observation of thick samples (e.g., plant stems, insect parts), the region appearing sharp at once can be surprisingly thin with moderate-to-high NA objectives. Even with a 20×/0.40, the DOF may be only a few micrometers, as estimated in the worked examples. If the specimen relief far exceeds this, you will see defocus blur from out-of-plane features overlaying in-focus details. In such cases, strategies in Managing DOF—such as adjusting NA, using longer wavelengths (e.g., a red filter), or adopting focus stacking—can help.

Thin sections and coverslip-corrected imaging

When imaging well-prepared thin sections near the coverslip, the main design goal is maximizing lateral resolution and contrast rather than extending DOF. High-NA oil objectives reduce DOF into the sub-micrometer to low-micrometer regime, which is advantageous for isolating the focal plane but demands careful focusing and stable mounts. Here the image-side depth of focus becomes practically important: precise sensor placement and minimal mechanical drift help maintain critical focus.

Phase contrast and interference techniques

Phase contrast and differential interference contrast (DIC) alter contrast mechanisms but do not change the fundamental scaling of DOF with NA and wavelength. However, these techniques can make slight defocus more or less conspicuous depending on specimen morphology. Although contrast may improve visual discrimination of features, the underlying diffraction-limited DOF for a given NA remains in the same scale as in brightfield. Focusing precision and expectations should be guided accordingly.

Widefield fluorescence

Fluorescence emission wavelengths typically fall in the green-red region, leading to somewhat larger DOF compared to blue excitation-based transmitted-light imaging, simply because of the longer emission wavelengths involved in the DOF estimates. Still, the high NA objectives commonly used for fluorescence produce thin DOF. Out-of-focus background from thick, fluorescent specimens can overwhelm in-focus signal; optical sectioning approaches (e.g., confocal, structured illumination) alter the axial response and can suppress out-of-plane light, effectively tightening the axial PSF even though the intrinsic diffraction scaling remains 1/NA2.

Low magnification overview vs. high magnification detail

At low magnification and low NA (e.g., 4×/0.10), DOF can be tens of micrometers or more, making it easy to capture gently undulating surfaces in one shot. As you increase to 40×/0.65 or 100×/1.30, the DOF becomes thin, and subtle tilts or thickness variations will take parts of the subject out of the focal slab. A practical habit is to “map” the specimen relief at lower NA to judge whether a single focal plane will suffice or you will plan to acquire a z-stack with a step size guided by the axial resolution scale described in Optical Foundations.

Managing and Extending Perceived Depth of Field

Because DOF emerges from fundamental diffraction, you cannot arbitrarily increase it without consequences. However, you can manage and sometimes extend the perceived DOF or the useful DOF by balancing NA, wavelength, sampling, and computational approaches. The following strategies are common and consistent with optical theory.

1) Choose an appropriate NA for the task

  • If your priority is resolution (e.g., resolving fine striations), you will likely choose higher NA and accept a thinner DOF. Pay special attention to image-side focus tolerance and mechanical stability.
  • If your priority is showing more of a 3D object in focus at once, consider a lower NA objective or, where available, use an adjustable iris on the objective to reduce effective NA. This increases DOF at the expense of lateral resolution.

2) Use longer wavelengths when acceptable

All else equal, longer wavelengths increase DOF. If color fidelity is not critical or you are producing monochrome images, a red filter can modestly increase DOF while slightly reducing theoretical lateral resolution. The effect is moderate but predictable and may help when you are just shy of the DOF needed.

3) Optimize sampling and magnification

  • Match magnification to pixel size such that the in-focus detail is adequately sampled (often a Nyquist-like guideline for lateral sampling), but avoid excessive magnification that only enlarges blur without adding information. This can also influence the detection-limited DOF term in the two-term DOF estimate.
  • Set your sharpness criterion e deliberately (for camera-based decisions). If your use case tolerates a small amount of blur, the effective DOF increases; for critical measurement, use a stricter criterion.

4) Mechanical alignment and sensor placement

Even if object-space DOF is sufficient, a mispositioned or tilting sensor can degrade sharpness. Maintain square and stable camera mounting. The allowable tolerance depends on the image-side depth of focus, which tightens with increasing NA. A solid mechanical path reduces drift and preserves best focus through long acquisitions or during z-stacks.

5) Computational imaging: focus stacking and extended DOF

When specimens are thicker than the optical DOF at your chosen NA, you can acquire a z-stack and combine in-focus regions computationally to form an extended depth-of-field image. This does not violate physics: it leverages multiple images at stepped focal planes. The z-step should be small enough to capture the in-focus content at each plane; a common heuristic is to use a step size no larger than about half of the axial resolution scale (see Axial scaling), though the optimal step depends on the algorithm and desired fidelity. Always keep in mind that stacking consolidates sharp content from different planes; it does not increase the native optical DOF in any one exposure.

6) Optical sectioning for thick fluorescent samples

If out-of-plane background floodlights the image in widefield fluorescence, optical sectioning methods (e.g., confocal pinhole detection, structured illumination) restrict detection to a thinner axial region, effectively improving the discernibility of in-focus features and reducing blur from layers outside the focal plane. This primarily alters the axial PSF rather than the definition of DOF per se, but the net effect is a crisper focal slab in thick, fluorescent specimens. See the discussion in Misconceptions about DOF versus optical section thickness.

Common Misconceptions About DOF and Focus in Microscopy

Because focus phenomena involve human perception and hard physics, a few myths persist. Clarifying them helps you make better decisions and correctly interpret changes you observe at the microscope.

  • “Axial resolution equals depth of field.” Not exactly. Axial resolution is a separability criterion for two point objects along z (how close they can be before merging); DOF is a perceptual slab in which a single object appears acceptably sharp. Both scale approximately as 1/NA2 and increase with wavelength, but they represent different thresholds and have different constants.
  • “Using immersion oil increases DOF because n appears in the DOF numerator.” In practice, switching to an oil-immersion lens reduces DOF because the achievable NA increases substantially, and the 1/NA2 dependence dominates. Explicit n-factors must be interpreted in the context of the total NA and consistent wavelength convention.
  • “More magnification always reduces DOF.” Higher magnification makes blur more visible for a pixel-based detection criterion and often coincides with higher NA (which reduces DOF). But magnification by itself does not set the optical DOF; NA and wavelength do. If NA is held constant, the DOF’s diffraction term is unchanged; only the detection term in the two-term estimate changes through sampling.
  • “Digital zoom changes optical DOF.” Digital zoom on a captured image does not alter optical DOF; it only enlarges pixels. The underlying sharpness is fixed by the optics and focus at capture time.
  • “Stopping down the field diaphragm increases DOF.” The field diaphragm controls the illuminated field of view, not the system NA that sets DOF. Apertures that affect the effective NA (for example, an objective iris or the illumination aperture that controls coherence and effective NA matching) influence DOF; the field stop by itself does not.
  • “Color does not matter for DOF.” Wavelength matters: blue light tightens DOF, red light loosens it, consistent with the scaling described in How DOF Scales.

Frequently Asked Questions

Does increasing magnification always make my depth of field smaller?

Not inherently. Optical DOF, set by diffraction, is governed by NA and wavelength, not magnification. However, in practice, higher magnification objectives often have higher NA, which does reduce DOF. Also, for camera-based assessments, higher magnification spreads blur over more pixels, lowering the acceptable DOF under a pixel-based sharpness criterion (the detection term in the two-term DOF model). If you compared two objectives with the same NA but different magnification, the diffraction-limited DOF term would be comparable; only the sampling-driven term would differ.

Why does confocal microscopy seem to have a thinner depth of field than widefield?

Confocal microscopy modifies detection so that only light from near the focal plane passes through the pinhole to the detector, strongly rejecting out-of-focus fluorescence. This changes the effective axial point-spread function and yields thinner optical sections than widefield at the same NA. Although the intrinsic 1/NA2 scaling with wavelength still applies, confocal’s optical section thickness is smaller by a factor set by the pinhole and system parameters. The result is a perceptually thinner “in-focus” region. It is more precise to say confocal improves axial sectioning rather than “increases DOF,” but for many users the practical outcome resembles a reduced DOF compared to widefield under the same specimen conditions.

Final Thoughts on Choosing the Right Depth-of-Field Strategy

Depth of field and depth of focus are two sides of the same optical coin: one speaks to how much of the specimen appears sharp at once, and the other to how tolerant your system is to sensor placement and focus drift. Both are grounded in the same fundamentals—the numerical aperture, wavelength, and the definition of “acceptable” sharpness tied to sampling. The key takeaways are:

  • NA is the dominant lever. Increasing NA boosts resolution but rapidly thins the DOF and tightens focus tolerances. Plan your imaging pipeline around the highest NA you truly need.
  • Wavelength and sampling are secondary but important tools. Longer wavelengths modestly increase DOF; sensible magnification and pixel size selection ensure you are not simply magnifying blur.
  • Mechanical stability preserves sharpness. As NA rises, the permissible image-plane motion shrinks. Rigid mounts and good parfocal alignment protect your investment in optical performance.
  • Computation complements optics. When specimens exceed the native DOF, focus stacking and optical sectioning strategies can present more of the 3D scene sharply while respecting physical limits.

Ultimately, “the right” DOF is application-dependent: educational overviews may prioritize generous DOF for context, while research imaging may prefer thin DOF to isolate precise planes. Use the scaling rules and estimation methods in this article to set expectations and make informed trade-offs. If you found this guide helpful, explore related microscopy fundamentals and consider subscribing to our newsletter for future deep dives into optical performance, sampling, and imaging strategies.

On Key

Related Posts

Stay In Touch

Be the first to know about new articles and receive our FREE e-book