Microscope Depth of Field vs Depth of Focus

Table of Contents

What Is Depth of Field in Microscopy and Why It Matters

When people first peer through a microscope and try to focus on a three-dimensional specimen—say, a thick pollen grain or a textured microfabricated surface—they often notice that only a thin layer seems sharp at any one time. This axial extent of acceptable sharpness in the specimen is called the depth of field (DOF). Understanding depth of field is essential because it governs how much of a thick sample can be in focus simultaneously and how you should design your imaging strategy when features of interest sit at different heights.

Variation of DoF on mirror vs diffuse surfaces
This comparison shows the impact of the depth of field on the reflection through a mirror surface and through a diffuse surface in a picture. Artist: Basile Morin

Depth of field is only one part of the focus story. On the image side (the camera or eyepiece plane), we talk about depth of focus: the tolerance along the optical axis within which the image sensor can be displaced while the image remains acceptably sharp. Although related, depth of field and depth of focus refer to different spaces (object vs. image) and scale differently with optical parameters.

Depth of field also interacts with resolution—your ability to distinguish fine detail. Resolution is primarily governed by the numerical aperture (NA) of the objective and the wavelength of light. Higher NA improves lateral (x–y) and axial (z) resolution but generally reduces depth of field. Conversely, lowering NA increases depth of field but sacrifices the ability to separate closely spaced features. These trade-offs are a fundamental theme in microscopy and recur throughout this article.

This guide explains the physics that set depth of field, clarifies the difference between DOF and depth of focus, shows how camera sampling influences what counts as “acceptably sharp,” and compiles practical strategies to manage limited DOF. You will also find links within the article to other relevant sections—for example, NA and wavelength effects are detailed in How Numerical Aperture and Wavelength Govern Resolution and Depth, while sensor-related topics appear in Camera Sampling, Pixel Size, and Focus Tolerance.

How Numerical Aperture and Wavelength Govern Resolution and Depth

Two parameters dominate the spatial resolving power of an optical microscope: numerical aperture (NA) and wavelength (λ). In simplified terms, NA quantifies how strongly the objective lens gathers or concentrates light from the specimen. Wavelength sets the scale of diffraction—the fundamental limit on how finely light can be focused or distinguished. Together, these define the point spread function (PSF), the image of a point source, and thus the attainable resolution and sectioning capability.

Wavegiude-fiber-NA
Numerical Aperture Artist: Baard Johan Svensson

Lateral and axial resolution: what changes with NA and λ

While there are multiple formal criteria for resolution (e.g., Rayleigh, Sparrow) and different coherence regimes (incoherent fluorescence vs. partially coherent transmitted light), a few broadly useful proportionalities hold:

  • Lateral (x–y) resolution is approximately proportional to λ/NA. Increasing NA decreases the smallest resolvable lateral feature size.
  • Axial (z) resolution improves more strongly with NA, with a typical proportionality like λ/NA2 (constants and refractive index factors depend on the specific imaging mode). This means a higher NA tightens the PSF along z more than along x–y, providing thinner optical sections.

These relationships emphasize why high-NA objectives are used for fine detail and optical sectioning: they collect and focus larger angles of light, shaping a narrower PSF in all dimensions.

Depth of field: object-space sharpness, not the same as resolution

Depth of field is conceptually distinct from resolution even though both depend on NA and λ. DOF is the axial range over which a specimen region remains “acceptably sharp.” Since “acceptable” depends on the observer, camera sampling, and the content of the scene, there is no universal single-number definition. Still, under diffraction-limited conditions, a common and broadly correct statement is:

Depth of field decreases roughly in proportion to 1/NA2 and increases with wavelength.

The precise constants depend on the imaging modality (incoherent vs. partially coherent), the acceptance criterion for blur, and aberrations. In widefield fluorescence and many brightfield situations, you can think of DOF as being on the order of the axial dimension of the PSF, with additional factors set by how much blur you deem tolerable in the final image.

Because DOF narrows quickly with higher NA, it is common for high-resolution objectives to have a very thin slice of the specimen in focus at once. That thinness is what allows optical sectioning to some degree, even in widefield systems: out-of-focus planes contribute light that is more blurred and lower in contrast. Specialized methods such as confocal microscopy and structured illumination further reject or computationally reassign out-of-focus light, but those are different mechanisms than the purely geometric notion of DOF.

