Skip to main content

Depth of Field Calculator

Free Depth of Field Calculator for creative & design. Free online tool with accurate results using verified formulas.

Share this calculator

Formula

H = fยฒ/(Nร—CoC) + f | DoF = Far - Near

Hyperfocal distance H equals the focal length squared divided by the product of f-number and circle of confusion, plus the focal length. Near and far limits are calculated from H and subject distance. Depth of field is the range between the near and far sharp limits.

Worked Examples

Example 1: Portrait Photography Setup

Problem: Calculate DoF for an 85mm lens at f/1.8, focused at 2.5 meters on a full-frame camera.

Solution: f = 85mm, N = 1.8, d = 2500mm, CoC = 0.029mm\nH = (85ยฒ)/(1.8 ร— 0.029) + 85 = 138,423mm โ‰ˆ 138.4m\nNear = 2500 ร— (138423-85)/(138423+2500-170) = 2455mm โ‰ˆ 2.46m\nFar = 2500 ร— (138423-85)/(138423-2500) = 2547mm โ‰ˆ 2.55m\nDoF = 2.55 - 2.46 = 0.09m = 9cm

Result: DoF = 9cm | Near: 2.46m | Far: 2.55m | Very shallow โ€” perfect for isolating the subject

Example 2: Landscape Hyperfocal Technique

Problem: Find the hyperfocal distance for a 24mm lens at f/11 on full-frame, then calculate the DoF when focused there.

Solution: f = 24mm, N = 11, CoC = 0.029mm\nH = (24ยฒ)/(11 ร— 0.029) + 24 = 1829mm โ‰ˆ 1.83m\nFocusing at H = 1.83m:\nNear = 1829 ร— (1829-24)/(1829+1829-48) = 915mm โ‰ˆ 0.91m\nFar = infinity (distance = H)\nDoF = infinity

Result: Hyperfocal = 1.83m | Near limit: 0.91m | Far limit: infinity โ€” everything sharp from ~1m to horizon

Frequently Asked Questions

What is depth of field in photography?

Depth of field (DoF) is the distance range in a photograph where objects appear acceptably sharp. It extends from a near limit in front of the focus point to a far limit behind it. A shallow depth of field means only a thin slice of the scene is sharp, which is popular for portraits where the background is blurred (bokeh). A deep depth of field keeps most of the scene sharp, from foreground to background, which is preferred for landscape photography. Three main factors control DoF: aperture (f-stop), focal length, and subject distance. Understanding depth of field helps photographers make creative decisions about which parts of their image are in focus.

How does aperture affect depth of field?

Aperture has the most direct and intuitive effect on depth of field. A wider aperture (smaller f-number like f/1.4 or f/2) produces a shallower depth of field, meaning less of the scene is in focus. A narrower aperture (larger f-number like f/11 or f/16) produces a deeper depth of field. This happens because a wider aperture allows light rays to enter the lens at steeper angles, causing out-of-focus areas to blur more. However, stopping down too far (beyond f/16 on most lenses) introduces diffraction, which actually reduces overall sharpness. Portrait photographers typically use f/1.4 to f/2.8, while landscape photographers often use f/8 to f/11 for the optimal balance of depth and sharpness.

How does sensor size affect depth of field?

Sensor size indirectly affects depth of field in two ways. First, a smaller sensor has a smaller circle of confusion threshold, which means the standard of sharpness is stricter, resulting in a shallower calculated DoF for the same lens settings. Second, and more importantly, to get the same field of view as a larger sensor, you must use a shorter focal length, which increases DoF, or stand farther back. In practice, full-frame sensors produce shallower depth of field than APS-C or Micro Four Thirds at the same field of view and aperture. This is why smartphone cameras with tiny sensors struggle to produce background blur naturally and often use computational photography to simulate bokeh effects.

How accurate are the results from Depth of Field Calculator?

All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.

What formula does Depth of Field Calculator use?

The formula used is described in the Formula section on this page. It is based on widely accepted standards in the relevant field. If you need a specific reference or citation, the References section provides links to authoritative sources.

Can I use Depth of Field Calculator on a mobile device?

Yes. All calculators on NovaCalculator are fully responsive and work on smartphones, tablets, and desktops. The layout adapts automatically to your screen size.

References