Calculate DoF from focal length, aperture & distance
Understanding and controlling depth of field (DoF) is one of the most powerful skills a photographer can develop. Whether you want razor-sharp landscapes or creamy blurred backgrounds in portraits, knowing your DoF before you shoot saves time and elevates your results. Our free Depth of Field Calculator gives you precise values in seconds — no complex math required.
Depth of field refers to the range of distance in a photo that appears acceptably sharp. It extends both in front of and behind the exact point of focus. Anything outside this zone gradually blurs, creating the aesthetic known as bokeh. DoF is not a fixed property of a lens — it changes dynamically based on your settings and subject distance.
Three primary variables determine your depth of field: focal length, aperture (f-number), and focus distance. A fourth factor — the circle of confusion — depends on your camera sensor size and affects how the calculation is performed.
Using our calculator is straightforward. Enter the following values:
The calculator instantly returns the near limit of sharpness, the far limit of sharpness, the total depth of field, and the valuable hyperfocal distance for your settings.
Wide-angle lenses (e.g., 24 mm) produce a large depth of field, keeping foreground and background sharp simultaneously. Telephoto lenses (e.g., 200 mm) compress depth and create a shallow depth of field, which isolates subjects beautifully against blurred backgrounds. This is why portrait photographers favor 85 mm or 135 mm lenses.
A wide aperture (low f-number like f/1.8) dramatically reduces depth of field, producing the smooth background blur prized in portrait photography. A narrow aperture (high f-number like f/11 or f/16) extends the sharp zone across the entire scene. Landscape photographers typically shoot between f/8 and f/11 for maximum sharpness throughout.
The closer your subject is to the camera, the shallower the depth of field becomes. In macro photography, DoF can shrink to just a few millimeters, making even tiny focusing adjustments critical. At greater distances, depth of field expands — eventually reaching the hyperfocal distance, beyond which everything appears sharp to infinity.
Shooting a portrait with an 85 mm lens at f/1.8, focused at 1.5 meters: the calculator reveals a total DoF of roughly 4 cm. Your subject's eyes are sharp while the background melts away completely — the signature look of professional portrait photography.
Using a 24 mm lens at f/8, focused at 3 meters: the calculator shows a DoF extending from about 1.5 meters to infinity. By understanding this, you can ensure that both a foreground rock and distant mountains are rendered sharply in a single frame.
With a 100 mm macro lens at f/5.6, focused at 28 cm: the depth of field is just a few millimeters. Knowing this precise range helps you decide whether to stack exposures or reposition your camera for the sharpest possible result.
The hyperfocal distance is a game-changer for street and reportage photographers. When you focus at this distance, you achieve the maximum possible depth of field for your current settings — everything from half the hyperfocal distance to infinity will be sharp. Memorizing the hyperfocal distance for your most-used lens-aperture combinations speeds up shooting dramatically.
For portraits, a shallow depth of field between 5 cm and 30 cm is typically ideal. This keeps the subject's eyes and face sharp while blurring distracting backgrounds. Use a wide aperture (f/1.4–f/2.8) combined with a short-to-medium telephoto lens for the best results.
Larger sensors require longer focal lengths to achieve the same field of view, which inherently reduces depth of field. A full-frame camera will have a shallower DoF than a crop-sensor camera at equivalent settings. The circle of confusion value differs by sensor size, which the calculator accounts for automatically.
The calculator provides theoretically accurate values based on optical formulas and the circle of confusion standard. Minor differences from real photos can occur due to in-camera sharpening, lens aberrations, output viewing size, and the subjective nature of perceived sharpness.
Absolutely. Depth of field physics applies equally to cinema and video cameras. Enter your lens focal length, aperture (T-stop or f-stop), and sensor size (Super 35, Full Frame, etc.) to get precise DoF values for your video setup.
Near DoF is the distance from the camera to the nearest sharp point, while far DoF is the distance to the farthest sharp point. The total DoF is the sum of both. Often, the far DoF extends further than the near DoF — the sharp zone is not evenly distributed around the focus point.