Depth of Field Calculator

How much of your photo will be sharp? This free DoF calculator computes the near limit, far limit, and total depth of field for any focal length, aperture, focus distance, and sensor or film format — then goes further: hyperfocal distance with zone-focusing tables, macro depth of field, a diffraction-limited aperture analyzer with a real camera database, a 35mm-equivalent crop factor converter, and an aperture sweep table from f/1.4 to f/22. A modern, mobile-friendly alternative to legacy depth of field calculators, for stills, video, and cinematography.

🔒 100% client-side — your inputs never leave your browser. No sign-up, works offline after first load.

Field formulas: H = f² ÷ (N × c); near = H·s ÷ (H+s); far = H·s ÷ (H−s). CoC values follow the standard diagonal ÷ 1500 convention; macro mode uses the thin-lens approximation. Results are planning estimates — real lenses vary slightly.

Setup: units & sensor

Applies to every tab below. Pick your sensor once — the circle of confusion (CoC) is set automatically, making this a depth of field calculator apsc, full-frame, Micro Four Thirds, and medium-format shooters can all use, including classic film camera formats.

Distance units:
Full frame, APS-C (Canon & Nikon/Sony), Micro Four Thirds, 1-inch, medium format, large format.
0.030 mm

Depth of field calculator

Enter your lens and shooting distance to get the near focus limit, far focus limit, total depth of field, hyperfocal distance, and a background-blur estimate. It doubles as a depth of field aperture calculator and depth of field focal length explorer — change any input and watch the limits move.

e.g. 1.4, 2, 2.8, 4, 5.6, 8, 11, 16, 22
For the background-blur estimator.

Results

Near limit
—
Far limit
—
Total DoF
—
Hyperfocal
—
Background blur disk
—

camerafar

How the math works (verified)

This section explains how to calculate depth of field with the standard depth of field calculation formula used by field references for decades:

H = f² ÷ (N × c) — the hyperfocal distance formula, with f focal length, N f-number, c circle of confusion.

near = H × s ÷ (H + s) and far = H × s ÷ (H − s) — near and far limits at focus distance s (far = ∞ when s ≥ H).

macro DoF ≈ 2 × N × c × (1 + m) ÷ m² — total depth of field at magnification m.

Airy disk = 2.44 × λ × N (λ = 550 nm) — diffraction; diffraction-limited aperture where the disk reaches 2× pixel pitch.

Worked example (independently verified): 50 mm lens, f/2.8, focus 3 m, full-frame CoC 0.03 mm → H = 50² ÷ (2.8 × 0.03) = 29.76 m; near = 29.76 × 3 ÷ 32.76 = 2.73 m; far = 29.76 × 3 ÷ 26.76 = 3.34 m; total depth of field = 0.61 m. Try it in the DoF tab — you will get the same numbers.

Circle-of-confusion values follow the Zeiss convention (sensor diagonal ÷ 1500): full frame 0.030 mm, APS-C 0.019–0.020 mm, Micro Four Thirds 0.015 mm, 1-inch 0.011 mm, medium format ≈ 0.050 mm, 4×5 in ≈ 0.100 mm. CoC is a convention, not a law of physics — if you print large or pixel-peep, use a smaller value via the Custom option.

Frequently asked questions

What is depth of field?

Depth of field (DoF) is the zone in front of and behind your focus point that appears acceptably sharp in a photograph. It is bounded by a near limit and a far limit: everything between them looks in focus, while objects outside the zone blur progressively. Depth of field is controlled by four things: aperture (f-number), focal length, focus distance, and the circle of confusion of your sensor or film format. Use the calculator above to see the exact near limit, far limit, and total depth of field for your lens and settings.

How do you calculate depth of field? What is the depth of field formula?

The standard field formula uses three steps. First compute the hyperfocal distance H = f² ÷ (N × c), where f is focal length, N is the f-number, and c is the circle of confusion. Then near limit = H × s ÷ (H + s) and far limit = H × s ÷ (H − s), where s is the focus distance. Total depth of field = far limit − near limit. Worked example: a 50 mm lens at f/2.8 focused at 3 m on full frame (CoC 0.03 mm) gives H = 50² ÷ (2.8 × 0.03) = 29.76 m, near limit 2.73 m, far limit 3.34 m, and total depth of field 0.61 m. This calculator applies those exact formulas to any lens, aperture, distance, and sensor.

What is hyperfocal distance and how do you calculate it?

