Depth of field is the range of distances in a scene that an imaging system renders with acceptable sharpness when focused at a particular distance. It is a central concept in photography, cinematography, microscopy, and other forms of optical imaging. A shallow depth of field isolates a narrow region of a subject, while a large depth of field allows objects at substantially different distances to appear sharp together.
Depth of field is not a sharply bounded physical volume within which everything is perfectly focused. Instead, it depends on how rapidly defocus blur increases away from the focused surface and on how much blur is acceptable in the final image. Aperture, subject distance, image magnification, lens design, recording format, enlargement, and viewing conditions all influence the result. Geometrical optics supplies useful predictive formulas, but diffraction, optical aberrations, image processing, and visual perception determine how closely those formulas describe a practical image.
Optical origin and the distinction from depth of focus
In an idealized imaging system, light from a point on the focused object converges to a corresponding point on the image plane. Light from a point at a different distance converges either before or behind that plane. Where this converging or diverging bundle intersects the recording surface, it produces a finite blur patch rather than a point. For a circular, unobstructed aperture in a simple geometrical model, that patch is approximately circular. Its diameter grows continuously as the object moves away from the focused distance.
The thin-lens equation describes the relationship between object distance , image distance , and focal length :
For a fixed focal length, changing the object distance changes the position at which a sharp image forms. A camera focused on a nearer object generally requires a greater lens-to-image distance than one focused on a distant object. Internal-focusing lenses achieve the necessary change through movements of lens groups, so their effective focal length and pupil positions may also change during focusing.
An aperture limits the angular width of the bundles forming the image. A smaller aperture produces narrower bundles, causing their cross sections to grow more slowly with displacement from the ideal image plane. Consequently, objects over a larger range of distances can satisfy a chosen blur limit. This geometrical effect explains why stopping a lens down ordinarily increases depth of field, even though very small apertures eventually reduce fine-detail contrast through diffraction.
Depth of field concerns distances in object space. Depth of focus, by contrast, concerns the permissible displacement of the recording surface in image space while maintaining acceptable sharpness. The distinction matters in camera manufacture, sensor alignment, film-flatness control, and optical instrument assembly. A system may have a large object-space depth of field but require precise placement of its sensor, particularly when image magnification is low.
The focused locus is often described as a plane, but real lenses may exhibit field curvature: their best-focus image surface is curved rather than flat. A flat subject can therefore be sharper at the center than at the edges even when it lies perpendicular to the optical axis. Depth-of-field calculations generally assume a well-corrected lens, a flat image surface, and paraxial rays close to the optical axis. They describe defocus under those assumptions, not every possible cause of spatially varying sharpness.
Acceptable sharpness and the circle of confusion
A depth-of-field calculation requires a numerical threshold for acceptable blur, conventionally expressed as the diameter of a circle of confusion on the recording surface. In this usage, is the largest geometrical defocus spot that will be treated as acceptably sharp. It is not a universal property of a lens or sensor. Choosing a different threshold changes the calculated near and far limits without changing the captured image.
The threshold traditionally incorporates assumptions about enlargement and viewing. If an image is enlarged by a linear factor , a blur diameter on the original becomes approximately on the print or display. The apparent angular size of that blur also depends on viewing distance. A print examined closely requires a stricter recording-plane criterion than the same print viewed from farther away. Cropping has a similar consequence because the retained portion must be enlarged more to reach the same final dimensions.
For the 36 × 24 mm photographic format, mm is a common conventional circle-of-confusion value. It is useful for traditional depth-of-field scales and moderate enlargements, but it does not promise pixel-level sharpness on a modern high-resolution sensor. Smaller values, such as mm, produce narrower calculated ranges. Neither value is intrinsically correct: each represents a different standard of acceptable output.
Sensor pixel pitch provides another possible reference, but a blur diameter equal to one pixel is not a complete definition of perceived sharpness. Sampling, color-filter arrays, optical low-pass filters, demosaicing, sharpening, and subject contrast affect the recorded result. A small bright point against darkness can reveal defocus differently from low-contrast texture. Even at exact focus, the image of a point occupies a finite region because of diffraction and aberrations.
A more complete description uses the point-spread function, which specifies how the system renders a point source. Its distribution of intensity matters as well as its width. Two lenses can produce blur patches with the same outer diameter but different bright rims, central concentrations, or asymmetries. Their images may therefore appear differently sharp or distracting. The modulation transfer function characterizes the transfer of contrast at different spatial frequencies and can be evaluated as focus changes.
For these reasons, published depth-of-field limits should be understood as conditional boundaries. Sharpness does not suddenly collapse immediately beyond them, nor does every detail inside them receive equal contrast. The limits mark where a selected criterion is crossed along a continuous progression of defocus.
Aperture, subject distance, focal length, and recording format
The f-number is the ratio of focal length to entrance-pupil diameter:
The entrance pupil is the apparent image of the aperture stop as viewed through the front of the lens; it is not necessarily the physical opening itself. At a fixed focal length and focus distance, increasing the f-number reduces the entrance pupil and generally increases geometrical depth of field. Changing from to , for example, halves the pupil diameter and approximately doubles depth of field when magnification is modest and the near and far limits remain close to the focused distance.
Focus distance has a strong effect. A lens focused on a nearby subject ordinarily provides a much narrower range of acceptable object distances than the same lens focused farther away. At low magnification and far from the hyperfocal condition, depth of field increases approximately with the square of focus distance. Thus, moving from 1 m to 2 m can increase it by roughly a factor of four under otherwise comparable conditions. This approximation becomes inaccurate when the far limit approaches infinity.
Focal length must be discussed together with framing. At the same camera position, focus distance, f-number, and blur criterion, a longer focal length generally gives less depth of field. However, it also produces a larger image of the subject. If the camera is moved backward to restore the original framing, the depth of field around the focused subject can become similar, especially when magnification is low and both limits remain relatively near the subject. Background appearance can still differ substantially because perspective, angle of view, and the imaging of distant objects have changed.
Recording format introduces another conditional comparison. Suppose two cameras photograph the same scene from the same position with matching angles of view, equal f-numbers, and outputs displayed at the same size. The smaller format requires a shorter focal length and ordinarily yields greater depth of field. Its stricter permissible recording-plane blur partially offsets, but does not eliminate, the shorter lens’s effect.
For a format-size ratio , matching angle of view requires focal lengths in approximately the ratio . Matching depth of field at equal output size then requires the larger format to use an f-number approximately times greater. For example, a 50 mm lens at on a format twice the linear size of another can give approximately the same framing and depth of field as a 25 mm lens at on the smaller format. This equivalence does not mean that the exposure per unit sensor area is the same: equal scene illumination and shutter time still make exposure depend on the actual f-number and transmission.
Near and far limits and hyperfocal distance
For a thin lens with a circular aperture, depth-of-field limits can be derived from similar triangles and the lens equation. Let be focal length, the f-number, the permissible blur diameter, and the focused object distance measured from the front principal plane. Define the auxiliary distance
Under these assumptions, the near limit and far limit are
The far-limit expression applies while its denominator is positive. When the denominator reaches zero, the far limit extends to infinity; beyond that point, infinity remains within the acceptable range. All length quantities must use consistent units. Real camera distance scales commonly reference the recording plane rather than the lens principal plane, a distinction that matters most at short distances.
The hyperfocal distance is the focus distance at which infinity just meets the selected blur criterion:
When the lens is focused at , the near limit in this model is exactly , and the far limit is infinity. This is the basis of traditional landscape and zone-focusing methods. Infinity is not rendered as sharply as the focused distance; it lies precisely at the accepted blur threshold.
For example, a 50 mm lens at , using mm, has m and m. Focused at 3 m, it gives a near limit of approximately 2.34 m and a far limit of approximately 4.18 m. Focused at its hyperfocal distance, it gives a near limit of about 5.23 m. These values describe a specified tolerance, not a guarantee that a close inspection will reveal equal detail throughout those intervals.
The formulas also explain the unequal distribution of depth of field. In the 3 m example, the acceptable range extends approximately 0.66 m toward the camera and 1.18 m away from it. At close distances, the front and rear extents become more nearly equal. As focus approaches the hyperfocal distance, the rear extent grows without bound. The familiar claim that one-third of depth of field lies in front of the focus distance and two-thirds behind it is therefore only a rough description of some situations.
Hyperfocal tables are particularly sensitive to their assumed circle of confusion. A table intended for modest print enlargement can place distant fine detail outside a stricter modern criterion. Lens markings and calculators are meaningful only together with the optical model, focus-distance convention, and intended standard of sharpness.
Diffraction, aberrations, and the useful aperture range
Geometrical depth of field increases as an aperture becomes smaller, but image sharpness does not improve indefinitely. Light passing through a finite aperture diffracts, so even a perfect lens produces an extended intensity pattern rather than a geometrical point. For a uniformly illuminated circular pupil, this pattern is an Airy pattern, consisting of a bright central region and surrounding rings.
For distant subjects in air, the diameter of the central region measured between its first dark minima is approximately
where is wavelength and is the f-number. At a wavelength of 550 nm, this diameter is about at and at . These are diffraction-pattern dimensions, not hard resolution cutoffs. Fine-detail contrast decreases progressively, and the visibility of the change depends on sampling and final display conditions.
Large apertures can suffer from optical aberrations, including spherical aberration, coma, astigmatism, and chromatic aberration. Stopping down often suppresses the contribution of peripheral rays and reduces several of these defects. Many photographic lenses therefore gain contrast and uniformity when closed moderately from maximum aperture. At smaller openings, diffraction increasingly dominates. The aperture producing the best on-axis resolution need not be the aperture producing the best overall image of a three-dimensional scene.
Spherical aberration can also cause focus shift as the aperture changes. If peripheral and central rays reach best focus at different axial positions, removing peripheral rays changes the location of the strongest combined image. A camera focused with the lens fully open may therefore not retain exactly the same optimal focus after stopping down. The size and practical importance of this effect depend on lens design, focus distance, and the aperture used.
Defocus, diffraction, aberrations, motion, and sensor sampling interact rather than forming independent sharpness limits. A geometrical calculation that permits a blur circle implicitly assigns a blur budget, but real systems already have a nonzero in-focus point-spread function. Combining blur diameters by simple addition is generally unjustified; adding them in quadrature is also only an approximation for suitable blur models.
The useful aperture consequently depends on the task. Imaging a flat document chiefly demands high detail across a plane, whereas photographing a small three-dimensional object requires acceptable detail across depth. In the latter case, a smaller aperture may improve the overall depiction even while reducing the finest detail at the exact focus plane. Depth of field and maximum attainable resolution are related but distinct measures of performance.
Close-up photography and microscopy
In close-up and macro photography, image magnification provides a more useful organizing variable than subject distance alone. Let be the absolute ratio of image size to object size. At , an object 10 mm long forms a 10 mm image on the recording surface. For a roughly symmetrical lens, the total geometrical object-space depth of field near the focused plane is approximately
This expression assumes a relatively narrow depth interval and neglects diffraction. Its strong dependence on magnification explains why depth of field becomes very small in high-magnification imaging. Increasing magnification both enlarges defocus effects and changes the working geometry of the lens.
For example, at , , and mm, the formula gives a total depth of field of approximately 0.64 mm. At , the same nominal aperture and blur criterion give about 1.92 mm. A curved insect body, a mineral crystal, or a miniature mechanical assembly can extend far beyond these intervals. At such scales, depth of field is nearly evenly divided around the focused surface rather than following a one-third/two-thirds rule.
Lens asymmetry modifies the relationship. If pupil magnification is defined as exit-pupil diameter divided by entrance-pupil diameter, a commonly used paraxial approximation is
The corresponding effective image-side f-number is approximately . For a symmetrical lens at life size, , so the effective f-number is about twice the nominal value. This accounts for the increased diffraction scale and reduced image illumination associated with extension. Internal-focusing macro lenses can depart significantly from the simple symmetrical model.
In a microscope, numerical aperture is usually more informative than photographic f-number. It is defined as
where is the refractive index of the object-side medium and is the half-angle of the accepted ray cone. Increasing numerical aperture improves lateral resolution but reduces axial tolerance. A characteristic diffraction-related depth scale varies approximately as , with the numerical coefficient depending on the definition of sharpness and illumination conditions.
Microscopic depth of field is not identical to optical section thickness. Confocal detection, fluorescence excitation, coherence effects, and computational reconstruction can alter axial response. A specimen may also contain transparent structures at many depths whose images overlap. Consequently, an apparently extensive sharp range does not necessarily imply that the instrument can distinguish closely separated axial structures.
Tilted focus planes and nonstandard pupils
A conventional camera places the lens and recording surface approximately parallel, producing a focused object plane approximately parallel to both. Tilting the lens relative to the sensor changes this geometry. The Scheimpflug principle describes the idealized condition in which the object plane, lens plane, and image plane intersect along a common line. This permits a subject plane that recedes from the camera to be brought into focus without requiring all its points to fall within the depth of field of an untilted lens.
The intersection condition alone does not completely specify focus. Lens position and tilt must also satisfy the imaging relationship; the associated hinge-rule construction describes how the focused object plane rotates as focus changes. In view cameras and tilt-capable lenses, these movements allow the focus plane to be aligned with a tabletop, a ground surface, or another approximately planar subject. Tilting the lens does not make every depth sharp: it relocates the surface of best focus.
The near and far boundaries of acceptable focus also change shape. Rather than forming approximately parallel object-space planes, they can form a wedge-like region around the tilted focus plane. Its thickness generally varies with distance. This geometry explains why a small lens tilt can bring a broad expanse of ground into acceptable focus while leaving an upright object projecting above that ground blurred. The vertical object is not confined to the selected focus plane.
Tilting in the opposite sense, or deliberately misaligning the focus plane with the dominant subject surface, creates a narrow band of sharpness through the scene. This technique is often associated with images that resemble miniature models. The apparent miniaturization also depends on viewpoint, scale cues, contrast, and image processing; it is not a direct optical measurement of object size.
Pupil shape provides another way to alter defocus behavior. A polygonal iris produces polygonal blur patches when sufficiently out of focus. An annular pupil, as found in many catadioptric lenses, can produce ring-shaped highlights. Apodized pupils reduce transmission toward the pupil edge and alter the intensity distribution of defocused points. Such changes influence the visual transition into blur and may affect any depth-of-field criterion based on contrast rather than outer spot diameter.
A pinhole camera represents an extreme case of aperture-based depth extension. Its very small opening provides a broad range of distances without conventional lens focusing, but finite hole diameter causes geometrical blur and diffraction limits the benefit of further reduction. The result is extensive depth tolerance rather than perfect sharpness at every distance. More elaborate optical systems use coded pupils to distribute information in ways that become useful only after reconstruction.
Photographic and cinematic uses
Depth of field serves both descriptive and expressive purposes in photography. Extensive depth of field can present foreground, middle distance, and background as a continuous field of information. Shallow depth of field can separate a face, product, or detail from surrounding visual complexity. Neither approach is inherently more realistic: ordinary vision combines accommodation, eye movements, attention, and binocular information in ways that a fixed photographic image does not reproduce.
The history of photographic practice includes contrasting attitudes toward sharpness. Pictorialist photographers around the turn of the twentieth century often used soft rendering as part of an expressive vocabulary. Group f/64, formed in California in 1932, associated its name with the small apertures available on large-format cameras and promoted sharply defined photographic description. Ansel Adams, Edward Weston, and Imogen Cunningham were among its founding members. The group’s name expressed an aesthetic position rather than a requirement that every image be exposed at .
In cinema, deep focus allows action at different distances to remain legible within one shot. Citizen Kane (1941), directed by Orson Welles and photographed by Gregg Toland, is a prominent example of this visual strategy. Its depth effects depended on combinations of lens choice, aperture, lighting, staging, and, in some shots, optical compositing. Deep-focus appearance should therefore not automatically be interpreted as the result of a single small-aperture exposure.
Shallow-focus cinematography can direct attention through a rack focus, in which the focused distance changes during a shot. A foreground object may begin sharp while a background person is blurred, followed by a transfer of focus to the person. The focus puller must coordinate subject movement, lens behavior, and the timing of the action. With narrow depth of field, small errors in subject position or focus setting become visible, especially in high-resolution presentation.
Depth of field is distinct from bokeh, which concerns the appearance of out-of-focus image regions. Two lenses can give similar calculated near and far limits while rendering blurred highlights, texture, or transitions differently. Aperture shape, aberration correction, pupil clipping, and scene geometry all contribute. Likewise, a background can appear strongly blurred without a particularly narrow acceptable-focus range if it lies far behind the subject.
Practical controls include lens distance scales, depth-of-field markings, stopped-down preview, magnified live view, and focus peaking. Each answers a somewhat different question. Peaking highlights selected high-frequency image features and depends on contrast and processing; it is not a direct map of a geometrically defined depth-of-field volume. A focus preview also remains subject to display resolution and viewing size.
Computational extension and depth estimation
Focus stacking extends apparent depth of field by combining exposures made at different focus settings. Software identifies locally sharp regions, aligns the images, and merges selected information into a composite. This method is widely used for small objects, scientific specimens, and static scenes in which a single exposure cannot combine sufficient depth with acceptable diffraction. It changes the acquisition process rather than increasing the optical depth of field of any individual frame.
The main difficulties arise where the scene or its image changes between exposures. Focusing can alter magnification, a behavior often called focus breathing, so registration may require scaling or more complex warping. Movement of leaves, insects, fluids, or the camera can produce inconsistent structures. Occlusion boundaries are especially difficult: a blurred foreground object spreads light into regions belonging to the background, and simply selecting sharp pixels cannot always recover an uncontaminated boundary. Halos and duplicated edges can result.
Light-field imaging records some of the directional information of incoming light as well as its spatial distribution. In one implementation, a microlens array distributes angular samples across a sensor. Recombining these samples permits computational refocusing over a limited range and can support images with an extended sharp region. Such systems trade spatial resolution, angular sampling, light collection, and refocusing range; they do not preserve unlimited detail at every depth.
Wavefront coding takes a different approach. A phase element deliberately modifies the optical point-spread function so that it changes less strongly over a range of defocus. Digital reconstruction then restores contrast from the encoded image. The benefit depends on the optical design and noise level: deconvolution can amplify noise, and a scene-dependent or wavelength-dependent mismatch between the assumed and actual blur can leave artifacts.
Defocus itself can provide distance information. Depth-from-focus methods compare sharpness across a sequence of focus settings, while depth-from-defocus methods estimate distance from the size or form of blur, often using multiple images or a calibrated optical model. These methods connect depth of field to computer vision. Their ambiguity arises partly because observed blur may also come from motion, diffraction, aberrations, or texture that lacks measurable fine detail.
Synthetic shallow-focus effects reverse the objective: they estimate scene depth or segment a subject, then apply a simulated blur. Accurate rendering requires more than uniformly smoothing the background. Blur depends on the virtual aperture, focus distance, visibility, and contributions from surfaces at different depths. Fine hair, transparent objects, reflections, and partially occluded structures remain difficult because a conventional two-dimensional image does not directly record all the scene information required for physically faithful refocusing.