Calculate DoF from focal length, aperture & distance
This calculator works out the depth of field for any camera setup based on focal length, aperture, and focusing distance. It uses the circle of confusion for your chosen sensor or film format as the key variable. Instantly see how much of your scene will appear sharp before you even pick up your camera.
Depth of field is calculated from four inputs: focal length, aperture, focus distance and the circle of confusion for your sensor size. From these you get a near and a far focus limit, and the distance between them is the depth of field.
The near and far limits come from the hyperfocal relationship: the hyperfocal distance equals the focal length squared divided by the product of the f-number and the circle of confusion, plus the focal length. Each limit is then found by combining that value with the focus distance, and the depth of field is the far limit minus the near limit.
Any depth of field calculator works, including this web-based one — you enter sensor format, focal length, f-number and focus distance. Mobile apps such as PhotoPills, DOF Table or the calculators built into Photographer's Companion do the same job offline.
For a camera, take the sensor dimension, divide it by twice the focal length, apply the arctangent and double the result — that gives the angle of view in degrees. Use the sensor width for horizontal FOV, the height for vertical and the diagonal for diagonal FOV.
FOV = 2 × arctan(sensor dimension ÷ (2 × focal length)). Short focal lengths give wide angles, long focal lengths narrow ones, and the same lens gives a narrower FOV on a smaller sensor.
That depends on the subject: wide angles suit landscapes, interiors and architecture, while narrow angles suit portraits, wildlife and sports where you want compression and separation. Pick the focal length that frames your subject from the distance you can actually shoot from.
A realistic field of view is one that roughly matches how a scene looks to the eye, which on a camera means a normal lens whose focal length is close to the sensor diagonal. Wider angles stretch foreground objects, longer ones flatten depth.
It means the visible area of the scene spans that many degrees, usually measured horizontally. Higher values show more of the surroundings but make objects appear smaller and increase distortion at the edges.
A normal field of view comes from a lens whose focal length is about equal to the sensor or film diagonal, giving perspective close to human vision. On full frame that is the classic standard lens, and equivalent focal lengths are shorter on smaller sensors.
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.