The hyperfocal distance is the closest focus distance at which the far limit of depth of field extends to infinity — the classic landscape technique for maximum front-to-back sharpness. The formula is H = f² ÷ (N × c): focal length squared divided by f-number times circle of confusion. For example, a 35 mm lens at f/8 on full frame (CoC 0.03 mm) has a hyperfocal distance of 35² ÷ (8 × 0.03) ≈ 5.10 m; focus there and everything from 2.55 m to infinity is sharp. The Hyperfocal tab above computes it for your gear, and the zone-focusing table shows near and far limits at any focus distance.

What is circle of confusion, and what values should I use for full frame, APS-C, and Micro Four Thirds?

The circle of confusion (CoC) is the largest blur spot on the sensor that still looks like a sharp point in the final image — the threshold the whole depth-of-field calculation rests on. Standard published values: full frame 0.030 mm, APS-C (Nikon/Sony/Fujifilm) 0.020 mm, APS-C (Canon) 0.019 mm, Micro Four Thirds 0.015 mm, 1-inch 0.011 mm, medium format 645 about 0.050 mm, and large format 4×5 in about 0.100 mm. They follow the Zeiss convention of sensor diagonal ÷ 1500. Smaller sensors use smaller CoC values, which is why the same lens at the same aperture gives deeper depth of field on a crop sensor. The sensor presets above set these automatically, or enter your own.

How do I get maximum depth of field for landscape photography?

Use a wide-angle lens, stop down to around f/8–f/11, and focus at the hyperfocal distance. Avoid stopping down past about f/16 on full frame (earlier on high-resolution or crop sensors), because diffraction softens the whole image and cancels the gain in depth of field — the Diffraction tab shows your camera’s limit. For example, with a 24 mm lens at f/8 on full frame the hyperfocal distance is only 2.4 m, so focusing at 2.4 m keeps everything from 1.2 m to infinity sharp. The aperture-sweep table lets you compare every f-stop from f/1.4 to f/22 at a glance.

How do I get shallow depth of field and a blurry background?

Four levers, in order of strength: (1) move closer to your subject — focus distance dominates; (2) open the aperture (smaller f-number); (3) use a longer focal length; (4) move the subject farther from the background. For instance, an 85 mm lens at f/1.8 focused at 5 m on full frame gives only 0.37 m of depth of field, and a background at infinity renders as a blur disk nearly 17× the circle of confusion. The Background blur estimator in the DoF tab quantifies this: it reports the background blur-circle diameter in multiples of your sensor’s circle of confusion, so you can compare lenses and apertures numerically.

How is depth of field calculated for macro photography?

At macro magnifications, depth of field depends on magnification and aperture, not focal length. The thin-lens approximation is: total DoF ≈ 2 × N × c × (1 + m) ÷ m², where m is magnification. At 1:1 (life size) with f/8 on full frame (CoC 0.03 mm), depth of field is only 2 × 8 × 0.03 × 2 ÷ 1 = 0.96 mm — less than a millimeter. At half life size (1:2) it quadruples to about 2.9 mm. Note that the effective f-number grows with magnification (effective f-number = N × (1 + m)), so f/8 at 1:1 behaves like f/16 for exposure and diffraction. The Macro tab above computes depth of field from your magnification directly.

What is the diffraction limit and the diffraction-limited aperture?

Diffraction is the physical spreading of light through a small aperture: the Airy disk diameter = 2.44 × λ × N (λ ≈ 550 nm for green light). When the Airy disk grows larger than your sensor’s pixels, stopping down further adds no sharpness anywhere — the whole image softens. The commonly quoted diffraction-limited aperture is the f-number where the Airy disk reaches about twice the pixel pitch. For a Canon EOS R5 (4.39 µm pixels) that is about f/6.5; for a 61 MP Sony A7R V (3.79 µm pixels) about f/5.6; for a 24 MP full-frame body (6.0 µm pixels) about f/9. The Diffraction tab computes the limit for 9 popular camera bodies or your own pixel pitch, and compares the Airy disk at any aperture against your pixels.

Does sensor size affect depth of field?

Yes, through the circle of confusion. With the exact same lens, aperture, and focus distance, a smaller sensor measures a shallower depth of field — because its smaller CoC is a stricter sharpness criterion. Example: a 50 mm lens at f/2.8 focused at 3 m gives 0.61 m of depth of field on full frame (CoC 0.030 mm) but 0.38 m on Canon APS-C (CoC 0.019 mm), since the hyperfocal distance stretches from 29.76 m to 46.99 m. In real shooting, though, photographers compare equivalent framings: the crop body needs a shorter focal length or a longer shooting distance for the same composition, and that is what makes depth of field deeper on smaller sensors in practice. The sensor presets above let you see both effects numerically.

