Skip to main content

Depth of Field Calculator

Calculate DoF, hyperfocal distance, and near/far focus limits for any lens, aperture, and sensor combination.

Ad (leaderboard)

Results

Depth of Field
Near Limit
Far Limit
Hyperfocal Distance
Rate this tool
0.0 / 5 · 0 ratings
Ad (in_results)

How to Use the Depth of Field Calculator

Enter your lens focal length in millimeters, the aperture f-number, and the distance to your subject in meters. Select your camera sensor size from the dropdown. The calculator instantly computes the depth of field, near and far focus limits, and the hyperfocal distance using the standard circle of confusion values for each sensor format.

Understanding depth of field is crucial for every genre of photography. Portrait photographers use shallow DoF to isolate subjects from distracting backgrounds, while landscape photographers maximize DoF to keep everything sharp from the nearest foreground element to distant mountains. Macro photographers work with extremely thin depth of field, often measured in fractions of a millimeter.

The Depth of Field Formula

Depth of field depends on three key variables: focal length, aperture, and focus distance. The formula begins with the hyperfocal distance H = f² / (N × c) + f, where f is the focal length, N is the f-number, and c is the circle of confusion. The near limit is Dn = H × s / (H + s - f) and the far limit is Df = H × s / (H - s + f), where s is the subject distance. When the denominator of the far limit becomes zero or negative, the far limit extends to infinity.

Circle of Confusion by Sensor Size

The circle of confusion (CoC) is the threshold at which a point of light appears acceptably sharp. Standard values are 0.03mm for full-frame sensors, 0.019mm for Canon APS-C, 0.02mm for Nikon/Sony APS-C, 0.015mm for Micro Four Thirds, and 0.043mm for medium format. These values assume a standard print size of approximately 8×10 inches viewed from a normal distance.

Practical Tips for Controlling Depth of Field

To achieve a shallower depth of field, use a wider aperture, a longer focal length, or move closer to your subject. To maximize depth of field, use a narrower aperture, a wider-angle lens, or focus at the hyperfocal distance. Remember that extremely narrow apertures such as f/22 or f/32 introduce diffraction, which softens the image overall. Most lenses produce their sharpest results between f/5.6 and f/11.

Frequently Asked Questions

What is depth of field in photography?

Depth of field (DoF) is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in a photograph. A shallow DoF means only a thin slice of the scene is in focus, while a deep DoF means most of the scene from foreground to background is sharp.

How does aperture affect depth of field?

A wider aperture (smaller f-number like f/1.8) produces a shallower depth of field, blurring the background. A narrower aperture (larger f-number like f/16) produces a deeper depth of field, keeping more of the scene in focus.

What is hyperfocal distance?

Hyperfocal distance is the focus distance that gives the maximum depth of field, extending from half the hyperfocal distance to infinity. Focusing at the hyperfocal distance is a common technique in landscape photography to maximize sharpness across the entire scene.

How does sensor size affect depth of field?

Smaller sensors have a deeper depth of field at the same field of view. A full-frame sensor produces shallower DoF than an APS-C or Micro Four Thirds sensor at equivalent framing.

What is circle of confusion?

The circle of confusion (CoC) is the largest blur circle that still appears as a point to the human eye. Standard CoC values are 0.03mm for full-frame, 0.02mm for APS-C, and 0.015mm for Micro Four Thirds sensors.

Related Calculators

You Might Also Need

Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and should not be considered professional professional photography or optical advice. Consult a qualified professional before making decisions based on these calculations. See our full Disclaimer.