GenerateRandomSearch

Depth of Field Calculator

Depth of field is not a switch between sharp and blurred but a zone that fades at both ends, and the hyperfocal distance is the single most useful number in it: focus there and everything from half that distance to infinity is acceptably sharp. That is the deepest any given setting can reach, which is why landscape photographers care about it and portrait photographers deliberately avoid it.

What this generator does

Computes the hyperfocal distance from the focal length, aperture and circle of confusion, then the near and far limits of acceptable sharpness at your focus distance — reporting infinity when the far limit passes beyond it.

How to use this tool

  1. Enter your focal length, aperture and focus distance.
  2. Read the near and far limits, and the hyperfocal distance above them.
  3. Set the focus distance to the hyperfocal figure and watch the far limit become infinity.
  4. Close the aperture and watch the whole zone deepen.

Understanding the controls

Focal length
Between 8 and 800 mm. Depth of field falls sharply as focal length rises, which is why a long lens isolates a subject so effectively.
Aperture
Full stops from f/1.4 to f/22. Closing down deepens the zone, though diffraction softens the whole image past about f/16.
Focus distance
How far away your subject is. Depth of field grows quickly with distance — the same setting gives centimetres up close and metres across a field.

Common use cases

  • Working out what will be sharp before taking a landscape
  • Setting a hyperfocal focus for street photography
  • Choosing an aperture for a portrait with a specific background blur
  • Understanding why longer lenses give less depth at the same aperture
  • Checking a focus decision against the numbers

How this generator works

The check does more than recompute. It confirms the identity that defines the hyperfocal distance: focus there and the far limit must land exactly on infinity, and the near limit must sit at exactly half of it. Both are verified on every calculation, and either would catch an error in the formula that recomputation alone would miss.

Randomness and fairness

Nothing here is random. The depth of field follows entirely from the focal length, aperture and distance you enter.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • A circle of confusion of 0.03 mm is assumed, which is the usual figure for full frame. Smaller sensors need a smaller one, and the answer changes accordingly.
  • Depth of field is a judgement about acceptable blur, not a physical boundary — it depends on print size and viewing distance.
  • Diffraction softens the entire image at small apertures, which the calculation does not account for.
  • Focus breathing means a lens's actual focal length changes slightly as it focuses closer.

Privacy and your data

The optics are computed in your browser. The settings you enter are never transmitted or stored.