Depth of Field (DoF) Calculator
MiniWebtool’s Depth of Field (DoF) Calculator estimates the zone of acceptable sharpness for a camera setup. Sensor dimensions, focal length, aperture, and focus distance determine the near and far limits and related photographic distances.
For Gemini, paste the copied question into the chat. You can also copy it below.Need help using this tool? Ask AI
View the question
About Depth of Field (DoF) Calculator
Welcome to the Depth of Field Calculator, a comprehensive photography tool designed to help photographers understand and control the zone of sharpness in their images. Whether you are a portrait photographer seeking beautiful bokeh, a landscape shooter maximizing sharpness, or a macro enthusiast working with razor-thin focus planes, this calculator provides the precise measurements you need.
At a Glance
Depth of Field (DoF) Calculator works out the zone of acceptable sharpness for a camera, lens, aperture and focus distance. It reports the near and far limits and the hyperfocal distance.
| Feature | What you get | Good for |
|---|---|---|
| Sensor sizes | Choose Full Frame, APS-C, Micro Four Thirds or Medium Format, or enter custom sensor dimensions. | Comparing results across different camera bodies |
| Lens settings | Enter the focal length from presets or a custom value, and select an f-stop or type your own. | Planning a shot with a specific lens and aperture |
| Focus limits | Returns the total depth of field, the near and far limits and the hyperfocal distance. | Landscape shots focused for front-to-back sharpness |
| Circle of confusion | The circle of confusion is calculated from the sensor size you select. | Understanding why different sensors give different results |
| Aperture chart | A comparison chart shows depth of field at different f-stops, next to a visual of the sharp zone. | Choosing an aperture for portraits or landscapes |
| Distance units and equivalent | Enter distance in meters, feet, centimeters or inches; the 35mm equivalent focal length is shown. | Comparing lenses across sensor formats |
Understanding Depth of Field
Depth of Field (DoF) refers to the distance range in a photograph where objects appear acceptably sharp. Everything within this zone appears in focus, while objects outside it gradually become blurred. Understanding DoF is essential for creative photography because it allows you to:
- Isolate subjects: Use shallow DoF to separate your subject from distracting backgrounds
- Tell visual stories: Guide viewers' attention by controlling what is sharp and what is soft
- Maximize sharpness: Use deep DoF for landscapes where everything should be crisp
- Create artistic effects: Intentionally blur foregrounds or backgrounds for creative impact
The Three Factors That Control DoF
1. Aperture (f-stop)
Aperture has the most dramatic effect on depth of field. The f-number represents the ratio of focal length to the diameter of the lens opening:
- Wide apertures (f/1.4, f/2, f/2.8): Create shallow DoF with smooth background blur (bokeh)
- Medium apertures (f/5.6, f/8): Provide moderate DoF suitable for many situations
- Narrow apertures (f/11, f/16, f/22): Maximize DoF for front-to-back sharpness
Note: Very narrow apertures (f/16 and smaller) can introduce diffraction, which slightly softens the image overall.
2. Focal Length
Longer focal lengths produce shallower depth of field when shooting at the same distance and aperture:
- Wide-angle lenses (14-35mm): Naturally deeper DoF, great for landscapes and architecture
- Standard lenses (35-70mm): Versatile DoF control for various subjects
- Telephoto lenses (85mm+): Naturally shallower DoF, excellent for portraits and wildlife
3. Subject Distance
The closer you are to your subject, the shallower the depth of field becomes:
- Macro photography: Extremely close distances result in paper-thin DoF (often millimeters)
- Portrait distance (1-3m): Moderate DoF that can isolate subjects effectively
- Landscape distance (infinity): Very deep DoF when focused at hyperfocal distance
Key Concepts Explained
Hyperfocal Distance
The hyperfocal distance is a powerful concept for landscape photography. When you focus at the hyperfocal distance:
- Everything from half the hyperfocal distance to infinity appears sharp
- You maximize the depth of field for your chosen aperture
- This is the optimal focus point when you want both near foreground and distant background in focus
For example, if your hyperfocal distance is 3 meters, focusing at 3m means everything from 1.5m to infinity will be acceptably sharp.
Circle of Confusion (CoC)
Circle of Confusion is the optical basis for defining "acceptable sharpness." When a point of light passes through a lens and hits the sensor slightly out of focus, it creates a small circle rather than a perfect point. The CoC value defines how large this circle can be while still appearing as a point to the viewer.
CoC depends on:
- Sensor size: Larger sensors have larger acceptable CoC values
- Viewing conditions: Print size and viewing distance affect perceived sharpness
- Standard assumptions: Typically based on an 8×10 inch print viewed at 25cm
DoF Distribution (1/3 - 2/3 Rule)
At typical shooting distances, depth of field extends approximately 1/3 in front of the focus point and 2/3 behind it. However, this ratio varies:
- At close distances: DoF becomes more evenly distributed (approaching 50/50)
- At far distances: More DoF extends behind the subject
- At hyperfocal: DoF extends from half the focus distance to infinity
How to Use This Calculator
- Select your camera sensor size: Choose from Full Frame, APS-C (Canon or Nikon/Sony), Micro Four Thirds, Medium Format, or enter custom dimensions. Sensor size affects the Circle of Confusion calculation.
- Enter your focal length: Use presets for common focal lengths or enter a custom value. The calculator will show the 35mm equivalent for your sensor.
- Set your aperture: Select from standard f-stops or enter a custom value. This is the primary creative control for DoF.
- Enter subject distance: How far is your subject from the camera? Choose your preferred unit (meters, feet, etc.).
- Review the results: The calculator displays total DoF, near/far limits, hyperfocal distance, and provides an aperture comparison chart.
Practical Applications
Portrait Photography
For flattering portraits with smooth background blur:
- Use a lens of 85mm or longer
- Open your aperture wide (f/1.4 to f/2.8)
- Position your subject away from the background
- Focus on the eyes for sharp subject rendering
Landscape Photography
For maximum front-to-back sharpness:
- Calculate and focus at the hyperfocal distance
- Use apertures between f/8 and f/11 (optimal sharpness)
- Use a tripod to enable smaller apertures without camera shake
- Avoid f/16 and smaller to prevent diffraction softening
Macro Photography
When working with extreme close-ups:
- Expect very shallow DoF (often 1-2mm or less)
- Use focus stacking to extend apparent DoF
- Stop down to f/8 or f/11 for more working depth
- Consider using a focusing rail for precise adjustments
Street Photography
For quick, spontaneous shots:
- Pre-focus at hyperfocal distance for zone focusing
- Use f/8 to f/11 for a generous sharp zone
- Wide-angle lenses (28-35mm) provide more DoF margin
Sensor Size and Equivalent DoF
Different sensor sizes produce different depth of field characteristics when achieving the same framing. To get equivalent DoF on different sensors, you need to adjust the aperture by the crop factor.
For example, to match the DoF of a Full Frame camera at f/2.8:
- APS-C (1.5× crop): Use f/1.8 to f/2
- Micro Four Thirds (2× crop): Use f/1.4
- 1" sensor (2.7× crop): Use f/1.0 (if available)
This is why smartphone cameras, with their tiny sensors, struggle to produce shallow DoF despite having "f/1.8" lenses.
Frequently Asked Questions
What aperture do I need to get everything in focus?
Enter the nearest and farthest points that must be sharp (leave the far point blank for infinity). The calculator gives the exact focus distance, which is 2 x near x far / (near + far), and the smallest f-number that covers the zone for your sensor and focal length, rounded to the next standard third-stop, and then checks the result with the normal depth-of-field formulas.
What is Depth of Field (DoF) in photography?
Depth of Field (DoF) is the distance between the nearest and farthest objects in a photo that appear acceptably sharp. A shallow DoF creates a blurred background (bokeh) that isolates the subject, while a deep DoF keeps more of the scene in focus. DoF is controlled by three main factors: aperture (f-stop), focal length, and subject distance.
How does aperture affect depth of field?
Aperture has a direct relationship with depth of field. A wider aperture (lower f-number like f/1.4 or f/2.8) creates a shallower DoF with more background blur. A narrower aperture (higher f-number like f/11 or f/16) creates a deeper DoF with more of the scene in focus. This is why portrait photographers often use wide apertures for subject isolation, while landscape photographers use narrow apertures for front-to-back sharpness.
What is hyperfocal distance and why is it important?
Hyperfocal distance is the closest focusing distance at which everything from half that distance to infinity appears acceptably sharp. When you focus at the hyperfocal distance, you maximize the depth of field for a given aperture and focal length. This technique is especially valuable for landscape photography where you want both foreground and distant elements to be sharp.
What is Circle of Confusion (CoC)?
Circle of Confusion (CoC) is the optical spot caused by a cone of light rays from a point source not coming to a perfect focus. It determines what appears "acceptably sharp" in an image. CoC depends on sensor size, viewing distance, and print size. Smaller sensors require smaller CoC values for equivalent sharpness, which is why this calculator adjusts CoC based on your selected sensor size.
How does sensor size affect depth of field?
Larger sensors generally produce shallower depth of field at the same framing. This happens because: 1) Larger sensors require longer focal lengths to achieve the same field of view, and longer focal lengths reduce DoF. 2) The larger permissible Circle of Confusion partly offsets the shallower DoF effect. A full-frame camera will have shallower DoF than an APS-C or Micro Four Thirds camera when shooting the same scene at the same framing.
Why is depth of field not evenly distributed?
Depth of field extends approximately 1/3 in front of and 2/3 behind the focus point at typical shooting distances. However, this ratio changes with distance: at close-up distances, DoF is nearly equal in front and behind; at far distances (approaching hyperfocal), more DoF extends behind the subject. Understanding this distribution helps photographers place their focus point optimally.
What focal length should I enter if my lens is 50mm but the camera display says 75mm equivalent?
Enter the lens's actual focal length, 50mm, along with the camera's sensor dimensions. The 75mm equivalent describes how the field of view compares with a 35mm full-frame camera; it is not the physical focal length of the lens. Mixing an equivalent focal length with the actual sensor size can distort the depth-of-field estimate. Check the lens or camera specifications if you are unsure which value is actual.
How do I estimate depth of field for a group portrait where everyone needs to look sharp?
Enter the actual focal length, aperture, sensor size, and distance to the group, then check whether the calculated near and far limits cover the people. Arrange faces as close to the same distance from the camera as practical; people in staggered rows may fall outside the sharp zone. If the range is too shallow, stopping down or stepping back can increase depth of field, though available light and shutter speed also matter.
Why can objects inside the calculated depth of field still look slightly soft?
Depth of field marks the range considered acceptably sharp under the chosen circle of confusion, not a guarantee that every detail is perfectly focused. The apparent result also depends on viewing size, focus accuracy, lens performance, motion, and image processing. Very small apertures can introduce diffraction that softens the whole image. Use the calculation as a planning guide, then review a test image at the size you intend to view or print it.
Additional Resources
Reference this content, page, or tool as:
"Depth of Field (DoF) Calculator" at https://MiniWebtool.com/depth-of-field-dof-calculator/ from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: Jan 31, 2026
Chat with your favorite AI
For Gemini, paste the copied question into the chat. You can also copy it below.