Clack

Depth of field calculator

How much is sharp, and the hyperfocal distance. Free, in your browser.

Sensor size
As marked on the lens.
Units
Sharp from

7.8–13.8ft

Total
6.0 ft
In front
2.2 ft
Behind
3.8 ft
Hyperfocal
35.8 ft
7.8 ft – 13.8 ft1 ft25102050100∞H

Drag the person to focus. Things outside the lit zone are blurred by as much as their blur circle exceeds the circle of confusion. Thin-lens math; distances from the lens.

Then everything from 17.9 ft to infinity is sharp.

Guide · Updated

Depth of field is the stretch of distance in a photo that looks sharp. Only one distance is in exact focus; the zone around it that still looks sharp widens as you close the aperture, back away from the subject, use a shorter lens or use a smaller sensor. Enter a format, focal length, f-number and distance above to get the near and far limits, the total depth and the hyperfocal distance. It runs in your browser; nothing is uploaded.

01 · What changes it

What changes depth of field

Four things, and the circle of confusion you hold the result to:

ChangeDepthWhy
Wider aperture (smaller f-number)ShallowerThe blur circles grow in proportion to the opening. One stop (f/8 to f/11) shrinks the hyperfocal distance by a factor of 1.4.
Closer subjectShallowerAt ordinary distances the depth grows with about the square of the subject distance: half the distance, a quarter of the depth.
Longer focal lengthShallowerThe hyperfocal distance grows with the square of the focal length: 100 mm at the same f-number has four times the hyperfocal distance of 50 mm.
Bigger format, same framing and f-numberShallowerFilling the frame the same way on a bigger sensor takes a longer lens (or a farther step back) at the same f-number, and the depth falls roughly with the crop factor.
A looser circle of confusionDeeperYou accept a bigger blur as sharp: a smaller print, a farther viewer, a lower-resolution screen.

The bigger-format row is the one that surprises people. A smaller format is not shallower: at the same framing, f-number and subject distance, it is deeper, roughly in proportion to its crop factor. That is why a Micro Four Thirds camera (crop factor 2) at f/2.8 has about the depth of a full frame camera at f/5.6 for the same framing, and why medium format gives the shallowest depth of the formats here.

The circle of confusion

A point that is out of focus is drawn as a small disc. The circle of confusion is the largest disc you still call sharp. It is a convention, not a measurement: it depends on how big the picture is shown and how closely it is looked at. This calculator uses the frame’s diagonal divided by 1500 (0.029 mm on full frame), a common convention, and shows the value so you can change it. Many tables round full frame to 0.030 mm, which gives nearly the same answers.

02 · Hyperfocal

Hyperfocal distance and how to use it

Focus at the hyperfocal distance and the far limit of sharpness is infinity; the near limit is half that distance. It is the setting that makes the most of a lens when you cannot refocus: street photography, landscapes, a camera pre-set for a quick shot. The formula is H = f² ÷ (N × c) + f.

  1. Pick the lens and aperture. Set the focal length and the f-number you will shoot at. The smaller the aperture opening (the larger the f-number), the closer the hyperfocal distance.
  2. Read the hyperfocal distance. Enter them in the calculator above. For a 50 mm lens at f/8 on full frame it is 10.9 m (35.7 ft), by the frame diagonal over 1500 (our arithmetic).
  3. Focus there. Set the focus ring to that distance, by the scale on the lens, by pacing it off, or by focusing on something that far away and not touching the ring again.
  4. Know what is sharp. Everything from half the hyperfocal distance to infinity is acceptably sharp. At 10.9 m, that is from 5.44 m out.
  5. Stop down for more. If the near limit is not close enough, close the aperture: each stop deepens the zone by about 1.4 times. Or accept some softness at the far end and focus a little nearer.

03 · Worked examples

Depth of field at 3 meters on full frame

A 35 mm and a 50 mm lens on a full frame camera, focused at 3 m (9.8 ft), at three apertures. Our arithmetic with this page’s formulas and a circle of confusion of 0.0288 mm.

LensApertureNear limitFar limitTotal depthHyperfocal
35 mmf/22.63 m (8.6 ft)3.49 m (11.4 ft)0.85 m (2.8 ft)21.3 m (69.8 ft)
35 mmf/5.62.16 m (7.1 ft)4.93 m (16.2 ft)2.77 m (9.1 ft)7.62 m (25.0 ft)
35 mmf/111.70 m (5.6 ft)12.9 m (42.4 ft)11.2 m (36.9 ft)3.90 m (12.8 ft)
50 mmf/22.81 m (9.2 ft)3.22 m (10.6 ft)0.41 m (1.3 ft)43.4 m (142 ft)
50 mmf/5.62.52 m (8.3 ft)3.71 m (12.2 ft)1.19 m (3.9 ft)15.5 m (50.9 ft)
50 mmf/112.18 m (7.2 ft)4.80 m (15.7 ft)2.61 m (8.6 ft)7.93 m (26.0 ft)