Illumination and coherence considerations

The coherence properties of illumination influence image contrast and effective transfer of spatial frequencies—especially in transmitted-light modalities. In partially coherent brightfield, the condenser aperture setting affects both contrast and the effective transfer function. Stopping down the condenser aperture can reduce the contribution of high spatial frequencies, slightly increasing the perceived DOF by limiting the range of angles. However, the trade-off is a loss of resolution and potential introduction of diffraction artifacts. When you weigh such adjustments, keep in mind the interactions discussed here and revisit the detailed trade-offs in Practical Techniques to Manage Limited Depth of Field.

Depth of Field vs Depth of Focus: Object Space and Image Space

Although the phrases sound similar, depth of field (object space) and depth of focus (image space) describe tolerances in different places. Confusing them can lead to incorrect conclusions about optics selection or camera alignment.

Object-side depth of field

Depth of field refers to a band in the specimen that forms images appearing acceptably sharp. Factors that control or influence DOF include:

  • Objective NA: Higher NA reduces DOF approximately with 1/NA2.
  • Wavelength: Longer wavelengths increase DOF proportionally.
  • Aberrations and mismatches: Spherical aberration, cover glass mismatch, and refractive index differences broaden the PSF and change perceived sharpness.
  • Observer or sensor criteria: What is “acceptably sharp” depends on the imaging task, display scale, and sampling (see Camera Sampling, Pixel Size, and Focus Tolerance).

It is useful to distinguish between the physical, diffraction-limited DOF and the practical, task-driven DOF. In educational or hobby contexts, where the aim is a pleasing rendition of a 3D structure, you may accept a wider range of axial blur than a quantitative imaging task would.

Image-side depth of focus

Depth of focus, in contrast, quantifies how much the image plane (sensor or eyepiece field stop) can be displaced along z while preserving acceptable sharpness. In photography, this tolerance often relates to the f-number: larger f-number (smaller aperture) increases depth of focus. In microscopy, an effective f-number at the camera plane scales with magnification and objective NA. While the exact constants depend on definitions and tolerances, a broadly correct trend is:

DOF-resolution-multiple patterning
The resolution is given by 0.5 wavelength/numerical aperture. The depth of focus calculation is provided in the reference. Artist: Guiding light

  • Depth of focus increases with the square of the effective f-number, which in microscopy grows with magnification and decreases with objective NA.

One helpful consequence is that high magnification increases the image-side tolerance, making the sensor position a bit less sensitive to tiny mechanical shifts. That does not mean high magnification increases object-side DOF; in fact, due to the NA typically being higher, object-side DOF is usually smaller.

Depth of focus matters during camera integration and alignment. If the sensor is not precisely at the image plane, sharpness suffers even when the specimen is in perfect focus. Ensuring that the camera flange distance and any relay optics are set correctly keeps the sensor inside the allowable image-side tolerance. If your system uses an adjustable tube lens or intermediate optics, verify that the parfocal distance and tube length are as specified by the objective design. For more on how the sensor sampling interacts with this tolerance, see Camera Sampling, Pixel Size, and Focus Tolerance.

Camera Sampling, Pixel Size, and Focus Tolerance

Even with perfect optics, the recorded image is constrained by sampling on a finite grid of pixels. Sampling determines whether defocus blur is noticeable and whether resolution delivered by the optics can be meaningfully captured.

Effective pixel size at the specimen

A camera pixel of pitch p (in micrometers) behind an objective of magnification M corresponds to an effective pixel size on the specimen of peff = p / M. For instance, a 6.5 μm pixel behind a 40× objective samples the specimen at ~0.1625 μm per pixel (6.5/40). This simple relationship guides the pairing of cameras with objectives.

Nyquist sampling and optical cutoff

To capture as much optical detail as the system can transmit, sampling should satisfy the Nyquist criterion for the highest spatial frequencies supported by the optics. For incoherent imaging (a good approximation for many fluorescence modalities and a useful reference point for others), the optical transfer function has a lateral cutoff frequency proportional to NA/λ. A widely used rule of thumb is:

  • Specimen-side sampling interval (effective pixel size) should be on the order of λ/(4·NA) to adequately sample diffraction-limited detail. Some workflows use slightly different constants depending on the resolution criterion and contrast requirements.

