Free Online Depth of Field Calculator
- Nathaniel Stephan
- December 29, 2025
Table of Contents
Depth of Field Calculator
This online Depth of Field Calculator will help you find the perfect settings.
Getting your focus exactly right can make or break a shot. Whether you want a blurry “bokeh” background for a portrait or a sharp, clear mountain range, this calculator will help you find the perfect settings.
How to use the DoF calculator
To use a Depth of Field calculator, you typically need to input four variables:
- Camera Sensor Size: Select your camera model or sensor type (Full Frame, APS-C, etc.) to determine the Circle of Confusion. Because smaller sensors “crop” the image, they change how much of the photo stays sharp.
- Focal Length: Enter the actual focal length of the lens (e.g., 50mm). Longer lenses (telephoto) create a thinner slice of focus, while wider lenses make more of the scene look sharp.
- Aperture: This is how wide your lens is open. A small number like ( f/1.8 ) creates a very shallow depth of field, while a large number like ( f/16 ) keeps almost everything in focus.
- Subject Distance: Enter how far away the subject is from the sensor. The closer you stand to your subject, the blurrier the background will become.
- Units: You can choose between Imperial (feet and inches) or Metric (meters and centimeters).
Understanding Depth of Field
Depth of Field (DoF) is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in an image. While a lens can only focus precisely at one specific distance, the transition from sharp to blurry is gradual, creating a zone where the focus still appears crisp to the human eye.
What is Circle of Confusion?
The Circle of Confusion (CoC) is an optical spot caused by a cone of light rays from a lens not coming to a perfect focus when imaging a point source.
In practical terms, it is the maximum diameter of a blur spot that is still perceived by the human eye as a single point rather than a blur.
If a point of light creates a circle on the sensor smaller than the CoC, it appears sharp; if it is larger, it appears out of focus.
How to Adjust Depth of Field
You can control the depth of field by manipulating three primary factors:
- Aperture (f-stop): A wider aperture (lower f-number like f/1.8) creates a shallow DoF, while a narrower aperture (higher f-number like f/16) creates a deep DoF.
- Focal Length: Longer focal lengths (telephoto lenses) produce a shallower perceived DoF, while shorter focal lengths (wide-angle lenses) produce a deeper DoF.
- Subject Distance: Moving closer to your subject narrows the DoF, while moving further away increases it.
How to Calculate the Depth of Field
To calculate the DoF manually, you first need to find the Near Point (( D_n )) and the Far Point (( D_f )).
The formula for the Near Point is: $$ D_n = \frac{s(H - f)}{H + s - 2f} $$
The formula for the Far Point is: $$ D_f = \frac{s(H - f)}{H - s} $$
Where:
- ( s ) = Subject distance
- ( f ) = Focal length
- ( H ) = Hyperfocal distance
The total Depth of Field is ( D_f - D_n ).
Alternate Depth of Field Formula
For most photographic situations where the subject distance is significantly larger than the focal length, a simplified approximation can be used:
$$ \text{DoF} \approx \frac{2Ns^2c}{f^2} $$
Where:
- ( N ) = f-number (aperture)
- ( s ) = Subject distance
- ( c ) = Circle of Confusion
- ( f ) = Focal length
Want to Learn More?
If you are interested in mastering photography optics, you should explore topics such as Hyperfocal Distance. That is the focus distance that provides the maximum depth of field for a given aperture.
Bokeh refers to the aesthetic quality of the out-of-focus areas in an image.
FAQs
Does sensor size affect DoF? Yes.
Larger sensors typically allow for a shallower depth of field because you often use longer focal lengths or stand closer to the subject to achieve the same framing as a smaller sensor.
What is “Deep Focus”? Deep focus is a photographic and cinematic technique where the foreground, middle ground, and background are all in focus simultaneously. That is usually done with small apertures and wide-angle lenses.
Is DoF the same in front of and behind the subject? No.
Usually, about one-third of the DoF is in front of the focus point, and two-thirds are behind it.
As you move toward the hyperfocal distance, the background DoF increases much faster than the foreground.