The calculator
Depth of field for your shot
Change any input and the results update instantly. Focus distance must be greater than the focal length.
Lens & aperture
In millimeters — the number printed on your lens (e.g. 50, 85, 24).
The f-stop you are shooting at — e.g. 1.8, 2.8, 5.6, 11.
Focus distance & sensor
In meters — the distance from your camera to the subject (e.g. 3 for a 3 m portrait).
Each format uses a different circle-of-confusion constant — see the table below.
Depth of field:
The formulas, in full
These are the exact equations the calculator runs — the standard thin-lens DoF approximations used in optical engineering and photography references. Every variable is defined; every constant is labeled.
Variable definitions
What each symbol means
f — focal length, in millimeters (mm). The number printed on your lens.
N — the f-number (aperture). A dimensionless ratio of focal length to entrance pupil diameter.
s — subject distance (focus distance), in millimeters. Convert from meters: multiply by 1000.
c — circle of confusion (CoC) in millimeters. The maximum diameter of a blur spot that still reads as a point when the image is viewed at a normal distance. Depends on sensor size — see the CoC table below.
H — hyperfocal distance, in millimeters.
Dn — near limit of depth of field, in millimeters.
Df — far limit of depth of field, in millimeters. Infinity when H − s ≤ 0.
Equations
H = f² / (N × c) + f
All lengths in mm. Focusing at H places the far limit of DoF at infinity and the near limit at H/2. This is the maximum-DoF focus point for a given focal length and aperture.
Dn = s(H − f) / (H + s − 2f)
The closest distance (in mm) from the camera that falls within the depth of field.
Df = s(H − f) / (H − s)
The farthest sharp distance (in mm). If H − s ≤ 0 (i.e., focus distance ≥ hyperfocal), the far limit is infinity — everything from Dn onward appears sharp.
DoF = Df − Dn
Infinity when the far limit is infinity. All outputs convert mm → meters for display.
Circle of confusion by sensor format
The CoC value is derived from the sensor's diagonal dimension divided by a conventional enlargement factor (typically ~1500, accounting for a standard print viewed at a normal distance). These are the industry-standard values used by the major DoF calculators and optical references.
| Sensor format | Crop factor | Sensor diagonal (approx.) | CoC (mm) — used by this calculator |
|---|---|---|---|
| Full frame (35 mm) | 1× | 43.3 mm | 0.029 mm |
| APS-C 1.5× (Nikon, Sony, Fuji) | 1.5× | 28.4 mm | 0.019 mm |
| Canon APS-C 1.6× | 1.6× | 26.7 mm | 0.018 mm |
| Micro Four Thirds 2× | 2× | 21.6 mm | 0.015 mm |
| 1-inch sensor 2.7× | 2.7× | 15.9 mm | 0.011 mm |
CoC values are industry-standard constants derived from each sensor's diagonal. The calculator uses the CoC for the format you select — the active row is highlighted when a sensor format is chosen above.
Worked example — step by step
A 50 mm lens at f/1.8, focused at 3 meters on a full-frame camera. These are the calculator's default inputs; you can reproduce every figure below by hand.
Inputs
50 mm · f/1.8 · 3 m · Full frame
f = 50 mm | N = 1.8 | s = 3 m = 3000 mm | c = 0.029 mm (full frame)
Step 1 — Hyperfocal distance H
H = f² / (N × c) + f
H = 50² / (1.8 × 0.029) + 50
H = 2500 / 0.0522 + 50
H = 47,892.7 + 50 = 47,942.7 mm ≈ 47.94 m
Step 2 — Near limit Dn
Dn = s(H − f) / (H + s − 2f)
Dn = 3000 × (47942.7 − 50) / (47942.7 + 3000 − 100)
Dn = 3000 × 47892.7 / 50842.7
Dn = 143,678,100 / 50842.7 = 2825.9 mm ≈ 2.83 m
Step 3 — Far limit Df
Check: H − s = 47942.7 − 3000 = 44942.7 (positive, so far limit is finite)
Df = s(H − f) / (H − s)
Df = 3000 × 47892.7 / 44942.7
Df = 143,678,100 / 44942.7 = 3196.9 mm ≈ 3.20 m
Step 4 — Total depth of field
DoF = Df − Dn
DoF = 3196.9 − 2825.9 = 371.0 mm ≈ 0.37 m
Step 5 — Interpret the result
At f/1.8, 50 mm, focused 3 m away on full frame, the depth of field is about 37 cm — from 2.83 m to 3.20 m. That is roughly 17 cm in front of the focus point and 20 cm behind it. Notice it is not an even one-third / two-thirds split: the split here is approximately 45% / 55% — the rule breaks down at non-intermediate distances. The hyperfocal distance of ~47.94 m is far beyond the focus point, so the far limit stays finite at 3.20 m.
Common mistakes with depth of field
DoF is frequently misunderstood — here are the errors that come up most often, each of which can mislead your shooting decisions.
Assuming CoC stays the same across sensor formats
The circle-of-confusion constant is not universal — it changes with sensor size. Copying a DoF figure calculated for full frame and applying it to your APS-C or Micro Four Thirds camera will give you wrong numbers. A full-frame shooter and an MFT shooter using the same physical focal length and aperture at the same subject distance will get different depths of field because the MFT sensor uses a smaller CoC threshold (0.015 mm vs. 0.029 mm). Always enter your actual sensor format.
Treating the one-third / two-thirds rule as universal
The idea that one-third of DoF falls in front of the focus point and two-thirds behind it is a rough approximation that only holds near a specific range of distances (roughly mid-distances between near-focus and hyperfocal). At close focus distances (macro, portrait), the split approaches 50/50. At distances near or beyond the hyperfocal distance, the far side extends to infinity while the near side is finite — there is no meaningful ratio at all. Use the near and far limits from the calculator rather than a rule of thumb.
Confusing focus distance units (meters vs. feet vs. millimeters)
The DoF formulas require all lengths in the same unit — typically millimeters. A common error is entering the subject distance in meters directly into the formula without converting (multiplying by 1000). The symptom is a near-limit that computes as a fraction of a millimeter instead of a real-world distance. This calculator handles the conversion automatically: enter meters in the field, and all internal math runs in millimeters.
Thinking a smaller f-number (wider aperture) always gives the same DoF for a given subject size
When you move closer to keep a subject the same size in the frame, the subject distance decreases — and shorter subject distances reduce DoF independently of aperture. Shooting a headshot at f/2.8 from 1 m gives far less DoF than shooting a full-length portrait at f/2.8 from 5 m, even though the aperture is identical. Use the calculator to check DoF at your actual subject distance rather than inferring from aperture alone.
Assuming depth of field is symmetric around the focus point
Depth of field is almost never equal on both sides of the focus point. It is symmetric only in the macro range (very close focus distances relative to focal length). In real shooting scenarios, the DoF behind the subject is always longer than the DoF in front — sometimes by a small margin, sometimes dramatically. The asymmetry grows as the focus distance increases toward the hyperfocal distance.