Depth of Field Calculator
An essential tool for photographers to master focus and sharpness.
2.89 m
3.12 m
0.11 m
0.12 m
29.89 m
Depth of Field Visualization
This chart shows the sharp area (in blue) relative to the point of focus (red line).
Depth of Field by Aperture
| Aperture (f-stop) | Total Depth of Field | Hyperfocal Distance |
|---|
This table shows how changing the aperture affects the total Depth of Field and hyperfocal distance, keeping other settings constant.
What is a Depth of Field Calculator?
A Depth of Field Calculator (or DoF calculator) is an essential digital tool used by photographers to determine the range of distance in a photo that appears acceptably sharp. While a camera can only focus precisely on one point, the depth of field is the zone extending in front of and behind that point that still maintains sharpness. This calculator helps you predict this zone before you even take the shot, allowing for precise creative control over your images. Whether you want a creamy, blurred background for a portrait or a tack-sharp landscape from front to back, a Depth of Field Calculator is your best friend.
This tool is invaluable for landscape, portrait, macro, and architectural photographers—anyone who needs to manage focus critically. A common misconception is that depth of field is a fixed property of a lens. In reality, it’s a dynamic variable you can manipulate. Understanding how to use a Depth of Field Calculator is a fundamental step toward mastering the technical and artistic sides of photography.
Depth of Field Formula and Mathematical Explanation
The calculation of depth of field hinges on three primary factors: the lens’s focal length, the selected aperture, and the distance to the focused subject. The process involves first calculating the hyperfocal distance, which is a key concept in photography. The hyperfocal distance is the closest point you can focus on while keeping objects at infinity acceptably sharp. When you focus at this distance, your depth of field extends from half the hyperfocal distance to infinity. The core formulas used by a professional Depth of Field Calculator are as follows:
- Hyperfocal Distance (H): The foundation of the calculation.
H ≈ (f² / (N * c)) + f - Near Acceptable Sharpness Limit (D_n): The closest point that appears sharp.
D_n = (s * (H - f)) / (H + s - 2f) - Far Acceptable Sharpness Limit (D_f): The farthest point that appears sharp.
D_f = (s * (H - f)) / (H - s)
If the subject distance (s) is greater than the hyperfocal distance (H), the far limit becomes infinite. For a comprehensive overview of your camera’s potential, you might want to check out a hyperfocal distance calculator.
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| f | Focal Length of the Lens | mm | 14mm – 600mm |
| N | Aperture f-number | N/A | f/1.2 – f/22 |
| c | Circle of Confusion (CoC) | mm | 0.015mm – 0.030mm |
| s | Subject Distance | meters or feet | 0.1m – ∞ |
| H | Hyperfocal Distance | meters or feet | 1m – ∞ |
Practical Examples (Real-World Use Cases)
Example 1: Portrait Photography (Shallow DoF)
A portrait photographer wants to create a striking headshot with a very blurry background to make the subject pop. They use an 85mm lens, a classic choice for portraits.
- Inputs:
- Focal Length: 85mm
- Aperture: f/1.8
- Subject Distance: 2 meters
- Sensor: Full Frame (CoC 0.029mm)
- Calculator Output:
- Total Depth of Field: 0.07 meters (7 cm)
- Near Limit: 1.96 m
- Far Limit: 2.03 m
- Hyperfocal Distance: 143.68 m
Interpretation: The Depth of Field Calculator shows an extremely shallow focus zone of only 7 centimeters. This means only the subject’s eyes might be in perfect focus, while their nose and ears may already start to soften, and the background will be completely blurred. This is the desired effect for this style of portraiture. Understanding the exposure triangle guide is crucial for balancing such a wide aperture with shutter speed and ISO.
Example 2: Landscape Photography (Deep DoF)
A landscape photographer wants to capture a scene with a flower in the foreground and mountains in the background, ensuring everything is sharp.
- Inputs:
- Focal Length: 24mm
- Aperture: f/11
- Subject Distance: 2.5 meters (focused on the flower)
- Sensor: Full Frame (CoC 0.029mm)
- Calculator Output:
- Total Depth of Field: Infinity
- Near Limit: 1.2 meters
- Far Limit: Infinity
- Hyperfocal Distance: 2.45 m
Interpretation: The photographer cleverly focused at 2.5 meters, which is just beyond the hyperfocal distance of 2.45 meters. The Depth of Field Calculator confirms that by doing this, the sharp area starts at 1.2 meters and extends all the way to infinity. This ensures both the nearby flower and the distant mountains are in focus, achieving the goal of a deep depth of field.
How to Use This Depth of Field Calculator
Using this Depth of Field Calculator is straightforward. Follow these steps to get precise results for your photography needs:
- Enter Focal Length: Input the focal length of your lens in millimeters (e.g., ’50’ for a 50mm lens).
- Select Aperture: Choose your desired aperture (f-stop) from the dropdown menu. A smaller f-number (like f/1.8) gives a shallower DoF, while a larger f-number (like f/11) gives a deeper DoF.
- Set Subject Distance: Enter the distance from your camera’s sensor to your subject. You can switch between meters and feet.
- Choose Sensor Size: Select your camera’s sensor format. This is crucial as it determines the Circle of Confusion (CoC), a key variable for accuracy. If you’re not sure, a quick search for your camera model will tell you its sensor size. For a deeper dive, you can read about understanding aperture.
- Analyze the Results: The calculator instantly updates. The ‘Total Depth of Field’ is your main result, showing the total size of the sharp area. The near and far limits tell you the exact start and end points of this sharp zone. The hyperfocal distance is also provided, which is useful for landscape photographers.
- Use the Chart and Table: The visual chart helps you understand the results intuitively, while the table shows how DoF changes with different apertures, helping you make quick decisions without re-entering numbers.
Key Factors That Affect Depth of Field Results
Several factors interact to determine the final depth of field in your photograph. A Depth of Field Calculator takes these into account, but understanding them individually is key to becoming a better photographer.
- Aperture (f-stop): This is the most significant factor. A wide aperture (small f-number like f/1.4) creates a very shallow depth of field, isolating the subject. A narrow aperture (large f-number like f/16) creates a very deep depth of field, keeping most of the scene sharp.
- Subject Distance: The closer you are to your subject, the shallower the depth of field becomes. This is why macro photography has an incredibly thin plane of focus. To increase DoF, step back from your subject.
- Focal Length: Longer focal lengths (telephoto lenses) produce a shallower depth of field compared to shorter focal lengths (wide-angle lenses) when the subject framing is the same. A 200mm lens will isolate a subject much more than a 24mm lens.
- Sensor Size: Larger sensors (like Full Frame) will produce a shallower depth of field than smaller sensors (like APS-C or Micro Four Thirds) at the same effective focal length and aperture. This is due to the different Circle of Confusion values used in the Depth of Field Calculator.
- Circle of Confusion (CoC): This is a measure of the largest blur spot that is still perceived as a point by the human eye. It’s determined by sensor size and viewing conditions (print size, viewing distance). Our Depth of Field Calculator uses industry-standard CoC values for convenience.
- Viewing Conditions: Although not an input in most online calculators, how large you print an image and from how far you view it technically affects the perceived depth of field. Larger prints viewed closely will reveal more blur. To learn more about lens properties, consider our guide on camera lens filters.
Frequently Asked Questions (FAQ)
Hyperfocal distance is the closest distance at which a lens can be focused while keeping objects at infinity acceptably sharp. When you focus at this distance, your depth of field extends from half of the hyperfocal distance to infinity. It’s a critical concept for landscape photographers who want maximum sharpness throughout their scene. Our Depth of Field Calculator provides this value automatically.
This can happen for a few reasons. Ensure you’ve entered the exact focal length, aperture, and especially the subject distance correctly. A small error in measuring subject distance, especially when you are close to the subject, can significantly alter the actual depth of field.
Yes, through a technique called “focus stacking.” This involves taking multiple photos of the same scene, each focused at a different point, and then merging them in post-processing software. This is common in macro and product photography. A good starting point is our focus stacking guide.
This is a topic of much debate. Technically, for a given focal length and aperture, sensor size doesn’t change the physics. However, to get the same field of view on a smaller sensor, you must use a wider lens or stand further back, both of which increase depth of field. Therefore, smaller sensors tend to produce images with a deeper depth of field in practice. The Depth of Field Calculator accounts for this via the Circle of Confusion value.
Bokeh refers to the *quality* of the out-of-focus blur, not the *amount* of it. Depth of field is the measurable zone of sharpness. A lens might produce a shallow depth of field, but the resulting blur (the bokeh) could be either smooth and creamy (good bokeh) or busy and distracting (bad bokeh).
To achieve a shallow depth of field for blurry backgrounds, use a wide aperture (the smallest f-number on your lens, like f/1.8), use a longer focal length (like 85mm or more), and get relatively close to your subject while ensuring there is significant distance between your subject and the background.
Not necessarily. While deep focus is a classic landscape technique, a shallow depth of field can be used creatively to draw attention to a specific element in the landscape, creating a more artistic and less documentary-style shot. The Depth of Field Calculator can help you explore both options.
Different manufacturers (Canon vs. Nikon/Sony) have slightly different dimensions for their APS-C sensors, leading to marginally different Circle of Confusion values. For most practical purposes, the difference is negligible, but for maximum precision, our Depth of Field Calculator lets you choose.