Depth of Field (DoF) & Hyperfocal Distance Calculator
The ultimate tool for photographers to master sharpness and creative focus in their images.
Select your camera’s sensor type. This determines the Circle of Confusion (CoC), a key factor in DoF.
Enter the focal length of your lens in millimeters.
Select your lens aperture. Smaller f-numbers (e.g., f/1.8) mean shallower DoF.
The distance from your camera’s sensor to the subject.
Choose the unit for your subject distance and results.
Total Depth of Field
Near Focus Limit
Far Focus Limit
Hyperfocal Distance
What is a Depth of Field Calculator?
A Depth of Field (DoF) calculator is an essential photography calculator used to determine the distance range over which objects in a photograph will appear acceptably sharp. When you focus your lens on a specific point, there’s a zone extending in front of and behind that point that also maintains sharpness. This zone is the depth of field. This calculator helps you predict that zone based on your specific camera settings.
This tool is invaluable for landscape photographers aiming for maximum sharpness from foreground to background, and for portrait photographers who want to creatively blur the background to make their subject pop. By understanding and controlling DoF, you move from just taking pictures to making intentional, impactful photographs. For more on advanced techniques, consider learning about exposure bracketing.
The Depth of Field Formula and Explanation
While the precise calculations can be complex, they revolve around four core factors: the camera’s sensor size (represented by the Circle of Confusion), the lens’s focal length, the selected aperture, and the distance to the subject. The calculator first determines the **Hyperfocal Distance**, which is the closest distance at which a lens can be focused while keeping objects at infinity acceptably sharp.
The primary formulas used are:
- Hyperfocal Distance (H) ≈ (Focal Length² / (Aperture × Circle of Confusion))
- Near Focus Limit = (H × Subject Distance) / (H + (Subject Distance – Focal Length))
- Far Focus Limit = (H × Subject Distance) / (H – (Subject Distance – Focal Length))
- Total Depth of Field = Far Focus Limit – Near Focus Limit
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| Focal Length (f) | The lens’s optical magnification. | Millimeters (mm) | 14mm (wide) – 400mm (telephoto) |
| Aperture (N) | The size of the lens opening. | f-number (unitless) | f/1.4 (large) – f/22 (small) |
| Subject Distance (u) | Distance from camera to the focus point. | Meters (m) or Feet (ft) | 0.5m – infinity |
| Circle of Confusion (CoC) | The largest blur spot that is still perceived as a point. Based on sensor size. | Millimeters (mm) | 0.015mm – 0.030mm |
Practical Examples
Example 1: Landscape Photography
Imagine you’re shooting a grand landscape with a flower in the foreground and mountains in the back. You want everything sharp.
- Inputs: Full Frame Camera, 24mm lens, f/11, focused at 2.5 meters.
- Results: The calculator shows a massive depth of field, from approximately 1.2 meters to infinity. This means by focusing at the hyperfocal distance, both your foreground flower and the distant mountains will be sharp. This is a key technique for anyone using a landscape photography calculator.
Example 2: Portrait Photography
Now, you’re taking a headshot and want a beautifully blurred background (bokeh) to isolate your subject.
- Inputs: APS-C Camera, 85mm lens, f/1.8, focused at 2 meters.
- Results: The total depth of field is only about 6 centimeters (0.06m). This razor-thin zone of focus means your subject’s eyes will be sharp, but the background just a few feet behind them will be a soft, creamy blur.
How to Use This Depth of Field Calculator
Using this calculator is a simple, four-step process to mastering your camera’s focus:
- Select Your Sensor: Start by choosing your camera’s sensor format from the first dropdown. This is the most critical step as it sets the baseline for the calculation.
- Enter Lens and Aperture: Input your lens’s focal length and the aperture (f-stop) you plan to use.
- Set Subject Distance: Enter the distance from your camera to your main subject and select the appropriate unit (meters or feet).
- Interpret the Results: The calculator instantly provides the total depth of field, the near and far sharp limits, and the crucial hyperfocal distance. The visual chart helps you see where the zone of sharpness falls relative to your subject. To understand how this interacts with light, a shutter speed calculator can be a useful companion tool.
Key Factors That Affect Depth of Field
- Aperture: This is the most significant factor. A smaller f-number (e.g., f/1.8) results in a shallower DoF, while a larger f-number (e.g., f/16) creates a deeper DoF.
- Focal Length: Longer focal lengths (telephoto lenses) produce a much shallower DoF compared to wider focal lengths, even at the same aperture and distance.
- Subject Distance: The closer your subject is to the camera, the shallower the depth of field becomes. This is why macro photography has an extremely narrow focus plane.
- Sensor Size: Larger sensors (like Full Frame) will have a shallower depth of field than smaller sensors (like APS-C or MFT) at the equivalent field of view and aperture.
- Print Size & Viewing Distance: While our calculator uses a standard, the theoretical DoF also depends on how large you’ll print the photo and how far away it will be viewed. Larger prints viewed closely require a deeper DoF to appear sharp. Understanding your camera’s settings is key.
- Hyperfocal Distance: Focusing at this specific distance maximizes your DoF, making it a powerful technique for landscape photographers. Our calculator computes this for you automatically.
Frequently Asked Questions (FAQ)
1. What is the difference between DoF and bokeh?
Depth of Field refers to the zone of sharpness in an image. Bokeh, on the other hand, is the aesthetic quality of the blur in the out-of-focus parts of an image. A shallow DoF is a prerequisite for prominent bokeh.
2. Why isn’t my whole photo sharp even at f/22?
At very small apertures like f/16 or f/22, an optical phenomenon called diffraction can occur, which can actually soften the overall image, counteracting the gains from a deep DoF. Most lenses have a “sweet spot” between f/8 and f/11 for maximum sharpness.
3. How do I use the hyperfocal distance?
The calculator gives you a hyperfocal distance (e.g., 2.1 meters). For maximum DoF, you would manually focus your lens at that exact distance. This will render everything from half that distance (1.05 meters) to infinity as acceptably sharp.
4. Does the distance unit (meters/feet) change the actual DoF?
No. The physical depth of field is the same regardless of the unit. The unit selector is just for your convenience to input distances and read results in the system you prefer.
5. Why does my camera model have a different CoC value?
The Circle of Confusion (CoC) is a standardized value. While our calculator uses the most widely accepted standards, some advanced tools like PhotoPills allow for custom CoC values for specific print and viewing scenarios. For 99% of cases, the standard values are perfect.
6. Can I trust the DoF scale on my lens?
Many older manual lenses have a DoF scale printed on them. While useful for a quick estimate, a digital photography calculator like this one is far more precise because it’s tailored to your specific sensor size.
7. How does this relate to a general photography calculator?
A general photography calculator might include DoF, but also other things like exposure, flash power, or timelapse settings. This tool is specialized for one purpose: mastering depth of field with precision.
8. Is a deeper DoF always better?
Absolutely not. It’s a creative choice. Shallow DoF is essential for portraits, wildlife, and sports to isolate the subject. Deep DoF is preferred for landscapes, architecture, and group photos where you want everything in focus.
Related Tools and Internal Resources
Expand your technical and creative skills with these related calculators and guides:
- Exposure Value (EV) Calculator: Understand the relationship between aperture, shutter speed, and ISO to nail your exposure every time.
- Timelapse Calculator: Plan the perfect timelapse by calculating shooting intervals, clip duration, and storage needs.
- Long Exposure Calculator: Master the art of silky smooth water and light trails by calculating exposure times with ND filters.