Depth of Field Calculator
Free Depth of Field Calculator for creative & design. Free online tool with accurate results using verified formulas.
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer
Depth of Field Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: H = fยฒ/(NรCoC) + f | DoF = Far - Near
Worked example โ DoF = 9cm | Near: 2.46m | Far: 2.55m | Very shallow โ perfect for isolating the subject
Formula
H = fยฒ/(NรCoC) + f | DoF = Far - Near
Hyperfocal distance H equals the focal length squared divided by the product of f-number and circle of confusion, plus the focal length. Near and far limits are calculated from H and subject distance. Depth of field is the range between the near and far sharp limits.
Worked Examples
Example 1: Portrait Photography Setup
Problem:Calculate DoF for an 85mm lens at f/1.8, focused at 2.5 meters on a full-frame camera.
Solution:f = 85mm, N = 1.8, d = 2500mm, CoC = 0.029mm H = (85ยฒ)/(1.8 ร 0.029) + 85 = 138,423mm โ 138.4m Near = 2500 ร (138423-85)/(138423+2500-170) = 2455mm โ 2.46m Far = 2500 ร (138423-85)/(138423-2500) = 2547mm โ 2.55m DoF = 2.55 - 2.46 = 0.09m = 9cm
Result:DoF = 9cm | Near: 2.46m | Far: 2.55m | Very shallow โ perfect for isolating the subject
Example 2: Landscape Hyperfocal Technique
Problem:Find the hyperfocal distance for a 24mm lens at f/11 on full-frame, then calculate the DoF when focused there.
Solution:f = 24mm, N = 11, CoC = 0.029mm H = (24ยฒ)/(11 ร 0.029) + 24 = 1829mm โ 1.83m Focusing at H = 1.83m: Near = 1829 ร (1829-24)/(1829+1829-48) = 915mm โ 0.91m Far = infinity (distance = H) DoF = infinity
Result:Hyperfocal = 1.83m | Near limit: 0.91m | Far limit: infinity โ everything sharp from ~1m to horizon
Frequently Asked Questions
What is depth of field in photography?
Depth of field (DoF) is the distance range in a photograph where objects appear acceptably sharp. It extends from a near limit in front of the focus point to a far limit behind it. A shallow depth of field means only a thin slice of the scene is sharp, which is popular for portraits where the background is blurred (bokeh). A deep depth of field keeps most of the scene sharp, from foreground to background, which is preferred for landscape photography. Three main factors control DoF: aperture (f-stop), focal length, and subject distance. Understanding depth of field helps photographers make creative decisions about which parts of their image are in focus.
How does aperture affect depth of field?
Aperture has the most direct and intuitive effect on depth of field. A wider aperture (smaller f-number like f/1.4 or f/2) produces a shallower depth of field, meaning less of the scene is in focus. A narrower aperture (larger f-number like f/11 or f/16) produces a deeper depth of field. This happens because a wider aperture allows light rays to enter the lens at steeper angles, causing out-of-focus areas to blur more. However, stopping down too far (beyond f/16 on most lenses) introduces diffraction, which actually reduces overall sharpness. Portrait photographers typically use f/1.4 to f/2.8, while landscape photographers often use f/8 to f/11 for the optimal balance of depth and sharpness.
What is the circle of confusion (CoC)?
The circle of confusion is the largest blur spot that still appears as a sharp point to the human eye in a print viewed at a normal distance. When a point of light is not perfectly in focus, it projects onto the sensor as a small disc rather than a point. If this disc is smaller than the CoC threshold, it appears sharp. The CoC depends on sensor size, print size, and viewing distance. Standard CoC values are 0.029mm for full-frame sensors, 0.019mm for APS-C, and 0.015mm for Micro Four Thirds. These assume an 8x10 inch print viewed at 25cm. A smaller CoC gives a stricter definition of sharpness and results in a shallower calculated depth of field.
What is hyperfocal distance and why is it useful?
The hyperfocal distance is the focus distance at which the depth of field extends from half that distance all the way to infinity. When you focus at the hyperfocal distance, you maximize the depth of field for a given aperture and focal length. This technique is extremely useful for landscape photography where you want everything from a nearby foreground to distant mountains in sharp focus. For example, with a 24mm lens at f/11 on a full-frame camera, the hyperfocal distance is about 1.7 meters. Focusing at 1.7m means everything from 0.85m to infinity will be acceptably sharp. Many landscape photographers memorize or carry charts of hyperfocal distances for their common lens and aperture combinations.
How does sensor size affect depth of field?
Sensor size indirectly affects depth of field in two ways. First, a smaller sensor has a smaller circle of confusion threshold, which means the standard of sharpness is stricter, resulting in a shallower calculated DoF for the same lens settings. Second, and more importantly, to get the same field of view as a larger sensor, you must use a shorter focal length, which increases DoF, or stand farther back. In practice, full-frame sensors produce shallower depth of field than APS-C or Micro Four Thirds at the same field of view and aperture. This is why smartphone cameras with tiny sensors struggle to produce background blur naturally and often use computational photography to simulate bokeh effects.
References
Background & Theory
History
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer ยท Editorial policy
Related Calculators
๐งฎField of View Calculator (camera)
Calculate field of view (camera) with interactive inputs and clear steps.
๐งฎAudio File Size Calculator
Calculate audio file size from duration, sample rate, bit depth, and number of channels.
๐งฎCrop Factor Calculator
Calculate equivalent focal length and field of view from sensor crop factor.
๐งฎHyperfocal Distance Calculator
Calculate hyperfocal distance with interactive inputs and clear steps.
๐งฎShutter Speed to Freeze Motion Calculator
Calculate shutter speed to stop motion with interactive inputs and clear steps.
๐งฎExposure Value (ev) Calculator
Calculate exposure value (ev) with interactive inputs and clear steps.
๐งฎNeutral Density Filter Stop Calculator
Calculate neutral density filter stop with interactive inputs and clear steps.
๐งฎPanorama Overlap and Frames Calculator
Calculate panorama overlap and frames with interactive inputs and clear steps.