Depth of Field Calculator

Calculate the depth of field for your photography to achieve perfect focus. This calculator helps you determine the zone of acceptable sharpness based on your lens focal length, aperture setting, subject distance, and camera sensor size. Perfect for landscape, portrait, and macro photography planning.

The focal length of your lens in millimeters

The f-stop value (e.g., f/2.8, f/5.6, f/16)

Distance from camera to subject in meters

Select your camera sensor size

Depth of Field Formulas: Circle of Confusion (CoC) = Sensor Size / 1500 Hyperfocal Distance (H) = (f² / (N × CoC)) + f Near Limit = (s × (H - f)) / (H + s - 2f) Far Limit = (s × (H - f)) / (H - s) Total DoF = Far Limit - Near Limit Where: f = focal length (mm) N = aperture (f-number) s = subject distance (mm) H = hyperfocal distance (mm) CoC = circle of confusion (mm)
Example Calculation: Focal Length = 50mm Aperture = f/2.8 Subject Distance = 5 meters Sensor Size = Full Frame (36mm) Circle of Confusion = 36 / 1500 = 0.024mm Hyperfocal Distance = (50² / (2.8 × 0.024)) + 50 = 37.4m Near Limit = 4.52m Far Limit = 5.58m Total Depth of Field = 1.06m Depth in Front = 0.48m Depth Behind = 0.58m This means everything between 4.52m and 5.58m will be acceptably sharp.

What is depth of field in photography?

Depth of field (DoF) is the zone of acceptable sharpness in front of and behind the subject you focus on. A shallow depth of field means only a small area is in focus (great for portraits), while a deep depth of field keeps more of the scene sharp (ideal for landscapes).

How does aperture affect depth of field?

Aperture has a significant impact on depth of field. A wider aperture (smaller f-number like f/1.8) creates a shallow depth of field with a blurred background. A narrower aperture (larger f-number like f/16) creates a deeper depth of field with more of the scene in focus.

What is hyperfocal distance?

Hyperfocal distance is the focusing distance that gives you the maximum depth of field. When you focus at the hyperfocal distance, everything from half that distance to infinity will be acceptably sharp. This is particularly useful for landscape photography.

How does focal length affect depth of field?

Longer focal lengths (telephoto lenses) produce shallower depth of field, while shorter focal lengths (wide-angle lenses) produce deeper depth of field, assuming the same aperture and subject distance. This is why portraits often use 85mm or longer lenses for beautiful background blur.

Does sensor size matter for depth of field?

Yes, sensor size affects depth of field. Larger sensors (like full-frame) produce shallower depth of field compared to smaller sensors (like APS-C or Micro Four Thirds) at the same focal length, aperture, and subject distance. This is why full-frame cameras are popular for achieving creamy bokeh.