If the sampling interval is larger than this, fine detail will be undersampled and potentially lost or aliased. If it is much smaller, the image will be oversampled; though not harmful to information, it may incur larger files and lower signal-to-noise per pixel for a given exposure.

How sampling shapes “acceptable sharpness”

Depth of field depends on a chosen threshold: how much blur can we tolerate before we deem a plane out of focus? Sampling plays a direct role in this decision. If the blur diameter from a small defocus is smaller than one pixel, the image may still appear acceptably sharp at typical display scales. If the blur grows beyond several pixels, visible softness appears.

7a
(a) The point-spread function (PSF) of a widefield fluorescence microscope is superimposed of the pixel array from a digital camera in both two and three-dimensional diagrams. Artist: Crystal900206

As a result, the practical DOF can be somewhat larger for coarser sampling and smaller for finer sampling. This is not a contradiction of the optical DOF; it reflects the fact that acceptable sharpness is a perception- and task-defined criterion. For quantitative work—like measuring filament widths or counting small features—rely on optical DOF and resolution rather than on pixel-limited tolerance.

Axial sampling for z-stacks

When collecting a stack across z (e.g., for 3D visualization or focus stacking), axial sampling should reflect the axial bandwidth of the imaging system. A simple order-of-magnitude guideline is that the z-step be smaller than the axial resolution scale, which for widefield can be thought of as proportional to λ/NA2 (including refractive index factors for the immersion medium). Choosing a step size finer than this ensures you do not miss planes that contribute distinct high-frequency content. See suggestions for focus stacking in Practical Techniques to Manage Limited Depth of Field.

Refractive Index, Immersion Media, and Cover Glass Effects

Beyond diffraction and sampling, the specimen’s optical environment strongly affects depth of field and apparent sharpness. The main players are refractive index matching, immersion media, and cover glass thickness in transmitted and reflected light microscopy.

Refractive index mismatch and spherical aberration

A refractive index mismatch occurs when light passes between materials of different refractive indices—such as an aqueous specimen (n ~ 1.33) under a cover glass designed for oil immersion (n ~ 1.515) without proper correction. Mismatch introduces spherical aberration, which broadens the PSF and reduces contrast. In practice, spherical aberration degrades both lateral and axial resolution and often increases the apparent DOF by smearing the response along z—an increase that is not helpful, because it comes from loss of fine detail, not from a beneficial extension of sharpness.

Using the correct immersion medium for the objective (air, water, glycerol, oil, or silicone oil) and matching cover glass specifications can minimize mismatch-induced aberrations. For thick specimens, immersion objectives designed for refractive indices closer to the sample’s environment are particularly effective at preserving axial resolution and reducing unwanted PSF elongation.

Cover glass thickness and correction collars

Many high-NA objectives are specified for a standard cover glass thickness (commonly ~0.17 mm). If the cover glass deviates or if your setup uses no cover glass, spherical aberration can arise. Some objectives include a correction collar to compensate for departures from the nominal cover glass thickness or small refractive index differences. Adjusting the collar can restore sharpness and improve the effective DOF in demanding cases.

When working in reflected light or on bare surfaces (e.g., metallurgical microscopy), objectives designed for no cover glass avoid this issue. In transmitted light, using the specified cover glass thickness and immersion medium maintains the objective’s intended performance envelope.

Immersion objectives and high NA

Immersion objectives enable higher NA by operating within a higher refractive index medium. Water-immersion objectives match biological aqueous environments better than oil and can reduce spherical aberration when focusing deeper into water-based samples. Oil-immersion objectives reach the highest NAs on thin, cover-glass-mounted specimens with compatible media. The primary reason to select an immersion objective for DOF considerations is that higher NA tightens the axial PSF—producing better sectioning—but consequently reduces the object-side DOF. Whether that reduction hampers or helps depends on your imaging goals. For a flat, thin specimen, it is an advantage; for a thick, textured sample where you want more of the volume in focus at once, it is a constraint.

Practical Techniques to Manage Limited Depth of Field

Limited depth of field is not always a problem—sometimes it is the point, like when you want to isolate a thin plane. But when you need more of a 3D object in focus, you have options. The following techniques help balance DOF, resolution, and image quality without relying on guesswork.

