Depth of Field Calculator – Master Your Photography Focus


Master Your Focus with Our Depth of Field Calculator

Unlock the secrets of photographic sharpness and blur. Our advanced Depth of Field Calculator helps photographers precisely determine the range of acceptable focus in their images, from landscapes to portraits.

Depth of Field Calculator



The focal length of your lens in millimeters (e.g., 50mm, 85mm).

Please enter a valid focal length between 10 and 1000 mm.



The f-number (e.g., f/2.8, f/8) of your lens setting.

Please enter a valid aperture between f/1.0 and f/32.



The distance from your camera to the main subject in meters.

Please enter a valid subject distance between 0.1 and 1000 meters.



The maximum acceptable blur spot size. Choose a common sensor size or a custom value.


Calculation Results

Total Depth of Field
0.00 m
Near Limit of Focus:
0.00 m
Far Limit of Focus:
0.00 m
Hyperfocal Distance:
0.00 m
How it’s calculated: This Depth of Field Calculator uses standard optical formulas. It first determines the Hyperfocal Distance based on your focal length, aperture, and circle of confusion. Then, it calculates the Near and Far Limits of acceptable sharpness relative to your subject distance. The total Depth of Field is the difference between these two limits.

Depth of Field Visualizer


Depth of Field at Different Apertures (Fixed Focal Length & Subject Distance)
Aperture (f/) Near Limit (m) Far Limit (m) Total DoF (m)

What is a Depth of Field Calculator?

A Depth of Field Calculator is an essential tool for photographers to understand and control the range of acceptable sharpness in their images. In photography, “depth of field” (DoF) refers to the distance between the nearest and farthest objects in a scene that appear acceptably sharp in an image. This calculator takes into account your camera’s focal length, aperture setting, subject distance, and the sensor’s circle of confusion to provide precise measurements for your near limit, far limit, and total depth of field.

Who Should Use a Depth of Field Calculator?

  • Portrait Photographers: To achieve beautiful background blur (bokeh) while ensuring the subject’s eyes are perfectly sharp.
  • Landscape Photographers: To maximize sharpness from the foreground to the horizon, often by utilizing the hyperfocal distance.
  • Macro Photographers: To manage the extremely shallow depth of field inherent in close-up shots.
  • Street Photographers: To quickly set their camera for zone focusing, ensuring subjects at various distances are in focus without constant refocusing.
  • Videographers: To maintain consistent focus during moving shots or to achieve cinematic shallow depth of field.
  • Beginner Photographers: To learn how different camera settings impact focus and blur, accelerating their understanding of photographic principles.

Common Misconceptions About Depth of Field

Despite its importance, several myths surround depth of field:

  • “Aperture is the ONLY factor”: While aperture has the most significant impact, focal length, subject distance, and sensor size (via circle of confusion) are equally critical. A Depth of Field Calculator helps illustrate this interplay.
  • “Everything is either in focus or out of focus”: DoF is a gradient. Objects gradually become less sharp as they move away from the plane of critical focus. “Acceptably sharp” is a subjective threshold defined by the circle of confusion.
  • “Shallow DoF always means a better photo”: While popular for portraits, deep DoF is crucial for landscapes and architectural photography to convey context and detail. The “best” DoF depends entirely on your creative vision.
  • “DoF is evenly distributed”: The depth of field extends approximately one-third in front of your focus point and two-thirds behind it, not equally. This is a key insight provided by a Depth of Field Calculator.

Depth of Field Calculator Formula and Mathematical Explanation

Understanding the underlying formulas of a Depth of Field Calculator empowers you to make more informed photographic decisions. The calculations involve several key optical principles:

Step-by-Step Derivation

