Depth of Field Calculator — DoF & Hyperfocal Distance
Near Focus Limit
—
Far Focus Limit
—
Total Depth of Field
—
Hyperfocal Distance
—
In Front of Subject
—
Behind Subject
—
How This Calculator Works
This depth of field calculator helps photographers determine the range of acceptable sharpness in their images. Enter your camera sensor size, focal length, aperture (f-stop), and subject distance to instantly see the near focus limit, far focus limit, total depth of field, and hyperfocal distance for your setup.
The calculations use the standard thin lens DoF equations. Hyperfocal distance H = f²/(N×c), where f is focal length, N is the f-number, and c is the circle of confusion. Near limit = (s×(H-f))/(H+s-2f), and far limit = (s×(H-f))/(H-s). When the subject is beyond the hyperfocal distance, the far limit extends to infinity. The circle of confusion value is based on your selected sensor size.
Understanding depth of field is crucial for creative photography. Portrait photographers typically use wide apertures (f/1.4-f/2.8) for beautiful background blur (bokeh). Landscape photographers use narrow apertures (f/8-f/16) for front-to-back sharpness, often focusing at the hyperfocal distance. Macro photographers deal with extremely thin DoF and may use focus stacking techniques.
Frequently Asked Questions
What is depth of field in photography?
Depth of field (DoF) is the range of distance in a photo that appears acceptably sharp. A shallow DoF (like f/1.8) blurs the background, isolating the subject — great for portraits. A deep DoF (like f/16) keeps everything from foreground to background sharp — ideal for landscapes. DoF depends on aperture, focal length, subject distance, and sensor size.
What is hyperfocal distance?
Hyperfocal distance is the focus distance that gives the maximum depth of field. When you focus at the hyperfocal distance, everything from half that distance to infinity will be acceptably sharp. It is calculated as H = f²/(N×c) where f is focal length, N is f-number, and c is the circle of confusion for your sensor size.
How does sensor size affect depth of field?
Larger sensors produce shallower depth of field at the same field of view because you need a longer focal length or stand closer. A full-frame sensor has shallower DoF than APS-C or Micro Four Thirds at the same framing. This is why phone cameras (tiny sensors) keep almost everything in focus, while medium format cameras have very shallow DoF.
What is circle of confusion?
Circle of confusion (CoC) is the maximum blur spot diameter that still appears as a point to the human eye. It depends on sensor size and viewing conditions. Standard values are 0.029mm for full-frame, 0.019mm for APS-C, and 0.015mm for Micro Four Thirds. Smaller CoC gives a stricter definition of "sharp" and a shallower calculated DoF.