Compute sharp focus zones, hyperfocal distance, bokeh intensity, and more for any camera and lens
Depth of field (DOF) is one of the most powerful creative tools in photography. It describes the range of distances from the camera within which objects appear acceptably sharp in the final image. By mastering depth of field, you gain precise control over what is in focus and what is beautifully blurred — letting you isolate a subject against a dreamy bokeh background for portraits, or keep an entire landscape pin-sharp from foreground to horizon. Our Depth of Field Calculator goes far beyond a simple near-limit and far-limit readout. It provides a comprehensive set of optical outputs that help both beginners and seasoned photographers plan shots with scientific precision. Enter your camera sensor size, focal length, aperture (f-stop), and subject distance, and the calculator instantly returns: near focus limit, far focus limit, total DOF, front DOF, back DOF with percentage distribution, hyperfocal distance, circle of confusion (CoC), 35mm equivalent focal length and aperture, horizontal/vertical/diagonal angle of view, field of view at the subject distance, background bokeh blur disc size, and a diffraction limit warning when your chosen f-stop degrades resolution. The calculator supports all major camera sensor formats — from large Medium Format 645 all the way down to the tiny 1/2.3-inch sensors in compact cameras and smartphones — with accurate sensor diagonal dimensions pre-loaded for each. You can also enter custom sensor dimensions if you shoot with an unusual format. The circle of confusion, the key parameter that defines 'acceptable sharpness', is computed automatically from sensor diagonal using four industry methods: the Default (d/1500), Zeiss (d/1730), Kodak (d/1720), and Archaic (d/1000) divisors, or you can enter a custom CoC value for pixel-peeping accuracy on high-megapixel sensors. Choosing the right depth of field for a scene requires understanding the interplay between four variables. Aperture is the most familiar — opening up to f/1.4 or f/1.8 creates that narrow, selective focus beloved in portrait photography, while stopping down to f/11 or f/16 maximises sharpness throughout a landscape. Focal length also plays a major role: a 200mm telephoto at f/5.6 produces far shallower depth of field than a 24mm wide-angle at the same aperture and distance, because the telephoto magnifies the scene and compresses apparent depth. Subject distance is the third lever — the closer you focus, the shallower the DOF, which is why macro photography at distances under 30 cm can produce depth of field measured in millimetres. Finally, sensor size matters: a full-frame camera has a larger sensor diagonal than a Micro 4/3 camera, resulting in a larger circle of confusion and shallower DOF when everything else is equal. The hyperfocal distance is a particularly important concept for landscape and street photographers. It is the focus distance at which everything from half that distance to infinity appears acceptably sharp. By focusing at the hyperfocal distance, you maximise the depth of field for a given focal length and aperture combination. Our calculator displays the hyperfocal distance prominently and provides a full hyperfocal distance table across seven common focal lengths and seven aperture stops for your current sensor, making it easy to commit key distances to memory before heading out to shoot. Bokeh — the aesthetic quality of out-of-focus blur — is quantified in our calculator as the background blur disc size in millimetres at a user-specified background distance. A larger blur disc relative to the circle of confusion produces creamier, more visible bokeh. The bokeh intensity bar gives an intuitive at-a-glance sense of how strong the background separation will be. Diffraction is often overlooked, but it limits how much you can stop down before resolution actually decreases. At very small apertures, light diffracts around the aperture blades and creates an Airy disc that spreads light across multiple pixels. When the Airy disc diameter exceeds the circle of confusion, diffraction becomes the resolution-limiting factor and further stopping down hurts sharpness. Our calculator flags this with a clear warning so you can choose the optimal aperture for your sensor. The side-by-side lens comparison panel lets you compare up to five different lens and sensor combinations simultaneously — ideal for choosing between a 50mm f/1.8 and an 85mm f/1.4 for a portrait session, or evaluating whether it is worth carrying a telephoto prime versus a zoom. Results update instantly and can be exported to CSV for offline reference or shared via a URL that encodes all your settings.
Understanding Depth of Field
What Is Depth of Field?
Depth of field (DOF) is the distance range in a scene that appears acceptably sharp in a photograph. It is bounded by the near focus limit — the closest distance that is acceptably sharp — and the far focus limit — the farthest distance that is still sharp. Objects outside these limits appear progressively blurred due to 'circles of confusion' growing larger than the threshold set by the circle of confusion (CoC) value. DOF is not a hard boundary; sharpness falls off gradually on either side of the focus plane. The CoC threshold, derived from sensor size and viewing conditions, defines what 'acceptable sharpness' means for a given sensor and print size. A Full Frame sensor with a CoC of 0.029mm requires more precision than a Micro 4/3 sensor with CoC 0.014mm. Understanding DOF lets photographers make deliberate choices about subject isolation and background separation versus overall scene sharpness.
How Is DOF Calculated?
The calculation starts with the hyperfocal distance H = (f² / (N × c)) + f, where f is focal length in mm, N is the f-number, and c is the circle of confusion in mm. From H and the subject distance s, the near limit is Dn = (H × s) / (H + s − f) and the far limit is Df = (H × s) / (H − s + f). When s ≥ H, the far limit extends to infinity — every object beyond H/2 is acceptably sharp. Total DOF = Df − Dn. Front DOF (zone in front of subject) = s − Dn; Back DOF = Df − s. The circle of confusion for each sensor is computed as diagonal / divisor, with the default divisor of 1500. The Zeiss standard uses 1730 (stricter), Kodak uses 1720, and the archaic standard uses 1000. Background bokeh blur disc size is calculated as |s − B| × (f / (N × B)) × (f / (s − f)), where B is the background distance. Diffraction Airy disc = 2.44 × 0.00055mm × N.
Why Does DOF Matter?
Depth of field is a fundamental creative and technical parameter in photography. For portraiture, a shallow DOF — achieved with a wide aperture like f/1.4–f/2.8 and a medium telephoto — separates the subject from a distracting background, drawing the viewer's attention to faces and expressions. For landscape photography, a deep DOF with f/8–f/16 and focus at the hyperfocal distance ensures everything from a nearby rock to a distant mountain is sharp. In macro photography, the extreme closeness of the subject produces a razor-thin depth of field — sometimes a few millimetres — requiring careful focus stacking for complete subject coverage. For street and documentary photography, pre-focusing at the hyperfocal distance allows candid shooting without refocusing. Understanding DOF helps photographers anticipate results before pressing the shutter, avoiding wasted shots and missed moments.
Limitations and Caveats
The DOF calculations here are based on the geometric optics model and assume a thin lens in air, which is a good approximation for most photographic situations but ignores lens aberrations, field curvature, and focus breathing. The circle of confusion threshold used to define 'acceptable sharpness' is a convention that assumes standard viewing conditions (8×10 inch print viewed at 25 cm by a person with 20/20 vision). Pixel-peeping on high-resolution monitors effectively requires a smaller CoC — divide the sensor diagonal by a higher divisor or enter a custom value. Diffraction calculations use 550nm as the effective wavelength of visible light; actual diffraction depends on the spectral response of the sensor. The bokeh blur calculation is a simplified geometric approximation and does not account for lens aberrations, aperture blade shape, or spherical aberration, all of which affect the aesthetic quality of out-of-focus rendering. Real-world results may differ from calculated values due to focus accuracy, camera movement, and subject movement during exposure.
How to Use the Depth of Field Calculator
Select Your Camera Sensor
Choose your sensor format from the dropdown — Full Frame, APS-C, Micro 4/3, 1-inch, or one of the other presets. The calculator automatically sets the correct circle of confusion (CoC) for your sensor size, which determines what 'acceptably sharp' means for your camera. If you have a non-standard sensor, select Custom and enter the diagonal, width, and height in millimetres.
Enter Focal Length, Aperture, and Distance
Enter your lens's actual focal length in mm (not the 35mm equivalent). Select your aperture from the dropdown — f/1.4 to f/64 in standard photographic increments. Enter your subject distance in either metres or feet using the unit toggle. Use the portrait presets (Headshot, Head & Shoulders, Half Body, Full Body) or scenario buttons (Portrait, Landscape, Macro, Street) for quick starting points.
Read the Results
The calculator instantly shows near and far focus limits, total depth of field, front and back DOF with percentage distribution, and hyperfocal distance — all displayed in both metric and imperial simultaneously. The DOF zone diagram gives a visual representation of your sharp zone relative to subject distance. Check the lens info section for angle of view and frame dimensions at your subject distance.
Explore Advanced Features and Export
Toggle Advanced Settings to change the circle of confusion method or enter a custom CoC for pixel-peeping precision. Use the Lens Comparison panel to compare two or more lens and sensor combinations side by side. Share your settings via URL, copy a text summary to clipboard, export results to CSV, or print a clean results sheet. Check the DOF vs Aperture chart to see how changing your f-stop affects sharpness range.
Frequently Asked Questions
What is the circle of confusion and how does it affect depth of field?
The circle of confusion (CoC) is the maximum acceptable diameter of a blur disc on the sensor for a point of light to appear sharp to the human eye in the final image. It is derived from the sensor diagonal divided by a divisor (typically 1500 for photographic use). A larger sensor has a larger CoC, which means more blur is 'acceptable', resulting in shallower apparent depth of field compared to a smaller sensor at the same field of view and aperture. The CoC directly scales all DOF calculations — doubling the CoC doubles the depth of field. Standard values: Full Frame 0.029mm, APS-C 0.019mm, Micro 4/3 0.014mm, 1-inch 0.011mm.
What is hyperfocal distance and how do I use it?
The hyperfocal distance is the closest focusing distance at which objects at infinity are still acceptably sharp. When you focus your lens at the hyperfocal distance, everything from half the hyperfocal distance to infinity is sharp — this is the maximum depth of field you can achieve for a given focal length and aperture. For example, a 24mm lens at f/8 on a full-frame sensor has a hyperfocal distance of about 8 metres. Focusing at 8 metres gives you sharpness from 4 metres to infinity. Landscape and street photographers use hyperfocal focusing to capture maximum sharpness without needing to adjust focus for each shot.
Why does depth of field extend further behind the focus point than in front?
This asymmetry is a fundamental consequence of the mathematics of the DOF equations. The near limit formula (H × s) / (H + s − f) and the far limit formula (H × s) / (H − s + f) are not symmetric around the focus point s. In practice, the back DOF is always equal to or greater than the front DOF — at moderate distances the ratio is roughly 2:1 (one-third front, two-thirds back). As the focus distance approaches the hyperfocal distance, the back DOF grows rapidly toward infinity while the front DOF grows much more slowly. Very close to the lens (macro distances), the asymmetry decreases and DOF becomes nearly equal front and back.
How does focal length affect depth of field?
A longer focal length produces shallower depth of field at the same aperture and subject distance. A 200mm telephoto at f/5.6 focused at 5 metres has much less DOF than a 24mm wide-angle at the same aperture and distance. However, to frame the same subject the same size, you need to be much closer with the wide-angle, which by itself reduces DOF. When comparing lenses that frame the same subject the same size (same field of view), the DOF is primarily determined by the entrance pupil size (focal length / f-number) and the magnification. In practice, longer lenses at the same framing do produce slightly shallower DOF on the same sensor.
What is diffraction and when does it become a problem?
Diffraction is a wave phenomenon where light bends around the edges of the aperture blades, spreading the light from a point source into an Airy disc pattern. As you stop down to smaller apertures (larger f-numbers), the Airy disc grows larger. When the Airy disc diameter exceeds the circle of confusion, diffraction limits resolution more than the lens optics. For a full-frame sensor (CoC 0.029mm), diffraction becomes significant around f/16–f/22. For a smaller sensor with a smaller CoC, diffraction kicks in at a wider aperture. Our calculator warns you when your chosen f-stop exceeds the diffraction limit, suggesting you use a slightly wider aperture to preserve resolution.
How is the 35mm equivalent focal length calculated and why does it matter?
The 35mm equivalent focal length is your actual focal length multiplied by the crop factor of your sensor (43.27mm / sensor diagonal). For a 50mm lens on an APS-C sensor with a 1.5× crop factor, the equivalent focal length is 75mm — this is the focal length you would need on a full-frame camera to get the same field of view. The equivalent aperture for matching depth of field is your actual f-number multiplied by the crop factor, so f/2.8 on APS-C gives equivalent DOF to approximately f/4.2 on full frame. This matters when comparing the creative potential of different camera systems or advising clients on equivalent setups across platforms.