Depth of Field Calculator
Work out the depth of field, near and far limits and the hyperfocal distance for any lens and aperture, with the circle of confusion matched to your sensor.
About this tool
Depth of field is the band of distance in front of and behind your subject that still looks sharp. It is not a hard edge — sharpness falls off gradually — but we define it by how much blur is still small enough to pass unnoticed, and that threshold is the circle of confusion.
The circle of confusion is where most online calculators go wrong. They fix it at 0.03 mm, which is the usual value for full frame, and then apply it to every sensor. But a smaller sensor needs a smaller circle to look equally sharp, so the same lens and aperture give a narrower depth of field on a crop body. This calculator sets the circle of confusion from the sensor diagonal using the Zeiss standard of one part in 1500, so the answer changes when you change format, exactly as it physically should.
The hyperfocal distance is the second thing worth knowing. Focus at that distance and everything from half of it to infinity is acceptably sharp — the classic move for landscapes and street photography. The formula also explains a detail some calculators miss: once you focus at or beyond the hyperfocal distance, the far limit is infinity, not some very large number.
How the circle of confusion is set for each sensor
The circle of confusion is the sensor diagonal divided by 1500, the Zeiss convention, so choosing a format changes the answer. Full frame lands at about 0.0288 mm rather than the 0.03 mm most tables quote; APS-C gets 0.0189 mm and Micro Four Thirds 0.0144 mm.
The rule is one line of arithmetic: take the sensor diagonal, divide by 1500, and that is the blur spot the format tolerates while still looking sharp. Full frame measures 43.27 mm corner to corner, which gives 0.0288 mm — the familiar 0.03 mm is the same figure rounded up. Across the seven formats offered, the value runs from 0.0051 mm on a 1/2.3-inch compact to 0.0367 mm on 44 × 33 medium format, a factor of seven.
Deriving the value from the diagonal rather than storing one number per format has a practical consequence: adding a sensor means adding its two dimensions, and the circle of confusion follows on its own. It also keeps the entries consistent with one another, which hand-assembled tables rarely are.
The field can be filled in by hand as well, and a typed value then takes priority over the format. That is the escape hatch for the case the diagonal rule cannot know about: deciding what counts as sharp for a particular print size or viewing distance, where the acceptable blur is a judgement rather than a property of the sensor.
When a focus distance is too close to compute
A focus distance at or inside the focal length has no solution, so the tool refuses rather than returning a number. A 50 mm lens therefore needs more than 0.05 m in that field, and a 200 mm lens more than 0.2 m.
The geometry has one precondition: the subject must be further away than the focal length. At exactly the focal length the image distance equals the focal length and the magnification runs away; closer than that, the lens cannot form a real image at all. Dividing by a denominator that has reached zero is where a naive implementation quietly returns a negative distance or an enormous one, so this one raises an error instead.
In practice you meet the limit only in extreme close-up work or through a slipped decimal point. The field is in metres and the threshold is under a metre for every common focal length — 0.05 m at 50 mm, 0.085 m at 85 mm, 0.2 m at 200 mm — so anything that trips it is either unphysical or a typo.
The typo is the likelier case. Half a metre at 50 mm is a real, very tight working distance that leaves about four centimetres of depth of field; five centimetres at the same focal length is not a photograph any lens can take, and saying so beats printing a near limit of zero.
Why the hyperfocal distance grows with the square of the focal length
Hyperfocal distance is roughly focal length squared divided by aperture times the circle of confusion. Double the focal length at the same aperture and it moves four times further out: 10.9 m at 50 mm f/8 becomes 43.4 m at 100 mm.
The formula is the focal length squared, over the aperture times the circle of confusion, plus the focal length itself. The focal length enters squared while the aperture and the blur limit enter linearly, and that asymmetry is why telephoto lenses have enormous hyperfocal distances while wide lenses have small ones: the term that grows fastest is the one you change by swapping lenses.
Two examples on full frame make it concrete. A 50 mm lens at f/8 is hyperfocal at 10.9 m, so focusing there keeps everything from about 5.4 m to infinity sharp. The same aperture at 100 mm pushes that to 43.4 m with a near limit around 21.7 m, which is why a long lens is the wrong tool for a landscape you want sharp from front to back.
The trailing term is the one that is easy to drop, and it is not decoration: at infinity focus the image distance equals the focal length rather than zero. It is small next to the leading term, but every limit on the result card is derived from the hyperfocal distance, so leaving it out shifts all of them.
Depth of field is not split evenly front and back
At 50mm and f/8 on full frame, the near side holds 48% of the depth at a 0.5 m focus distance and only 4% at 10 m. The familiar one-third front, two-thirds behind rule is an approximation that holds near a 3.5 m focus distance with these settings.
The two limits are asymmetric by construction: near is s(H−f)/(H+s−2f) and far is s(H−f)/(H−s). For the same focus distance one denominator adds and the other subtracts, so the far side is always longer, and increasingly so.
In numbers, at 50mm and f/8 on full frame with a hyperfocal distance of 10.88 m: focusing at 0.5 m gives 0.480 to 0.522, which is 48% front and 52% behind, almost even. At 3 m it becomes 36% against 64%. At 10 m the near side is 4% and the far side takes 96%.
The rule of thumb is therefore not wrong, only conditional — with these settings it is accurate near 3.5 m. At close range it understates the front, and for distant landscape work it badly understates the back. This page gives both distances in metres so no memorised rule is needed.
Pushed to the limit there is one more exact statement: once the focus distance reaches the hyperfocal distance the far limit becomes infinity, and the near limit is exactly half the hyperfocal distance. A hyperfocal distance of 10.88 m gives a near limit of 5.44 m, which is where that sentence about focusing at hyperfocal comes from.
Frequently asked questions
What is the circle of confusion?
It is the largest blur spot that still looks like a point to the viewer at a normal viewing distance. Anything blurred less than this counts as sharp. It depends on the sensor size and the final print, which is why this calculator derives it from your format rather than fixing it at one value.
Why does my crop sensor give less depth of field?
Because its circle of confusion is smaller. To look equally sharp, a smaller sensor tolerates less blur, so the range of acceptably sharp distances narrows. Photographers often notice the opposite, but that is a different comparison — same framing, moved further back — where the crop body actually gives more depth of field.
What is the hyperfocal distance?
It is the closest focus distance at which the far limit reaches infinity. Focus there and everything from half that distance to infinity is acceptably sharp. It is the standard trick for maximising sharpness in landscapes when you cannot easily judge focus on a distant subject.
Why is the far limit sometimes infinity?
Once the focus distance reaches the hyperfocal distance, the far limit has already run off to infinity — the maths divides by a quantity that has reached zero. Any calculator that still shows a finite number there is quietly wrong. This tool shows the infinity symbol instead.
Does the aperture change depth of field?
Yes, strongly. Stopping down raises the f-number, which makes the aperture smaller and deepens the depth of field. Opening up does the reverse and gives the shallow, blurred background that portraits rely on. Changing the aperture does not move the hyperfocal distance for a given lens — only the focus distance and the aperture do, along with the format.
Related tools
Turn a shutter speed and an ND filter into the exposure time you actually need — entered as filter number, density or stops, and snapped to the nearest setting on a real shutter dial.
Find the golden hour, blue hour, sunrise, sunset and twilight times for any date and place — with the direction of the sun, so you know which way to shoot.
Fit a clip into a target aspect ratio and see exactly what gets cropped or letterboxed — for both cover and contain — with the crop rectangle and the loss in pixels. Runs entirely in your browser.