We believe math and science education should be free and accessible to everyone. Why education matters >

Depth of Field Calculator

Plan your focus before you shoot. This depth of field calculator returns the near and far limits of acceptable sharpness, total depth of field, and the hyperfocal distance for your camera, lens, aperture, and focus point. Sensor format matters: the calculator adjusts the circle of confusion automatically for full frame, APS-C, Micro Four Thirds, 1-inch, and iPhone-class sensors, so the DoF numbers match your actual camera.

How Depth of Field is Calculated

Depth of field depends on five things: sensor size (circle of confusion), focal length, aperture (f-number), and focus distance. The standard formulas are:

  • Circle of Confusion (CoC): sensor diagonal / 1500
  • Hyperfocal distance (H): f^2 / (N x CoC) + f
  • Near limit: (H x s) / (H + (s - f))
  • Far limit: (H x s) / (H - (s - f)) (infinity when s >= H)
  • Total DoF: far - near

f is focal length in mm, N is f-number, s is focus distance in mm.

Sensor Size Shifts Depth of Field

Smaller sensors have smaller circles of confusion, which pushes the DoF tighter at the same settings. A 50mm at f/2.8 and 10 feet gives about 2 feet of DoF on full frame but roughly 3 feet on APS-C because the APS-C sensor demands a smaller CoC. Micro Four Thirds at the same settings has even more DoF, and an iPhone main camera has enormous DoF because its sensor is tiny.

Hyperfocal Distance Explained

Hyperfocal distance is the closest focus point that still renders infinity acceptably sharp. Focus there and everything from half the hyperfocal distance to infinity is in focus. Landscape photographers use this constantly for maximum front-to-back sharpness. At 24mm f/8 on a full-frame camera, the hyperfocal distance is about 10 feet, so focus on something 10 feet away and everything from 5 feet to infinity reads sharp.

Camera-Specific Sensor Sizes

  • Canon full-frame (R5, R6, R8, 5D, 6D, 1DX): 36 x 24 mm
  • Canon APS-C (R7, R10, R50, 90D, Rebel): 22.3 x 14.9 mm (1.6x crop)
  • Nikon full-frame / FX (Z7, Z8, Z9, D850): 36 x 24 mm
  • Nikon DX (Z50, Z30, D7500): 23.5 x 15.7 mm (1.5x crop)
  • Sony full-frame (A7, A9, A1, FX3): 36 x 24 mm
  • Sony APS-C (A6700, ZV-E10, FX30): 23.5 x 15.6 mm
  • Fujifilm X: 23.5 x 15.6 mm (APS-C)
  • Fujifilm GFX: 44 x 33 mm (medium format)
  • Olympus / OM / Panasonic: 17.3 x 13 mm (Micro Four Thirds)
  • iPhone main camera: roughly 9.8 x 7.3 mm (1/1.28 inch type on iPhone 15/16 Pro)

Did this solve your problem?

Frequently Asked Questions

Search Calculators

Search across all calculator categories