The core of depth of field calculation relies on the concept of the “circle of confusion” (CoC), which is the largest blur spot that is still perceived as a single point by the human eye or sensor. All distances are typically converted to millimeters for calculation consistency.

  1. Hyperfocal Distance (H): This is the closest distance at which a lens can be focused while keeping objects at infinity acceptably sharp. When focused at the hyperfocal distance, everything from half that distance to infinity will be in acceptable focus.

    H = (f^2 / (N * c)) + f

    Where:

    • f = Focal Length (mm)
    • N = Aperture f-number
    • c = Circle of Confusion (mm)
  2. Near Limit of Focus (Dn): This is the closest point to the camera that will appear acceptably sharp.

    Dn = (H * S) / (H + S - f)

    Where:

    • S = Subject Distance (mm)
    • H = Hyperfocal Distance (mm)
    • f = Focal Length (mm)
  3. Far Limit of Focus (Df): This is the farthest point from the camera that will appear acceptably sharp.

    Df = (H * S) / (H - S - f)

    Where:

    • S = Subject Distance (mm)
    • H = Hyperfocal Distance (mm)
    • f = Focal Length (mm)

    Note: If (H - S - f) is less than or equal to zero, the far limit extends to infinity.

  4. Total Depth of Field (DoF): The total range of acceptable sharpness.

    DoF = Df - Dn

Variable Explanations and Table

Each variable plays a crucial role in determining the final depth of field. Our Depth of Field Calculator simplifies these complex interactions.

Key Variables in Depth of Field Calculation
Variable Meaning Unit Typical Range
Focal Length (f) The optical length of the lens, determining magnification and angle of view. Millimeters (mm) 10mm (wide-angle) to 1000mm (super-telephoto)
Aperture (N) The size of the lens opening, expressed as an f-number. Controls light and DoF. f-number (unitless) f/1.0 (wide open) to f/32 (stopped down)
Subject Distance (S) The distance from the camera’s sensor plane to the main point of focus. Meters (m) 0.1m (close-up) to 1000m+ (distant)
Circle of Confusion (c) The maximum diameter of a blur spot that is still perceived as sharp. Depends on sensor size and viewing conditions. Millimeters (mm) 0.009mm (small sensor) to 0.033mm (medium format)

Practical Examples (Real-World Use Cases)

Let’s see how the Depth of Field Calculator can be applied to common photographic scenarios.

Example 1: Portrait Photography with Bokeh

You’re shooting a portrait with a full-frame camera, an 85mm lens, and want a creamy, blurred background. Your subject is 3 meters away, and you’re shooting wide open at f/1.8.

  • Focal Length: 85 mm
  • Aperture: f/1.8
  • Subject Distance: 3 meters
  • Circle of Confusion: 0.029 mm (Full Frame)

Calculator Output:

  • Hyperfocal Distance: ~140 meters
  • Near Limit: ~2.95 meters
  • Far Limit: ~3.05 meters
  • Total Depth of Field: ~0.10 meters (10 cm)

Interpretation: With only 10 centimeters of total sharpness, you’ll need to be very precise with your focus. This shallow depth of field will beautifully isolate your subject from the background, creating that desirable bokeh effect. Even a slight movement by the subject or camera could shift the focus off the eyes.

Example 2: Landscape Photography for Maximum Sharpness

You’re shooting a sweeping landscape with an APS-C camera and a 16mm wide-angle lens. You want everything from a few feet in front of you to the distant mountains to be sharp. You’re focusing at the hyperfocal distance.

  • Focal Length: 16 mm
  • Aperture: f/11
  • Subject Distance: (Calculated Hyperfocal Distance)
  • Circle of Confusion: 0.019 mm (APS-C)

First, let’s calculate the Hyperfocal Distance using the Depth of Field Calculator with the given settings, but *without* a specific subject distance (or by setting subject distance to infinity to find H).

H = (16^2 / (11 * 0.019)) + 16 = (256 / 0.209) + 16 = 1224.88 + 16 = 1240.88 mm = ~1.24 meters

Now, if you set your focus point to 1.24 meters:

  • Focal Length: 16 mm
  • Aperture: f/11
  • Subject Distance: 1.24 meters (Hyperfocal Distance)
  • Circle of Confusion: 0.019 mm (APS-C)

