Works on this device
Landscape Depth of Field Planner
In a landscape photo you often want everything sharp, from a rock near your feet to the hills far away. Find where to focus and the f-number you need, or plan a focus stack when one shot is not enough.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use this planner
- Choose what you want to plan: Hyperfocal distance, Focus and aperture for a near and a far point, or Focus stacking.
- Type the real focal length of the lens. Type distances from the lens; leave the far distance empty for the horizon (infinity).
- Choose your sensor size from the list, or type the circle of confusion yourself.
- Choose Calculate. The table lists the result at other apertures, or the focus distance of each shot of a stack.
The formulas
- Hyperfocal distance: H = f² ÷ (N × c) + f, with f the focal length, N the f-number and c the circle of confusion. Focused at H, everything from H ÷ 2 to infinity is sharp. H is the shortest focus distance that keeps infinity sharp.
- Near and far limits when focused at s: near = s × (H − f) ÷ (H + s − 2f); far = s × (H − f) ÷ (H − s) when s is less than H, otherwise infinity. These are the same formulas as in the Depth of Field Calculator.
- Focus for a near point n and a far point F: s = 2 × n × F ÷ (n + F). With the far point at infinity this is s = 2 × n: focus at twice the distance of the nearest point.
- Smallest f-number for both points: N = f² ÷ (c × K), with K = 2 × (s − f) ÷ (s × (1 ÷ n − 1 ÷ F)). With the far point at infinity, K = 2n − f.
- Focus stacking: the first shot is focused at s = n × (K − f) ÷ (K − n), with K = H − f, so that it is sharp from the nearest point n. Each next shot starts where the one before ends, less the overlap you choose. A shot that would start at H ÷ 2 or farther is focused at H.
- Circle of confusion by convention: sensor diagonal ÷ 1500 (you can change the divisor).
- Diffraction spot (Airy disk) = 2.44 × wavelength × N, here for green light of 550 nm.
Worked example
A full frame sensor (36 × 24 mm) gives c = 43.27 ÷ 1500 = 0.0288 mm. A 24 mm lens at f/8 has H = 576 ÷ (8 × 0.0288) + 24 = 2,520 mm. Focus at 2.52 m and everything from 1.26 m to infinity is sharp. Focus at infinity and it is sharp only from 2.50 m.
A rock 1.5 m away and the horizon: focus at 2 × 1.5 = 3 m. The smallest f-number is 576 ÷ (0.0288 × 2976) = 6.71, so f/8 is the next full stop. Its diffraction spot (9.0 µm at f/6.71) is smaller than c.
A rock 1.5 m away and a tree 10 m away: focus at 2 × 1.5 × 10 ÷ 11.5 = 2.61 m. The smallest f-number is 5.71.
Focus stacking from 0.5 m to infinity at f/8 with 20% overlap needs 3 shots: focus at 0.619 m (sharp from 0.500 to 0.813 m), at 1.063 m (0.751 to 1.820 m) and at 2.520 m (1.260 m to infinity).
Limits you should know
- "Sharp" is a judgement. The circle of confusion is a convention for a usual print size and viewing distance. For big prints or close viewing, use a smaller value.
- The formulas use a thin lens and measure distances from the lens. Cameras measure focus distance from the sensor mark, so very close distances differ a little.
- Focus scales on lenses are often not exact. Check the near and far points on the camera screen with magnification.
- At small apertures (large f-numbers) diffraction softens the whole picture. The planner shows the diffraction spot, so you can see when focus stacking is the better plan.
- The planner gives the focus distances. It does not merge photos: for that, use a focus stacking program such as the Image Focus Stacker.
- Sensor sizes in the list other than 36 × 24 mm are nominal examples. Type the size from your camera's data for an exact answer.