Depth of Field Calculator
Calculate the depth of field for any lens and camera combination. Enter focal length, aperture (f-number), subject distance, and sensor size to find the near focus limit, far focus limit, total depth of field, and hyperfocal distance.
Understanding Depth of Field in Photography
Depth of field (DoF) describes the range of distances within a scene that appear acceptably sharp in a photograph. It is one of the most fundamental concepts in photography, governing the creative and technical distinction between images where only a sliver of the scene is in focus and images where everything from foreground to horizon appears crisp. Understanding what controls depth of field enables photographers to make intentional choices rather than relying on chance.
What Is Depth of Field?
A camera lens can only focus precisely at one distance at a time — the plane of focus. Objects in front of or behind this plane project onto the sensor as circles rather than perfect points; these are called circles of confusion. When these circles are small enough relative to the sensor and the final output size, they still appear sharp to the human eye. The range of distances over which the circles stay below this perceptible threshold defines the depth of field.
The near focus limit is the closest distance that still appears sharp. The far focus limit is the farthest distance. The total depth of field is the distance between these two limits. A shallow depth of field (blurry background) is often sought in portrait and macro photography, while a deep depth of field (everything sharp) is common in landscape and architectural work.
The Four Inputs That Control DoF
Four variables determine depth of field: focal length, aperture, subject distance, and sensor size.
Focal length affects depth of field because longer lenses magnify a narrower angle of view, compressing apparent distances. A 200 mm telephoto lens at a given aperture and subject distance produces a shallower depth of field than a 35 mm wide-angle lens under the same conditions — though part of this effect is due to photographers standing closer with wide-angle lenses to achieve the same framing.
Aperture is often the most direct control over depth of field. A wide aperture (small f-number, e.g. f/1.8) allows more light through a large opening and produces a shallow depth of field with pronounced background blur. A narrow aperture (large f-number, e.g. f/16) uses a tiny opening and extends the range of sharpness dramatically.
Subject distance matters because the depth of field zone grows as the subject moves farther from the camera. Very close subjects — in macro photography — can have depth of field measured in millimetres. Distant subjects, particularly at or beyond the hyperfocal distance, may have a depth of field extending to infinity.
Sensor size determines the circle of confusion threshold. Larger sensors use a larger circle of confusion value, which means they tolerate larger out-of-focus blur spots before detail appears unacceptably soft. This is why, at equivalent framing and aperture, a full-frame camera produces shallower depth of field than an APS-C camera, which in turn produces shallower depth of field than a Micro Four Thirds sensor.
The Circle of Confusion
The circle of confusion (CoC) is the key threshold in all depth-of-field calculations. It represents the largest blur spot on the sensor that will still appear as a point when the image is viewed at a standard size and distance. The conventional values — 0.030 mm for full frame, 0.020 mm for APS-C, and 0.015 mm for Micro Four Thirds — are derived by assuming the image will be viewed as an 8×10 inch print at approximately 25 cm (10 inches) by a person with normal vision.
These values are conventions rather than absolutes. If you print larger, scrutinise images closely, or display them at high resolution on a large monitor, a smaller CoC may be appropriate for your calculations. Conversely, for images displayed only on social media at small sizes, a larger CoC threshold would be acceptable. The standard values are a practical starting point for most photography contexts.
Hyperfocal Distance
The hyperfocal distance is the closest focusing distance at which objects at infinity still appear acceptably sharp. When a lens is focused at the hyperfocal distance, the depth of field extends from half the hyperfocal distance all the way to infinity — the maximum possible depth of field for a given focal length and aperture combination.
Hyperfocal distance focusing is a traditional technique in landscape and street photography. By knowing the hyperfocal distance for a given lens and aperture setting, a photographer can set the focus manually and be confident that everything from a certain foreground distance to the horizon will appear sharp without needing to autofocus on a specific subject.
For example, a 28 mm lens set to f/8 on a full-frame camera has a hyperfocal distance of approximately 32 metres. Focused at this distance, everything from about 16 metres to infinity will appear sharp. At smaller apertures (larger f-numbers), the hyperfocal distance decreases, bringing the near sharp limit closer.
Shallow vs Deep Depth of Field
Shallow depth of field is associated with subject isolation — a sharply rendered subject against a smoothly blurred background (bokeh). This aesthetic is common in portrait photography, product photography, and wildlife imagery. It is achieved by combining a wide aperture, a longer focal length, a close subject distance, and a larger sensor.
Deep depth of field, where the entire scene appears sharp from near foreground to distant background, is common in landscape, architectural, and documentary photography. It is achieved with narrow apertures, shorter focal lengths, greater subject distances, and smaller sensors. Focus stacking — taking multiple exposures focused at different distances and blending them — extends apparent sharpness even further than physics alone would allow.
Practical Applications
Understanding depth of field calculation helps at several stages of photography. Before a shoot, knowing the expected depth of field for a planned focal length and aperture combination allows deliberate creative decisions. If the calculated depth of field is shallower than desired, a smaller aperture or greater subject distance will expand it. If the background blur is insufficient, a wider aperture or closer focusing distance will reduce depth of field.
In video production, depth of field is equally important. Cinematographers often work with consistent depth of field across shots to maintain a visual style. Using this calculator to verify settings before a scene helps ensure continuity.
The values this calculator produces are estimates based on standard circle of confusion conventions. Factors such as lens aberrations, diffraction at very small apertures, and specific output conditions can shift the perceived sharpness range. These results are a reliable starting point for making informed lens and aperture choices.
Frequently Asked Questions
What is depth of field in photography?
Depth of field is the range of distances within a scene that appear acceptably sharp in a photograph. It extends from the near focus limit (the closest sharp point) to the far focus limit (the farthest sharp point). Everything outside this range gradually blurs in proportion to how far it is from the plane of focus.
What is the hyperfocal distance?
The hyperfocal distance is the closest focusing distance at which objects at infinity still appear acceptably sharp. Focusing at the hyperfocal distance gives the maximum possible depth of field for a given focal length and aperture, with sharpness extending from half the hyperfocal distance all the way to infinity.
How does aperture affect depth of field?
A wider aperture (lower f-number, e.g. f/1.8) produces a shallower depth of field with more background blur. A narrower aperture (higher f-number, e.g. f/11 or f/16) produces a deeper depth of field with more of the scene appearing sharp. Aperture is one of the most direct controls over depth of field.
Why does sensor size affect depth of field?
Larger sensors use a larger circle of confusion threshold because their images are typically enlarged less to reach a standard viewing size. This means that larger sensors produce shallower depth of field at equivalent aperture and framing compared to smaller sensors. Full-frame sensors produce shallower DoF than APS-C, which produces shallower DoF than Micro Four Thirds.
What is the circle of confusion?
The circle of confusion is the largest blur spot on the sensor that still appears as an acceptably sharp point when the image is printed or displayed at a standard size and viewing distance. Standard values are 0.030 mm for full-frame, 0.020 mm for APS-C, and 0.015 mm for Micro Four Thirds. These are conventional thresholds, not absolute physical limits.
When does the far focus limit reach infinity?
The far focus limit reaches infinity when the subject distance equals or exceeds the hyperfocal distance. At this point the depth of field extends from the near focus limit all the way to infinity. Focusing beyond the hyperfocal distance does not increase depth of field further but does move the near limit away from the camera.
Related Calculators
Battery Life Calculator
Estimate device battery life based on capacity and usage.
Bitrate Calculator
Calculate video/audio bitrate, file size, and storage requirements for your media.
Book Royalties Calculator
Estimate author earnings from book sales. Calculate per-copy royalties, gross earnings, net income, and advance earn-out copies.