Browse all tools
Photo and videoCategory overviewPrint Size CalculatorDepth of Field CalculatorCrop Factor and Equivalent Focal Length CalculatorND Filter Exposure CalculatorFlicker-Free Shutter Speed CalculatorTimelapse CalculatorVideo File Size and Bitrate CalculatorAspect Ratio Calculator
Image filesCategory overviewImage Resizer and ConverterPNG to JPG ConverterJPG to PNG ConverterWebP to JPG ConverterJPG to WebP ConverterPNG to WebP ConverterHEIC to JPG ConverterEXIF Metadata Remover
Color and screensCategory overviewColor Converter and Contrast CheckerColor Palette Extractor and GeneratorColor Screen GeneratorDead Pixel TestScreen Refresh and Flicker TestBroken Screen Simulator
Everyday toolsCategory overviewUnit ConverterPercentage CalculatorOnline StopwatchExam Timer

More

All guidesAbout

Depth of Field and Hyperfocal Distance: A Practical Guide

Depth of field is the zone in front of and behind your focus point that looks acceptably sharp. Controlling it is one of the biggest creative choices in photography.

What controls depth of field

  • Aperture. A smaller opening (a higher f-number such as f/11) gives more depth of field. A wide opening (f/1.8) gives very little.
  • Focus distance. The farther away you focus, the deeper the zone of sharpness.
  • Sensor size. Larger sensors give shallower depth of field at the same framing and aperture.
  • Focal length. At the same distance, longer lenses give less depth of field. If you keep the subject the same size in the frame by moving, the difference between focal lengths is much smaller.

Examples on a full-frame camera

Focal lengthApertureFocus distanceNear limitFar limitTotal depth of field
35 mmf/22 m1.82 m2.21 m0.39 m
50 mmf/1.82 m1.92 m2.09 m0.17 m
85 mmf/1.83 m2.94 m3.07 m0.13 m
135 mmf/2.85 m4.89 m5.11 m0.22 m
24 mmf/83 m1.34 minfinityinfinite
16 mmf/111 m0.44 minfinityinfinite

Notice how an 85 mm lens at f/1.8 produces only about 13 cm of sharpness at 3 m, while a 24 mm lens at f/8 focused at 3 m keeps everything from about 1.3 m to infinity sharp.

Hyperfocal distance

The hyperfocal distance is the closest focus distance that keeps infinity acceptably sharp. Focus there and everything from half that distance to infinity is sharp. Landscape photographers use it to maximize depth of field in one frame.

Focal lengthf/5.6f/8f/11f/16
16 mm1.5 m1.1 m0.8 m0.5 m
24 mm3.5 m2.4 m1.8 m1.2 m
35 mm7.3 m5.1 m3.7 m2.6 m
50 mm14.9 m10.5 m7.6 m5.3 m
85 mm43.1 m30.2 m22 m15.1 m
135 mm108.6 m76.1 m55.4 m38.1 m

Practical tips

  • For landscapes, f/8 to f/11 is a common sweet spot. Very small apertures such as f/22 can soften the image through diffraction, especially on high-resolution sensors.
  • The calculations assume a standard circle of confusion. For big prints viewed up close, be more conservative and focus a little closer than the hyperfocal distance.
  • If foreground elements are very close to the lens, one frame may not be enough. Focus stacking combines several shots at different focus distances.
  • For portraits, a wide aperture isolates the subject, but at very shallow depth of field, small focus errors show. Focus on the nearest eye.

Choosing an aperture by subject

SubjectStarting apertureWhy
Single portraitf/1.8 to f/2.8Separates the person from the background
Group portraitf/4 to f/5.6Keeps everyone in the group sharp
Landscapef/8 to f/11Maximizes depth while avoiding strong diffraction
Street photographyf/8 with zone focusSharp from a few meters to infinity without refocusing
Macrof/8 to f/16 or focus stackingDepth is extremely thin at close range
Product on a tablef/8 to f/11Keeps the whole object sharp

These are starting points, not rules. The right aperture also depends on the lens, the light and the look you want.

Zone focusing in practice

Zone focusing means setting the focus distance and aperture once, then shooting without refocusing. On a full-frame camera with a 35 mm lens at f/8, focusing at 3 m gives acceptable sharpness from about 1.9 m to about 7.1 m. Anything a person is likely to do in that range, such as walking past you on a pavement, is sharp. This is why street photographers often prefer wide lenses and moderate apertures.

Setting the hyperfocal distance step by step

  1. Choose your aperture and note the focal length.
  2. Look up the hyperfocal distance in the calculator or the table.
  3. Focus at that distance, using the distance scale, or focus on an object at about that distance and then switch to manual focus.
  4. Check the result on screen at high magnification, and refocus a little farther if the horizon is soft.

The trade-off at small apertures

Stopping down increases depth of field, but it also introduces diffraction, a softening that spreads light as it passes through a tiny opening. On many cameras the effect becomes visible around f/11 to f/16 and gets worse beyond that. The sharpest aperture for a given lens is often two or three stops from wide open, and for deep scenes it is better to accept f/8 to f/11 and use focus stacking if you need more depth.

Focus stacking

For macro and product work, even f/16 may not give enough depth. Focus stacking takes several pictures focused at different distances and blends the sharp parts in software. It needs a tripod and a static subject.

Common mistakes

  • Focusing at infinity for landscapes, which wastes the depth in front of the focus point.
  • Treating the limits as exact edges, when sharpness fades gradually.
  • Using the full-frame figures with a different sensor size, without correcting for it.

Try the tool

Depth of Field CalculatorFind near and far focus limits and the hyperfocal distance for your lens, aperture, distance and sensor size.

About the author. Darkroom Bench is created and maintained by Andrés, a nature photographer from Argentina with two decades in southern Patagonia and more than 50 trips to Antarctica, whose work has received international awards. Read more or follow the photography on Instagram: @yosoytato.

More guides