Calculator Output:

  • Hyperfocal Distance: ~1.24 meters
  • Near Limit: ~0.62 meters
  • Far Limit: Infinity
  • Total Depth of Field: Infinity

Interpretation: By focusing at the hyperfocal distance (1.24 meters), everything from approximately 0.62 meters (half the hyperfocal distance) to the horizon will be acceptably sharp. This is the ideal technique for maximizing overall sharpness in landscape photography, ensuring both foreground elements and distant features are in focus. This demonstrates the power of a Depth of Field Calculator for landscape planning.

How to Use This Depth of Field Calculator

Our Depth of Field Calculator is designed for ease of use, providing quick and accurate results to enhance your photographic workflow. Follow these steps to get the most out of it:

Step-by-Step Instructions

  1. Enter Focal Length (mm): Input the focal length of the lens you are using. This is usually printed on the lens (e.g., 50mm, 24-70mm). If it’s a zoom lens, enter the specific focal length you plan to use.
  2. Enter Aperture (f-number): Input the f-number (e.g., 1.8, 5.6, 11) you intend to set on your camera. Remember that a smaller f-number (wider aperture) results in shallower depth of field, and a larger f-number (narrower aperture) results in deeper depth of field.
  3. Enter Subject Distance (meters): Estimate or measure the distance from your camera to your main subject. This is the point where you will set your camera’s focus.
  4. Select Circle of Confusion (mm): Choose your camera’s sensor size from the dropdown. This value represents the maximum acceptable blur spot. Full-frame cameras typically use 0.029mm, while APS-C and Micro Four Thirds have smaller values. You can also select a custom value if you know your preferred CoC.
  5. Click “Calculate Depth of Field”: The calculator will instantly process your inputs and display the results.
  6. Use “Reset” for New Calculations: If you want to start over or try different settings, click the “Reset” button to clear the fields and restore default values.
  7. “Copy Results” for Sharing: Use the “Copy Results” button to quickly grab all the calculated values and key assumptions for your notes or sharing.

How to Read Results

  • Total Depth of Field: This is the most prominent result, indicating the total distance (in meters) that will appear acceptably sharp. A smaller number means shallower DoF, a larger number means deeper DoF.
  • Near Limit of Focus: The closest point to your camera that will still be acceptably sharp.
  • Far Limit of Focus: The farthest point from your camera that will still be acceptably sharp. If this shows “Infinity,” it means everything beyond the near limit will be in focus.
  • Hyperfocal Distance: The distance at which you should focus your lens to achieve the maximum possible depth of field, extending from half that distance all the way to infinity. This is a critical value for landscape photographers.

Decision-Making Guidance

The Depth of Field Calculator is a powerful tool for pre-visualization and planning. Use it to:

  • Plan your shot: Before you even pick up your camera, determine the optimal settings for your desired DoF.
  • Understand trade-offs: See how changing one variable (e.g., aperture) affects all others.
  • Achieve specific effects: Whether you want maximum background blur or edge-to-edge sharpness, the calculator helps you find the right combination.
  • Learn and experiment: Use the calculator to build intuition about depth of field without having to take countless test shots.

Key Factors That Affect Depth of Field Calculator Results

