What Is Depth of Field?
Depth of field (DOF) is the distance range within which objects in a photograph look acceptably sharp. It is controlled by three factors: aperture, focal length, and focus distance. A wide aperture such as f/1.8 produces a shallow depth of field with creamy background bokeh — ideal for portraits — while a narrow aperture like f/11 keeps both foreground and background sharp for landscape and architecture work. Your camera sensor size matters too: smaller sensors (higher crop factor) deliver deeper depth of field at the same framing.
How to Use This Depth of Field Calculator
Select your camera sensor (or enter a custom crop factor), then set your focal length, aperture, and focus distance. Results update instantly — no button needed. The calculator shows the near limit and far limit of sharpness, the total depth of field, and a visual sharpness range so you can see exactly how much of your scene will be in focus. Switch between meters and feet at any time. Common focal lengths (24mm, 35mm, 50mm, 85mm) are one tap away.
Understanding Hyperfocal Distance
The hyperfocal distance is the focus distance at which everything from half that distance to infinity appears sharp. Focusing at the hyperfocal point maximizes depth of field — the far limit reaches infinity while the near limit drops to half the hyperfocal distance. This is the classic landscape photography technique: set a narrow aperture, focus at hyperfocal, and get foreground flowers and distant mountains sharp in one frame. When your focus distance is at or beyond hyperfocal, this calculator shows the far limit as ∞.
How the Depth of Field Formula Works
This calculator uses the standard thin-lens depth of field equations found in optical engineering references. With N = aperture (f-number), c = circle of confusion, f = focal length and s = focus distance, the hyperfocal distance is:
H = f² / (N × c) + f
The near and far limits of acceptable sharpness are:
near = H × s / (H + (s − f))
far = H × s / (H − (s − f))
Total depth of field is simply DOF = far − near. When the focus distance reaches or passes the hyperfocal distance, the far limit becomes infinity (∞), which is why the calculator displays ∞ for landscape shots focused near or beyond hyperfocal.
The circle of confusion sets how large a blur spot may be while still looking like a sharp point. This tool uses the classic full-frame reference of 0.030 mm and divides it by the crop factor — 0.020 mm for APS-C (1.5×), 0.015 mm for Micro Four Thirds (2×) and 0.038 mm for medium format (0.79×). You can also enter any custom crop factor, for example for a compact camera or smartphone.
Depth of Field Tips for Photographers
Portraits: at f/1.4–f/2.8 the depth of field at eye-level focusing distance can be only a few centimetres deep. Focus on the nearest eye — if it is soft, nothing else in the frame matters.
Landscapes: f/8–f/11 combined with hyperfocal focusing usually gives all the front-to-back sharpness you need. Stopping down to f/22 rarely improves anything because diffraction softens the whole image.
Groups and events: focus roughly one-third of the way into the row of people. Depth of field always extends farther behind the focus plane than in front of it.
Macro work: at 1:1 magnification even f/16 leaves a slice of focus measured in millimetres. Focus stacking — blending multiple frames at slightly different distances — is the standard solution.