1) Choose objective NA strategically

  • Lower NA for thicker samples: If resolving the finest detail is not essential, a moderate NA (e.g., 0.25–0.40) often increases DOF enough to keep more of a 3D structure within acceptable sharpness.
  • High NA for thin optical sections: When you need to discriminate closely spaced axial features, higher NA provides tighter sectioning at the cost of a thinner DOF. This is ideal for thin, flat specimens or for separating layers in a structured sample.

As discussed in How Numerical Aperture and Wavelength Govern Resolution and Depth, these changes track predictable physical trends. Adjust NA based on your imaging question, not by habit.

2) Consider illumination NA and aperture settings (transmitted light)

In transmitted brightfield, adjusting the condenser aperture affects contrast and partially the effective transfer of spatial frequencies. A slightly closed condenser aperture can produce a modest perceived DOF increase by limiting high-angle illumination. The trade-off is reduced resolution and potential diffraction-softening. Avoid over-closing the aperture; keep it in a reasonable fraction of the objective NA so the image is not starved of resolution and contrast.

This technique is not a substitute for optical adjustments like switching objectives or re-framing the imaging task. It is a fine-tuning lever, best used with a clear understanding of the blur-vs-contrast trade-off.

3) Optimize refractive index matching

  • Use the correct immersion medium for the objective and specimen environment to minimize spherical aberration.
  • Match cover glass thickness and use the correction collar when available. Proper matching preserves the intended PSF shape and keeps DOF predictable.

These adjustments may not dramatically change the nominal DOF, but they often restore contrast and resolution that aberrations would otherwise degrade, making the most of the DOF you do have.

4) Leverage focus stacking (z-stacking)

Focus stacking combines multiple images acquired at different z-positions into a composite image with extended apparent DOF. It is widely used in reflected-light microscopy of thick or rough samples and in macro/micro photography. Although stacking does not change the physical DOF, it produces a result in which multiple layers appear sharp simultaneously.

Key considerations include:

  • Axial sampling (z-step): Choose a step size smaller than the optical axial resolution scale (proportional to λ/NA2). Finer steps are required for high NA.
  • Registration: Ensure mechanical stability and consistent illumination between slices for effective combination.
  • Contrast: Algorithms typically select in-focus regions based on local contrast measures; ensure adequate signal-to-noise.

For a conceptual roadmap on choosing z-steps, revisit Camera Sampling, Pixel Size, and Focus Tolerance.

5) Use modalities with optical sectioning when appropriate

  • Confocal microscopy uses pinhole detection to reject out-of-focus light, effectively thinning the optical section and improving axial resolution. This increases the selectivity of focus rather than increasing DOF; the visual effect is crisper planes with less blur from other layers.
  • Structured illumination and light-sheet approaches also improve sectioning in different ways. The practical outcome is reduced interference from out-of-focus regions and improved 3D fidelity within the section.

These methods change the imaging physics compared to widefield, so they are most applicable when your goal is to isolate planes rather than to have a single image with extended DOF.

MultiPhotonExcitation-Fig7-doi10.1186slash1475-925X-5-36
Pointlike emitter optical response. From left to right: calculated x-y (above) and r-z (below) intensity distributions, in logarithmic scale, for a point like source imaged by means of wide-field, 2PE and confocal microscopy. Both 2PE and confocal shapes exhibit a better signal to noise ratio than widefield case. 2PE distribution is larger due the fact that a wavelength twice than in the wide-field and confocal case is responsible for the intensity distribution. Such intensity distributions are also known as point spread functions of the related microscopes. Optical conditions: excitation wavelengths are 488 nm and 900 nm for 1PE and 2PE, respectively; emission wavelength is 520 nm; numerical aperture is 1.3 for an oil immersion objective with oil refractive index value set at 1.515. Artist: Alberto Diaspro, Paolo Bianchini, Giuseppe Vicidomini, Mario Faretta, Paola Ramoino and Cesare Usai

6) Frame the problem to your advantage

  • Reorient the sample so that the surface of interest is more parallel to the focal plane, reducing the axial range you need in focus.
  • Choose fields of view strategically to emphasize planar regions if your analysis demands a single-shot image.

7) Balance exposure, noise, and sampling

