Depth of Field Calculator
Calculate near limit, far limit and total depth of field from focal length, aperture, focus distance and sensor size.
1,217 views
How Depth of Field Is Calculated
Depth of field (DOF) is the zone in front of and behind your focus point that still looks acceptably sharp. Four inputs drive it: aperture (a higher f-number narrows the lens opening and deepens DOF), focal length (a longer lens narrows DOF for the same framing), focus distance (closer subjects mean shallower DOF), and sensor size, expressed through its circle of confusion c — the largest blur spot the eye still reads as a sharp point (full frame 0.030 mm, APS-C 0.020 mm, Micro Four Thirds 0.015 mm, 1-inch 0.011 mm). Larger sensors need a smaller, stricter circle of confusion for the same perceived sharpness, which is one reason they produce shallower depth of field at a matched field of view and aperture.
The calculation runs in two steps. First it finds the hyperfocal distance, H = f² ÷ (N · c) + f, where f is focal length and N is the f-number. Then it applies H to your actual focus distance s to get the near and far sharp limits: near = s·(H − f) ÷ (H + s − 2f), and far = s·(H − f) ÷ (H − s) — or infinity once s reaches H.
Worked example: a 50 mm lens at f/2.8 on a full-frame body (c = 0.030 mm), focused at 3 m. H works out to about 29.8 m. Plugging that into the near/far formulas gives a near limit of roughly 2.73 m and a far limit of roughly 3.33 m — a total sharp zone of about 60 cm, enough working room for a head-and-shoulders portrait but not much more.
What You Should Know
Depth of field is never split evenly around the focus point. At normal shooting distances roughly one-third of the sharp zone falls in front of the subject and two-thirds behind it; at macro distances that ratio flattens toward 50/50, and once you focus at or beyond the hyperfocal distance, the far limit extends all the way to infinity.
- Sensor size changes DOF mainly because of the focal length needed to match a field of view: a Micro Four Thirds camera needs a shorter lens than full frame for the same angle of view, and shorter lenses inherently produce more depth of field at a given f-number — the well-known rule of thumb is that Micro Four Thirds at f/2.8 looks roughly like full frame at f/5.6.
- For portraits, wider apertures (f/1.8-f/4) isolate the subject from the background — check that the near/far limits still cover both eyes and the nose. For landscapes, smaller apertures (f/8-f/11) combined with focusing at the hyperfocal distance keep everything from the foreground to infinity acceptably sharp.
- Diffraction sets a practical limit on how far stopping down helps: beyond roughly f/11-f/16 on most sensors, further narrowing the aperture starts softening the whole image even as calculated DOF keeps growing.
Frequently Asked Questions
Why is more of the scene in focus behind my subject than in front?
Depth of field is asymmetric: at normal distances roughly one-third falls in front of the focus point and two-thirds behind. At macro distances it approaches 50/50, and near the hyperfocal distance the far limit runs to infinity.
Does sensor size really change depth of field?
For the same framing and f-number, smaller sensors give more depth of field — a Micro 4/3 shot at f/2.8 looks similar to full frame at about f/5.6, because shorter focal lengths are used for the same field of view.
What f-stop should I use for portraits vs landscapes?
Portraits commonly use f/1.8-f/4 for subject separation (check the near/far limits cover eyes and nose). Landscapes typically use f/8-f/11 with focus at the hyperfocal distance for front-to-back sharpness.
What exactly is the "circle of confusion"?
It is the largest a single point of light can blur to on the sensor while a typical viewer still perceives it as a sharp point rather than a soft dot — about 0.030 mm for full frame, 0.020 mm for APS-C, and 0.015 mm for Micro Four Thirds. It scales with sensor size because smaller sensors are enlarged more to reach the same print or screen size, so any blur is magnified further and must start out smaller to still look sharp.
Why does focusing at the hyperfocal distance make everything sharp to infinity?
By definition, the hyperfocal distance H is the focus point whose far sharpness limit lands exactly at infinity. Because the far-limit formula subtracts your focus distance s from H in its denominator, once s equals H that term hits zero and the far limit mathematically becomes infinite — exactly what landscape photographers rely on.
Similar Tools
Report a Problem
Depth of Field Calculator
Comments
No comments yet — be the first to write one!