Hyperfocal Distance Calculator

A wind-rippled sand ridge running toward a low sun, with the ripples in the near sand and the far dunes on the horizon both in focus
Photo: Windswept Ridges at Great Sand Dunes by Duncan Rawlinson. 24mm, f/18, 1/400, ISO 100. Shot at 24mm, f/18, 1/400 second, ISO 100: a wide lens and a small aperture keep the near ripples and the far horizon sharp together, the situation this calculator plans for (on a full-frame sensor the hyperfocal distance for these settings is about 1.1 m).

The hyperfocal distance is the one focus distance that makes the most of your depth of field: set it, and everything from half that distance out to the horizon is acceptably sharp. Enter a focal length, aperture and sensor size below and the calculator tells you where to put focus and how close the sharp zone starts.

Find where to focus

Set the three inputs, press the button, and read three results: the hyperfocal distance, the nearest sharp distance and the sharp range. Switch to feet if you pace out distances in feet.

Results

Hyperfocal Distance --
Nearest Sharp Distance --
Sharp Range --
Focus Zone When Set to Hyperfocal
Camera Infinity

Want the near and far limits for a focus distance of your own? The depth of field calculator works them out.

Reading the three results

  • Hyperfocal distance. Where to focus. Focused here, the far limit lands exactly at infinity. The number grows with the square of the focal length and shrinks as you close the aperture, so a longer lens needs a much farther focus point.
  • Nearest sharp distance. Always half of the hyperfocal distance. This is the number to compare with your foreground: if the nearest thing you want sharp is closer than this, these settings will not do it.
  • Sharp range. The nearest sharp distance to infinity, spelled out. The bar under it is a sketch: the green zone is the back half, and it is not drawn to scale.

The calculator answers one question: with these settings focused at the hyperfocal distance, how close does sharpness start? Everything else on the page is about turning that into a decision in the field. The idea behind the number, and why focusing short of infinity works, is on hyperfocal distance.

Want the idea behind the number before you set it? What is hyperfocal distance explains why focusing short of infinity gains depth.

Choosing settings from your foreground

Most photographers use the calculator backward. Start from the nearest object you want sharp, then pick settings that put half the hyperfocal distance at or inside it.

Suppose a rock sits 1 m from the lens and you want the rock and the horizon sharp, on full frame at 24 mm. At f/8 the hyperfocal distance is 2.42 m and the nearest sharp distance is 1.21 m, so the rock is just outside the zone. At f/11 the figures are 1.77 m and 0.88 m, and the rock is inside. At f/16 they are 1.22 m and 0.61 m. You have three options: close the aperture, use a wider lens, or move back from the rock. You will often choose the last, because f/16 starts to cost you in diffraction, and a wider lens also changes the composition.

This table gives the numbers for full frame so you can check the calculator and plan before you go out. Distances are in meters.

Focal lengthf/8 hyperfocalf/8 nearest sharpf/11 hyperfocalf/11 nearest sharp
16 mm1.080.540.790.40
24 mm2.421.211.770.88
35 mm5.142.573.751.87
50 mm10.475.237.633.81
Full-frame values from H = f squared / (N x 0.03) + f. Doubling the focal length roughly quadruples the hyperfocal distance.

The sharp bite out of the foreground shrinks quickly on a wide lens: at 16 mm and f/8 sharpness starts about half a meter away, and at 50 mm it starts more than five meters away. That is why a wide lens is the default for landscapes with something close to the camera. On a smaller sensor the blur limit is smaller, so for the same lens the hyperfocal distance is longer: a 24 mm lens at f/8 gives 3.62 m on the Nikon and Sony style APS-C choice in the tool, against 2.42 m on full frame. Smaller-sensor users usually get the same framing from a shorter lens, which brings the distance back down. Sensor size has the reasons.

What "acceptable sharpness" assumes

The whole calculation rests on one assumption: that a point of light may spread into a blur spot of a certain size before you call it unsharp. This size, the circle of confusion, is a convention. A common one sets it near one 1,500th of the sensor's diagonal, which comes to about 0.03 mm on full frame. That is the value the calculator uses for full frame.

What does 0.03 mm mean on your camera? On a 24 megapixel full-frame sensor the pixels are about 0.006 mm wide, so the blur is about five pixels across at the edge of the zone. On a 45 megapixel sensor the pixels are smaller and the same blur covers about seven. The convention was set for a modest print viewed at arm's length, not for a screen at 100%. Two consequences follow.

  • If you print large or look at every pixel, the true zone is tighter than the calculator says. Halve the blur limit and the 24 mm, f/8 full-frame hyperfocal distance doubles to 4.82 m, with the nearest sharp distance at 2.41 m.
  • The calculator cannot show this, so you do it yourself: for a critical image, plan as if the foreground limit is farther than the tool says (keep the foreground well outside the "nearest sharp" figure) or use a wider lens or smaller aperture to bring it in.

The numbers are a good plan for ordinary viewing. They are not a guarantee about the corner of a large print.

Why does the sensor setting change the answer? Circle of confusion explains the blur limit the calculator uses for each format.

Setting the focus distance in the field