If you choose to oversample (very small effective pixels), even small defocus will be visible and you may be tempted to declare the DOF too thin. Conversely, coarse sampling may hide defocus at the expense of resolution. Balance pixel size, exposure, and magnification so that your sampling captures the desired optical bandwidth without drawing attention to noise or tiny defocus that is irrelevant to your task.

Common Misconceptions About Depth of Field in Microscopy

Depth of field is frequently misunderstood. Clearing up a few myths can prevent misconfiguration and frustration.

  • Myth: Increasing magnification always reduces DOF. Reality: DOF primarily depends on NA and wavelength, not magnification alone. High magnification often comes with higher NA, which reduces DOF, but magnification by itself is not the cause.
  • Myth: Stopping down the condenser is a free way to get more DOF. Reality: A smaller condenser aperture can increase perceived DOF slightly by reducing high-angle components, but it also reduces resolution and may introduce diffraction softening.
  • Myth: A thicker DOF means a better image. Reality: Thick DOF helps for tall 3D features, but it also allows more out-of-plane structures to contribute blur in dense samples. For thin layers or confocal-like selectivity, a thinner DOF (via higher NA or optical sectioning) can be preferable.
  • Myth: Pixel size does not affect DOF. Reality: Optical DOF does not depend on pixel size, but perceived DOF does, because sampling and display scale define what blur diameter is acceptable.
  • Myth: Depth of focus and depth of field are the same. Reality: DOF is in object space; depth of focus is in image space. They scale differently with optical parameters and serve different alignment and image-quality considerations. See Depth of Field vs Depth of Focus: Object Space and Image Space.

Order-of-Magnitude Calculations and Intuition Builders

Exact formulas for DOF and depth of focus depend on criteria and imaging mode, but simple proportionalities provide useful intuition. This section summarizes relationships and walks through a few illustrative scenarios without asserting hard specifications.

Core proportionalities

In diffraction-limited conditions with minimal aberrations:

Photons diffraction
Numerical simulation of 40 energy flow lines (photon trajectories) of monochromatic light of wavelength λ = 0.5 µm at the exit of a circular aperture of radius R = λ*10 = 5 µm. Artist: GONDRAN Alexandre

  • Lateral resolution ∝ λ/NA (smaller is better).
  • Axial resolution ∝ λ/NA2 (smaller is better).
  • Object-side DOF roughly scales with λ/NA2 (larger means more of the specimen appears in focus; constants vary by criterion and modality).
  • Image-side depth of focus increases with the square of the effective f-number at the sensor, which in microscopy grows with magnification and decreases with NA.
  • Specimen-side sampling interval (p/M) should be ~λ/(4·NA) or finer to capture diffraction-limited detail in incoherent imaging contexts.

Takeaway: NA drives both resolution and DOF. Raise NA to resolve finer planes; lower NA to encompass more axial extent in one shot.

Illustrative scenarios

These examples use representative values to build intuition. They are not guarantees of performance—aberrations, coherence, and criteria change the constants—but they reflect the correct physical scaling.

  1. Moderate NA objective on a textured surface
    Suppose you examine a rough microfabricated surface using a 20×/0.40 objective with green light. Lateral resolution scales like λ/NA, and object-side DOF scales like λ/NA2. Relative to a 10×/0.25, the 0.40 NA will resolve finer detail but exhibit a noticeably thinner DOF. If your goal is to visualize the overall topography in a single image, you might switch to the lower NA or adopt focus stacking. If the goal is to inspect fine scratches or microfeatures at a single plane, the 0.40 NA is advantageous.

  2. High NA immersion for thin layers
    Imaging thin layers on a coverslipped specimen with a 60×/1.40 oil objective greatly improves axial sectioning due to NA2 dependence. You will notice a very thin focus slice; small z-drifts will cause features to move out of focus quickly. To preserve sharpness, stabilize the stage and maintain thermal equilibrium, or consider modalities with inherent sectioning if you need to isolate a layer. For extended DOF in this context, there is no free lunch; you would trade resolution (by lowering NA) or adopt stacking.

  3. Camera pairing and sampling
    If your camera has 6.5 μm pixels and you use a 40× objective, the effective specimen-side sampling is ~0.1625 μm per pixel. For green light and moderate NA (e.g., 0.65), this is generally within a good sampling range to capture fine detail. If you instead used a 10× objective (0.25 NA) without changing the camera, your specimen-side sampling becomes ~0.65 μm per pixel. At this coarser sampling, small defocus may be less noticeable at typical display scales, giving a perception of increased DOF even though the optical DOF change follows NA, not pixel size.

  4. Refractive index mismatch
    Observing an aqueous sample with an oil-immersion objective not designed for that condition introduces spherical aberration that broadens the axial PSF. The image may seem to have a larger DOF in the sense that features remain somewhat “in focus” over a wider z-range, but this comes from degraded resolution and contrast. The fix is to choose an appropriate immersion medium (e.g., water immersion for thick aqueous samples) or to keep the focus near the cover glass where the objective is corrected to perform.