The results from any Depth of Field Calculator are influenced by several interconnected factors. Understanding these will give you greater control over your photography.

  1. Aperture (f-number): This is the most commonly discussed factor. A wider aperture (smaller f-number like f/1.8) results in a shallower depth of field, creating more background blur. A narrower aperture (larger f-number like f/16) results in a deeper depth of field, keeping more of the scene in focus. This is a fundamental control for creative photography.
  2. Focal Length: Longer focal lengths (telephoto lenses like 200mm) inherently produce shallower depth of field at the same aperture and subject distance compared to shorter focal lengths (wide-angle lenses like 24mm). This is why telephoto lenses are often favored for portraits to isolate subjects.
  3. Subject Distance: The closer your subject is to the camera, the shallower the depth of field will be. Conversely, the farther your subject, the deeper the depth of field. This effect is particularly noticeable in macro photography, where DoF can be razor-thin.
  4. Circle of Confusion (CoC) / Sensor Size: The CoC is a critical, yet often overlooked, factor. It’s the maximum size a blurred point of light can be before it’s perceived as out of focus. Larger sensors (like full-frame) typically have a larger acceptable CoC, which means they can achieve shallower depth of field than smaller sensors (like APS-C or Micro Four Thirds) at the same focal length and aperture, assuming the same field of view. Our Depth of Field Calculator allows you to adjust this.
  5. Magnification: This is closely related to focal length and subject distance. Higher magnification (either by using a longer lens or getting closer to the subject) leads to shallower depth of field. This is why macro lenses, which offer high magnification, have extremely shallow DoF.
  6. Viewing Distance and Output Size: While not directly an input for the calculator, how an image is viewed affects perceived sharpness. A large print viewed up close will reveal blur more readily than a small image viewed on a phone screen. The standard CoC values used in a Depth of Field Calculator are based on typical viewing conditions.

Frequently Asked Questions (FAQ) about Depth of Field

Q: What is the “sweet spot” for aperture regarding depth of field?

A: There isn’t a single “sweet spot” for depth of field, as it depends on your creative intent. For maximum background blur, you’d use a wide aperture (small f-number). For maximum sharpness from front to back, you’d use a narrower aperture (larger f-number) and often focus at the hyperfocal distance. The “sweet spot” for lens sharpness (where a lens performs optimally, often around f/8 or f/11) is different from the “sweet spot” for DoF.

Q: How does sensor size affect depth of field?

A: All else being equal (same focal length, aperture, and subject distance), a larger sensor will produce a shallower depth of field than a smaller sensor. This is because to achieve the same field of view, you’d either use a longer focal length lens or get closer with a smaller sensor, both of which affect DoF. The Depth of Field Calculator accounts for this via the Circle of Confusion setting.

Q: Can I use this Depth of Field Calculator for video?

A: Yes, absolutely! The principles of depth of field apply equally to still photography and videography. Videographers often use shallow depth of field to draw attention to subjects and create a cinematic look. This Depth of Field Calculator can help you plan your shots.

Q: What is hyperfocal distance and why is it important?

A: Hyperfocal distance is the closest distance at which a lens can be focused while keeping objects at infinity acceptably sharp. When you focus at the hyperfocal distance, everything from half that distance to infinity will be in focus. It’s crucial for landscape photographers who want to maximize the sharpness of their entire scene. Our Depth of Field Calculator provides this value.

Q: Why do my results sometimes show “Infinity” for the Far Limit?

A: When the far limit of focus extends to “Infinity,” it means that everything beyond the calculated near limit will appear acceptably sharp, all the way to the horizon. This typically happens when you use a wide-angle lens, a narrow aperture, or focus at or beyond the hyperfocal distance.

Q: How accurate is this Depth of Field Calculator?

A: This Depth of Field Calculator uses standard optical formulas, making its calculations theoretically accurate. However, real-world results can vary slightly due to lens aberrations, precise focus calibration, and subjective perception of “acceptable sharpness.” It provides an excellent guide for planning and understanding.

Q: What is the Circle of Confusion (CoC) and why do I need to set it?

A: The Circle of Confusion (CoC) is the maximum size a blurred point of light can be on your sensor before it’s perceived as a single, sharp point. It’s a critical factor because it defines “acceptable sharpness.” Different sensor sizes have different standard CoC values. Setting it correctly in the Depth of Field Calculator ensures the results are relevant to your specific camera system.

Q: How can I achieve more background blur (bokeh)?

A: To achieve more background blur, you generally need to: 1) Use a wider aperture (smaller f-number), 2) Use a longer focal length lens, 3) Get closer to your subject, and 4) Increase the distance between your subject and the background. The Depth of Field Calculator helps you experiment with these variables.

Enhance your photographic knowledge and planning with these related tools and articles:

© 2023 Depth of Field Calculator. All rights reserved.



Leave a Reply

Your email address will not be published. Required fields are marked *