Depth of field calculator
See exactly what will be sharp before you press the shutter. Pick your sensor, lens, aperture and focus distance — the near and far limits, total depth of field and hyperfocal distance update instantly.
Advanced
Leave empty to use the standard value for the sensor. Halve it for pixel-level sharpness.
With a 50 mm lens at f/2.8 on full frame focused at 3.00 m, everything from 2.73 m to 3.33 m is acceptably sharp: 60 cm of depth of field.
- In front of subject
- 27 cm (45%)
- Behind subject
- 33 cm (55%)
- Hyperfocal distance
- 29.8 m
- Circle of confusion
- 0.030 mm
How the depth of field calculator works
Depth of field is calculated from the hyperfocal distance H = f² ÷ (N × c) + f, where f is the focal length, N the f-number and c the circle of confusion. For a subject at distance s, the near limit is s(H − f) ÷ (H + s − 2f) and the far limit is s(H − f) ÷ (H − s). When s is at or beyond H, the far limit is infinity. These are the same thin-lens formulas used by DOFMaster and printed lens scales, so results match published depth of field tables.
Reading the diagram
The diagram puts your focus point in the middle and infinity at the right-hand edge, so you can compare a 4 cm portrait sharp zone and a landscape that is sharp from 1 m to the horizon on the same picture. The shaded band is everything that is acceptably sharp; the dashed line marks the hyperfocal distance. Tap Focus at hyperfocal to move the focus point there.
Quick rules of thumb
- One stop of aperture (for example f/4 to f/5.6) increases depth of field by about 40%.
- Halving the distance to your subject reduces depth of field to roughly a quarter.
- Doubling the focal length at the same distance also reduces it to roughly a quarter — but if you step back to keep the same framing, depth of field stays almost the same.
- For portraits at f/1.4–f/2, focus on the nearest eye: the sharp zone may be thinner than the distance between the eyes and the tip of the nose.
New to the topic? Read depth of field explained, see every step of the maths in the depth of field formula with worked examples, or browse ready-made depth of field tables for popular lenses.
How to use the depth of field calculator
- Choose your sensor. Select your camera format — full frame, APS-C, Micro Four Thirds, 1-inch, medium format or phone. This sets the circle of confusion.
- Enter the lens and aperture. Type the real focal length printed on the lens (not the full-frame equivalent) and choose the f-number you plan to shoot at.
- Set the focus distance. Enter the distance from the camera to your subject in meters or feet.
- Read the sharp zone. The near limit, far limit and total depth of field update instantly, and the diagram shows how the sharp zone splits in front of and behind the subject.
Depth of field for popular lenses
- 14 mm f/2.8Ultra-wide astro and architecture
- 16 mm f/8Landscapes with a strong foreground
- 20 mm f/1.8Fast wide prime for night skies
- 24 mm f/1.4Astro and environmental portraits
- 24 mm f/8Travel and landscape
- 28 mm f/5.6Zone focusing for street photography
- 35 mm f/1.8Everyday and environmental portraits
- 35 mm f/8"f/8 and be there"
- 50 mm f/1.4Low light and shallow focus
Guides
- Depth of field explainedWhy one photo is sharp from the flowers at your feet to the mountains, and another has only an eyelash in focus — and how to choose between them on purpose.
- Hyperfocal distance: focusing for front-to-back sharpnessThe technique landscape and street photographers use to get the most depth of field a lens can give — explained with real numbers, plus where it falls short.
- The exposure triangle explainedThree settings, one brightness. Once you think in stops, trading aperture for shutter speed or ISO becomes simple arithmetic — and you can choose the look you want instead of accepting the camera’s guess.
- ND filters and long exposures: a practical guideTurn crashing waves into mist and moving clouds into streaks, in broad daylight. Here is how neutral density filters work, how to work out the exposure, and how to avoid the classic mistakes.
- Crop factor explainedA 50 mm lens is always a 50 mm lens — but put it on different cameras and it frames, blurs and performs differently. Here is what crop factor changes, and what it doesn’t.
- 500 rule vs NPF rule for sharp starsBoth rules answer the same question — how many seconds before the stars start to streak? — but they can disagree by a factor of two or more. Here is why, and which to trust.
- The depth of field formula, with worked examplesEvery depth of field calculator, lens scale and app uses the same three equations. Here they are, what each symbol means, and three examples worked through number by number.
More photography calculators
- Hyperfocal distance calculatorWhere to focus so everything to infinity is sharp
- Equivalent exposure calculatorTrade aperture, shutter and ISO at the same brightness
- ND filter calculatorLong exposure times for ND8 to ND64000, with a timer
- Crop factor calculatorEquivalent focal length, aperture and field of view
- 500 rule & NPF calculatorLongest exposure for pinpoint stars
Frequently asked questions
What is depth of field?
Depth of field (DoF) is the range of distances in front of and behind the point you focus on that still looks acceptably sharp in the final photo. Sharpness falls off gradually, so calculators define "acceptably sharp" with a circle of confusion: the largest blur spot the eye still sees as a point.
What affects depth of field?
Four things: aperture (a smaller f-number such as f/1.8 gives less depth of field than f/8), focal length (longer lenses give less), focus distance (closer focus gives much less) and sensor size, which changes the circle of confusion and the focal length you need for the same framing.
What circle of confusion does this calculator use?
The sensor diagonal divided by 1443: 0.030 mm for full frame, 0.020 mm for APS-C, 0.019 mm for Canon APS-C and 0.015 mm for Micro Four Thirds. These match DOFMaster and most lens distance scales and assume an 8 × 10 inch print viewed from about 25 cm. For pixel-level sharpness on a high-resolution sensor, enter half the value under Advanced.
Where is the focus distance measured from?
From the sensor, which is marked on many camera bodies with a circle crossed by a line (⦵). At normal shooting distances the difference between measuring from the sensor and from the front of the lens is negligible; at close range, measure carefully.
Is there more depth of field behind the subject than in front?
Usually. At moderate distances roughly one third of the sharp zone is in front of the subject and two thirds behind. Up close the split approaches 50/50, and when you focus at the hyperfocal distance everything behind the subject is sharp all the way to infinity.
Do crop-sensor cameras have more depth of field?
For the same framing and the same f-number, yes: a smaller sensor needs a shorter focal length to frame the same shot, which increases depth of field by about the crop factor. With the same lens at the same distance, a crop sensor actually gives slightly less depth of field, but it also frames the scene more tightly.
Does it work for macro photography?
The formulas are accurate when the subject is more than about ten focal lengths away. At macro magnifications (close to 1:1) depth of field is measured in millimetres and is better estimated from magnification: total DoF ≈ 2 × N × c × (m + 1) / m².