A number is only useful if the lens can be set to it. These methods work from most to least reliable.

  • Focus on something at that distance. Pace out or judge the distance, put a bag, a stone or a person there, focus on it in live view with magnification, then switch to manual focus so it cannot move, and recompose. This is the method that does not depend on the lens markings.
  • Use the distance scale. Where the lens has one, set the hyperfocal value against the mark. Many scales are coarse and some modern lenses have none, so treat it as a rough setting.
  • Focus a little past it. At the exact hyperfocal distance, infinity is only just inside the limit. Focusing about 15 to 20 percent farther gives the far scene a margin and costs a small amount at the near end: for 24 mm at f/11, a focus at 2.1 m instead of 1.77 m moves the nearest sharp distance from 0.88 m to 0.96 m.
  • Mark your usual setting. If you always use the same lens and aperture, work it out once, find it on the ring and mark it with tape.

Autofocus is a poor fit here, because it focuses on whatever is under the point. Set focus on a thing at the right distance, then stop touching it; the back button focus setup makes this easy. For the instinctive, camera-up-and-shoot version, see zone focusing.

Want to set focus once and stop thinking about it? Zone focusing shows how to read the distance scale and pre-focus.

When not to use the hyperfocal distance

The hyperfocal approach is an answer to "everything from here to infinity". It is the wrong tool when that is not the question.

  • The foreground is very close. A flower 30 cm from a 24 mm lens needs a nearest sharp distance of 30 cm, which means a hyperfocal distance of 60 cm, which no setting on a full-frame 24 mm lens gives (even f/22 is 0.90 m). Either move back, or shoot a focus stack: focus stacking takes frames at several focus distances and merges them.
  • The background is meant to be soft. If there is a subject and you want the distance blurred, you are in the world of the depth of field calculator and bokeh, not here.
  • The far subject needs the best possible sharpness. The hyperfocal point puts the horizon at the edge of acceptable. If it is the star of the picture, focus on it and give the foreground less.
  • A long lens. At 200 mm and f/8 the hyperfocal distance is about 167 m. The idea works, but the numbers become useless in practice.
  • Tiny apertures to shorten the distance. Past a point, diffraction softens everything, including the parts that are "sharp".

Nearest sharp distance still behind your foreground? Focus stacking explains how several frames cover more depth than one.

See it and try it

Test your eye first: pick the photo you think is sharp from the foreground to the horizon, then read why.

Which photo is sharp from the foreground to the horizon?
Photo: Sunset at Ladyfinger Peninsula by Duncan Rawlinson Photo: Delicate Grass with Blurred Mountain by Duncan Rawlinson

Now try it in the simulator: get the nearest rocks and the far horizon both sharp without going past f/16, choosing the aperture and the focus distance yourself.

Hyperfocal Distance Calculator
Photo: Great Sand Dunes Sunrise by Duncan Rawlinson

A scene like this one, with texture at your feet and a far ridge, is the case the calculator was made for. Pairing it with a strong near element is covered in foreground interest, and the rest of the approach is in landscape photography.

Common mistakes with hyperfocal focusing

  • Focusing on the horizon. Infinity wastes the zone behind it. Focus at the hyperfocal distance, or a little past it.
  • Not checking the near limit against the foreground. The hyperfocal distance alone does not tell you whether your foreground is in the zone. Compare the nearest sharp distance with the closest thing you care about.
  • Treating the result as exact. It is a plan built on a blur convention. Leave margin, and check a frame at 100%.
  • Letting autofocus move it. If you half-press with autofocus on, the camera refocuses. Switch to manual focus or use back button focus once the distance is set.
  • Using the wrong units. The unit toggle changes only the display. If you paced out distance in feet, make sure the results are in feet too.
  • Reaching for f/22. The extra depth is small and the diffraction cost is real.

Try this: put the focus point where you worked it out

This takes about 10 minutes with any camera that has manual focus, on a street, a path or a field with something close and something far.

  1. Choose a foreground object (a fence post, a stone or a sign) about 1.5 m from the camera, and a far object such as a building or tree line.
  2. Use your focal length and an aperture of f/8 or f/11 in the calculator and write down the hyperfocal distance and the nearest sharp distance.
  3. Pace out or judge the hyperfocal distance, put something there, focus on it in live view, then switch to manual focus.
  4. Shoot, then shoot again focused on the far object, and again focused on the near one.

Zoom in on the foreground post and the far object in each frame. The first frame should have both reasonably sharp, if the nearest sharp distance was under 1.5 m. The second should have a soft foreground, and the third a soft background. If the first frame disagrees with the calculator, move the focus point a little farther away and try again.

Hyperfocal distance calculator questions

Why is the nearest sharp distance always half of the hyperfocal distance?

Because that is how the geometry works out when you focus at the hyperfocal distance. The near limit lands at H divided by two. Focus beyond it and the near limit moves away; focus closer and the far limit falls short of infinity.

Is it fine to just focus about a third of the way into the scene?

It is a rough rule that works when the scene is far and you have no calculator, and it can put focus on the wrong side of the hyperfocal distance when the scene is near. It is a start. The calculator replaces the guess.

Does the hyperfocal distance change if I crop the photo later?

The calculator assumes you view the whole frame. A heavy crop is the same as a larger print from a smaller part of the sensor, so the zone is effectively tighter. Plan with a stricter blur limit if you expect to crop.

Does it work for street photography?

Yes. Pre-focusing at the hyperfocal distance with a moderate aperture lets you shoot without waiting for autofocus, and everything from half that distance onward is sharp. Street photography and zone focusing build on it.

Which setting should I trust, the lens scale or the calculator?

Trust a test frame over either. Use the calculator for the number, the scale or live view to set it, and check the result at 100% once.

Want to check you can place focus for the most depth and know when diffraction bites? Try the hyperfocal distance and depth of field quiz.