InfyCalculator
🎯

Photography Depth of Field (Aperture) Calculator

Choose the aperture you need for a wanted depth of field: enter focal length, subject distance and the sharp zone you want, and get the f-stop to set.

Focal length
Subject distance
Depth of field wanted
Sensor format
Loading calculator…

How it works

DOF ≈ 2 · N · c · s² ÷ f² (subject well within hyperfocal) · rearranged: N = DOF · f² ÷ (2 · c · s²), where N is the f-number, c the circle of confusion, s the subject distance and f the focal length

Usually depth-of-field tools go one way — pick an aperture, read the sharp zone. This one runs it in reverse: you decide how deep you want the sharp zone and it tells you which f-stop delivers it. It uses the standard thin-lens approximation, valid when the subject sits well inside the hyperfocal distance, where depth of field grows in proportion to the aperture number and the square of the subject distance and shrinks with the square of focal length. That is why moving closer or using a longer lens collapses depth of field fast, and why you must stop down hard to keep both a near and a far subject sharp.

Worked example

On a full-frame body (CoC 0.030 mm), a 50 mm lens focused at 3 m to keep 0.5 m of depth: N = (500 mm × 50²) ÷ (2 × 0.030 × 3000²) = 1,250,000 ÷ 540,000 ≈ 2.3, so f/2.8 is the nearest standard stop that reaches it.

Sources: Depth of field (Wikipedia)

Frequently asked questions

Why does the answer round up to a standard f-stop?

Lenses click to whole or third stops, and rounding up to the next standard number guarantees at least the depth of field you asked for. The exact figure is shown too so you can dial a third-stop in between if your lens allows.

When is this approximation valid?

When the subject is well within the hyperfocal distance — typical portrait and product distances. Very close macro work or focusing near infinity needs the full hyperfocal equations rather than this linear approximation.

How do I get more depth without stopping down further?

Step back from the subject or switch to a shorter focal length. Both increase depth of field for the same aperture, because depth grows with distance squared and shrinks with focal length squared.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.