Distances are from the lens, by the thin-lens formula. Real lenses differ a little, and close up more.

04 · Phones

Why phone photos are sharp front to back

The lens on a phone is a few millimeters long, and the hyperfocal distance goes with the square of the focal length. On the phone Clack is tested on (a CMF Phone 2 Pro, main camera: 5.56 mm, f/1.88, a sensor 8.16 mm wide), the hyperfocal distance is under three meters. A 50 mm f/1.8 lens on full frame has one of 48.2 m.

By frame diagonal ÷ 1500
Circle of confusion 0.0068 mm. Hyperfocal distance 2.42 m (8.0 ft): focused there, everything from 1.21 m to infinity is sharp. This takes the sensor as 4:3, which is our assumption.
By Clack’s 3 pixels
Circle of confusion 0.006 mm, three pixel pitches (the phone’s pixels are 2 µm). Hyperfocal distance 2.75 m (9.0 ft): sharp from 1.37 m to infinity.
In full frame terms
The sensor’s diagonal is 4.2 times shorter than full frame’s, so this lens frames like a 24 mm lens and has about the depth of field of f/8 on full frame (our arithmetic).

That is why a phone does not give the shallow, blurry background of a fast lens on a bigger camera, except very close up. The “portrait mode” blur you see on phones is computed: the phone estimates how far each part of the picture is and blurs the background in software. It is not the lens’s depth of field, which stays deep. Clack has no portrait mode: what you see is the lens’s own depth of field.

05 · Clack

Depth of field in Clack

Clack is a film camera app for Android and iPhone. Where the phone’s camera offers manual focus, it has a focus ring that shows the same thing as this calculator, live, for the distance you set.

The ring
A tape marked in meters, linear in lens travel like a lens barrel, with a bracket across the sharp band and the band written beside it (for example “1.4 m – ∞”). Past infinity it goes back to autofocus.
The band
Computed from the distance you set, with the formulas on this page and a circle of confusion of 3 pixels. On the tested phone, with its fixed f/1.88, the hyperfocal distance is 2.75 m.
Zone focus
Set a distance once (1.5 m, or the hyperfocal distance) and shoot without waiting on autofocus; the ring stays where you left it.
Approximate
The tested phone reports its focus distance as uncalibrated, so the meter marks are approximate. The phone’s own focus range uses a stricter criterion (a hyperfocal distance near 10 m); Clack draws the 3-pixel band because the stricter one would leave no usable zone.

Manual focus appears only on phones whose camera offers it. On the others focus is automatic, with tap to focus.

Android · iPhoneComing soon to Google Play and the App Store. More about Clack

Questions

What is depth of field?
The range of distances in a photo that looks acceptably sharp. Only one distance is in exact focus; sharpness falls off smoothly in front and behind, and depth of field is how far you can go before the blur is big enough to see at the size the picture is viewed.
How do you calculate depth of field?
With 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), which is infinity when s reaches H. The calculator above does this arithmetic. The formulas are the thin-lens approximation.
What is the hyperfocal distance?
The nearest focus distance at which the far limit of sharpness is infinity. Focused there, everything from half that distance to infinity is acceptably sharp.
What circle of confusion should I use?
There is no single right value; it depends on how large the picture is shown and how closely it is looked at. A common convention is the frame diagonal divided by 1500, which is 0.0288 mm on full frame, and it is what the calculator starts from. A stricter (smaller) value gives a shallower depth and a farther hyperfocal distance; a looser one gives the opposite. Edit the value in the calculator to see it.
Does a smaller sensor give more depth of field?
At the same framing, the same f-number and the same subject distance, yes: roughly in proportion to the crop factor. A phone’s sensor is about 4.2 times smaller across the diagonal than full frame (assuming a 4:3 sensor, our arithmetic), so its f/1.88 behaves like about f/8 on full frame at the same framing.
Why is everything sharp in phone photos?
A phone’s lens is short and its sensor small. The hyperfocal distance goes with the focal length squared, so a 5.56 mm lens at f/1.88 has one of about 2.42 m on the tested phone, while a 50 mm f/1.8 lens on full frame has one of about 48.2 m.
Is portrait mode real depth of field?
No. Portrait modes estimate how far each part of the picture is (from a second lens, focus pixels or a trained model, depending on the phone) and blur the background in software. The lens’s own depth of field stays deep.

Sources

Every figure on this page is our arithmetic with the formulas above, not a measurement. The phone’s optics are the CMF Phone 2 Pro’s as Clack reads them.

More free tools