What is crop factor and 35mm equivalent focal length?

Crop factor is the ratio of the full-frame diagonal (43.27 mm) to your sensor’s diagonal. Multiply a lens’s actual focal length by the crop factor to get its 35 mm-equivalent field of view: a 25 mm lens on Micro Four Thirds (crop ≈ 2.0×) frames like a 50 mm on full frame; a 35 mm on Canon APS-C (crop ≈ 1.6×) frames like 56 mm; a 50 mm on medium-format GFX (crop ≈ 0.79×) frames like 40 mm. Crop factor describes angle of view, not a physical change in the lens. The Crop Factor tab converts any focal length across full frame, APS-C (Canon and Nikon/Sony), Micro Four Thirds, 1-inch, medium format, and large format.

Is depth of field really one-third in front and two-thirds behind the focus point?

Only as a rough rule of thumb — and often a misleading one. The near/far split depends on how the focus distance compares to the hyperfocal distance. At moderate distances the far limit stretches much farther than the near limit (e.g. 35 mm at f/8 focused at 3 m on full frame: near 1.89 m, far 7.28 m — roughly 1:4, not 1:2). At macro distances the split is nearly 50/50. At the hyperfocal distance it is exactly 1:2 (near = H/2, far = infinity). Rather than memorizing the rule, read the near and far limits the calculator reports — they are computed from the real formulas.

Can I calculate depth of field in feet instead of meters?

Yes — switch the unit toggle to imperial (ft) and enter focus distance in feet; all results (near limit, far limit, hyperfocal distance, total DoF) are shown in feet. The math is identical: inputs are converted to millimeters internally and results converted back, so a 50 mm lens at f/2.8 focused at 9.84 ft on full frame gives the same near limit 8.94 ft, far limit 10.95 ft, and hyperfocal distance 97.6 ft as the metric version.

Why does my phone camera keep everything in focus?

Three compounding reasons: a tiny sensor (very small circle of confusion), a very short actual focal length (often 4–6 mm), and a slow-ish fixed aperture around f/1.8–f/2.8. Plug a 1-inch-sensor compact into this calculator — or imagine a phone’s ~5 mm lens at f/2 on a 1/1.3-inch sensor — and the hyperfocal distance lands under a meter, so nearly the whole scene sits inside the depth of field. Shallow depth of field on phones is mostly computational (portrait mode), not optical.

Which aperture is sharpest — the lens sweet spot or the diffraction limit?

Most lenses are sharpest 2–3 stops down from wide open (often f/4–f/8), where aberrations have faded but diffraction has not yet bitten. Diffraction then softens the image progressively past the diffraction-limited aperture (about f/5.6–f/8 on high-resolution full-frame bodies, f/8–f/11 on 24 MP bodies — see the Diffraction tab for your camera). For maximum depth of field in landscapes, f/8–f/11 is usually the sweet spot; f/16–f/22 buys a little more DoF at the cost of overall sharpness. Compare both sides with the aperture-sweep table and the diffraction readout together.

How is this depth of field calculator different from dofmaster?

dofmaster is the beloved classic — referenced by photography press for 20 years — but its website is a Windows-XP-era fossil that is hard to use on a phone. This tool is a modern, mobile-friendly depth of field studio: the same trusted formulas (verified against hand calculation — e.g. 50 mm, f/2.8, 3 m, full frame → near 2.73 m, far 3.34 m), plus six modes dofmaster never had: hyperfocal with zone-focusing tables, macro depth of field, a diffraction-limit analyzer with a real camera database, a crop-factor/equivalent-focal-length converter, an aperture-sweep comparison table (f/1.4–f/22), and a background-blur estimator — all 100% client-side with no sign-up.

Is my data sent anywhere? Is this calculator private?

No. This depth of field calculator runs 100% in your browser: every computation happens locally in JavaScript, and nothing you type — focal length, aperture, distances, camera — is sent to any server. There is no sign-up, no tracking of your inputs, and the page keeps working offline after the first load. (The only network requests a page can ever make are the page itself and its images; this tool loads no external scripts, fonts, or analytics.)

Free tool by NRTechStudio