Skip to main content
other

Depth of Field Calculator

Calculate the depth of field, near focus limit, and far focus limit for any lens and camera combination.

By Christopher FloiedPublished Updated

Minimum: 0

Lens focal length in millimeters

Must be greater than 0

Lens aperture f-stop value

Minimum: 0

Distance from camera to subject in meters

Must be greater than 0

Circle of confusion diameter (0.03mm for full frame)

Results

Depth of Field

0.6 m

Near Focus Limit

2.73 m

Far Focus Limit

3.33 m

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Depth of Field Calculator. Follow the units and input format printed next to each field. Where a unit selector is available, choose the units that match your data.

2

Review your inputs

Double-check that all values are correct and match the units or format shown for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Depth of Field Calculator computes the output in your browser and displays the results, with units clearly labeled, as soon as they are ready — no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

When to Use This Calculator

  • •Use the Depth of Field Calculator when you need accurate results quickly without the risk of manual computation errors or unit conversion mistakes.
  • •Use it to verify calculations made by hand or in spreadsheets — an independent check can catch errors before they lead to costly decisions.
  • •Use it to explore how changing input parameters affects the output — a quick way to develop intuition and identify the most influential variables.
  • •Use it when collaborating with others to ensure everyone is working from the same numbers and applying the same assumptions.

Related Calculators

About Depth of Field Calculator

The Depth of Field Calculator determines the zone of acceptable sharpness in your photographs. Depth of field (DOF) is the distance range in front of and behind the focus point that appears acceptably sharp. Understanding DOF is crucial for portrait photographers seeking blurry backgrounds, landscape photographers wanting everything sharp, and macro photographers working with extremely thin focus zones.

The Math Behind It

Depth of field is determined by three primary factors: aperture, focal length, and subject distance. A wider aperture (smaller f-number) produces shallower depth of field, creating the bokeh effect prized in portrait photography. A longer focal length also reduces depth of field, while increasing subject distance deepens it. The circle of confusion (CoC) is the maximum diameter of a blur spot that appears as a point to the human eye. For full-frame sensors, 0.03mm is the standard CoC. Smaller sensors use proportionally smaller CoC values (e.g., 0.02mm for APS-C, 0.015mm for Micro Four Thirds). The hyperfocal distance is the focus distance that maximizes depth of field for a given focal length and aperture. When focused at the hyperfocal distance, everything from half the hyperfocal distance to infinity is acceptably sharp. Landscape photographers frequently use hyperfocal focusing to maximize sharpness throughout the scene. Depth of field is not evenly distributed around the focus point. Approximately one-third of the DOF extends in front of the subject and two-thirds behind it, though this ratio approaches 50/50 at close focusing distances. For macro photography, depth of field becomes extremely shallow, often measured in millimeters. Focus stacking, where multiple images at different focus distances are combined, is a common technique to overcome this limitation.

Formula Reference

Hyperfocal Distance

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

Variables: f = focal length, N = f-number (aperture), c = circle of confusion

Depth of Field

DOF = D_far - D_near

Variables: D_far = far focus limit, D_near = near focus limit, computed from hyperfocal distance and subject distance

Worked Examples

Example 1: Portrait with 50mm at f/2.8

A 50mm lens at f/2.8, subject at 3 meters, full-frame sensor (CoC = 0.03mm).

Step 1:Hyperfocal distance: (50^2) / (2.8 * 0.03) + 50 = 2500 / 0.084 + 50 = 29,811mm = 29.8m
Step 2:Near focus: 3000 * (29811 - 50) / (29811 + 3000 - 100) = 2.73m
Step 3:Far focus: 3000 * (29811 - 50) / (29811 - 3000) = 3.33m
Step 4:DOF: 3.33 - 2.73 = 0.60m

The depth of field is approximately 0.60 meters, from 2.73m to 3.33m. The subject must be positioned carefully within this zone.

Common Mistakes & Tips

  • !Using the wrong circle of confusion value for your sensor size.
  • !Assuming depth of field is equally distributed in front of and behind the focus point.
  • !Forgetting that crop sensors increase effective focal length but also change the circle of confusion.

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

How do I get a blurry background?

Use a wide aperture (low f-number like f/1.8 or f/2.8), a longer focal length, and move closer to your subject while keeping the background far away. These all reduce depth of field.

What is the circle of confusion?

The circle of confusion is the largest blur spot that still appears as a sharp point to the viewer. It depends on sensor size, print size, and viewing distance. Standard values are 0.03mm for full-frame and 0.02mm for APS-C sensors.

Add the live Depth of Field Calculator to your site. Free to embed, with a link back to MegaCalc.