Simple pseudocode for planning

The snippet below captures a high-level decision process for balancing NA, sampling, and DOF. It is not a simulator; it encodes the trends and checks you would run through mentally when configuring a system.

// Inputs: desired_feature_size, specimen_thickness, wavelength, camera_pixel, objective_options[]
// Output: a short list of viable configurations

function planMicroscopeConfig(desired_feature_size, specimen_thickness, wavelength, camera_pixel, objective_options) {
  let viable = []
  for (let obj of objective_options) {
    // Effective specimen-side sampling
    let p_eff = camera_pixel / obj.magnification

    // Sampling target ~ lambda/(4*NA)
    let target_sampling = wavelength / (4 * obj.NA)
    let sampling_ok = p_eff <= target_sampling

    // Lateral resolution scale ~ lambda/NA
    let lateral_scale = wavelength / obj.NA
    let resolves_feature = lateral_scale <= desired_feature_size

    // DOF scale ~ lambda/NA^2
    let dof_scale = wavelength / (obj.NA * obj.NA)
    let dof_ok = dof_scale >= (specimen_thickness * 0.25) // heuristic fraction in focus

    // Keep configs that resolve features and sample adequately; flag DOF for stacking
    if (sampling_ok && resolves_feature) {
      viable.push({ objective: obj, dof_ok: dof_ok, stacking_recommended: !dof_ok })
    }
  }
  return viable
}

This simple logic encodes the most important trends you can cross-check with the discussions in How Numerical Aperture and Wavelength Govern Resolution and Depth and Camera Sampling, Pixel Size, and Focus Tolerance.

Frequently Asked Questions

Does using a smaller field of view change depth of field?

Changing the field of view (FOV) by cropping or by using a camera with a smaller sensor does not, by itself, alter the object-side depth of field. DOF primarily follows NA and wavelength. However, if the change in FOV comes with a change in effective sampling (e.g., different pixel size or intermediate magnification), the perceived DOF can shift because the acceptable blur diameter in pixels changes. The optical DOF remains governed by the PSF, which depends on NA, wavelength, and aberrations.

Is there a way to increase depth of field without sacrificing resolution?

There is no single optical adjustment that increases DOF while fully preserving diffraction-limited resolution at the same NA. The trade-off is fundamental: higher NA improves resolution but reduces DOF. To present more of a 3D object in focus without lowering NA, you can acquire a z-stack and combine slices (focus stacking) or use 3D imaging modalities and post-processing to visualize thickness. These approaches produce an image with extended apparent DOF while retaining the high-NA resolution within each plane.

Final Thoughts on Balancing Depth of Field and Resolution

Depth of field in microscopy sits at the intersection of physics and purpose. The physics is clear: NA and wavelength set the diffraction-limited envelope, aberrations deform it, and sampling decides how it is recorded. The purpose is up to you: highlighting a thin layer, surveying a rough surface, or documenting a 3D object in a single composite image. Because the object-side DOF scales approximately with λ/NA2, the core decision—how much NA to deploy—drives your outcome.

When you need a thinner slice, increase NA (and consider optical sectioning methods). When you need more of a structure to look sharp at once, reduce NA modestly, reorient the sample, or acquire and stack focal planes. Always pair your camera and objective so that sampling is appropriate for the optical bandwidth. And keep the system well corrected: use the intended immersion medium, match cover glass thickness, and adjust correction collars when available to prevent aberration-induced softening.

If you found this deep dive helpful, explore our related articles on resolution, numerical aperture, and sampling theory, and consider subscribing to the newsletter to receive future microscopy fundamentals, technique breakdowns, and practical configuration guides directly in your inbox.

On Key

Related Posts

Stay In Touch

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