Focusing for Nightscape Photography: Use Hyperfocal Distance to Get Both the Foreground and the Stars Sharp
If you are only photographing stars, focusing at infinity is fine. But in a nightscape with a tree, a rock or a building in front, the foreground can end up out of focus. This guide covers the idea behind hyperfocal distance and its formula, hyperfocal distance tables by focal length and aperture, how to work out the aperture you need from the distance to your foreground, and focus stacking for when that is still not enough.
Stars can be blurry even at the infinity mark
Many lenses are designed so that when you turn the focus ring all the way to the infinity end, it stops slightly past infinity. This lets you reach true infinity even when temperature changes shift the focus point. As a result, just turning the ring to the end can leave stars slightly soft.
- 1
Put a bright star in the centre of the frame
Choose something clearly visible, such as a first-magnitude star, Jupiter or Venus.
- 2
Magnify as far as possible in live view
Raise the magnification to 5×, then 10×, until you can see the star. If it is too dark to see, raise the ISO temporarily.
- 3
Turn the ring slowly to find the smallest point
Go back and forth across the point where the star gets smaller and then larger again, and stop where it looks sharpest. Then tape the ring in place.
Focus set this way is spot on for the stars, but a tree or rock in the foreground closer than a few metres will be blurred. When you want both the foreground and the stars sharp, you use the hyperfocal distance.
What is the hyperfocal distance?
The hyperfocal distance is the distance at which, if you focus there, everything from half that distance to infinity falls within the range that looks sharp (the depth of field). Focusing at the hyperfocal distance, slightly closer than infinity, extends sharp focus to the foreground while keeping the stars sharp.
The circle of confusion is the size of blur that still looks like a point, and it assumes a typical print size. If you check high-resolution images at 100%, calculating with half the value (0.015 mm for full frame) is safer. The hyperfocal distance then roughly doubles.
Hyperfocal distance by focal length and aperture (full frame)
| Focal length | f/1.4 | f/1.8 | f/2.8 | f/4 |
|---|---|---|---|---|
| 14 mm | 4.68 m | 3.64 m | 2.35 m | 1.65 m |
| 16 mm | 6.11 m | 4.76 m | 3.06 m | 2.15 m |
| 20 mm | 9.54 m | 7.43 m | 4.78 m | 3.35 m |
| 24 mm | 13.7 m | 10.7 m | 6.88 m | 4.82 m |
| 35 mm | 29.2 m | 22.7 m | 14.6 m | 10.2 m |
The nearest sharp distance is roughly half the hyperfocal distance. At f/2.8, everything beyond about 1.2 m is sharp at 14 mm, beyond about 2.4 m at 20 mm and beyond about 3.4 m at 24 mm. Because the hyperfocal distance grows with the square of the focal length, ultra-wide lenses of 14 to 20 mm are the easiest to use for nightscapes with a large foreground.
| Camera and lens | f/1.4 to f/1.8 | f/2.8 |
|---|---|---|
| APS-C, 10 mm | 3.58 m (f/1.4) | 1.80 m |
| APS-C, 12 mm | 5.15 m (f/1.4) | 2.58 m |
| APS-C, 16 mm | 9.16 m (f/1.4) | 4.59 m |
| Micro Four Thirds, 7 mm | 1.82 m (f/1.8) | 1.17 m |
| Micro Four Thirds, 8 mm | 2.38 m (f/1.8) | 1.53 m |
| Micro Four Thirds, 12 mm | 5.35 m (f/1.8) | 3.44 m |
How depth of field shifts with the focus distance
Here is how the sharp range moves as you change the focus distance on a full-frame camera at 14 mm f/2.8.
| Focus distance | Near limit | Far limit |
|---|---|---|
| 1 m | 0.70 m | 1.73 m |
| 2 m | 1.08 m | 13.4 m |
| 2.35 m (hyperfocal distance) | 1.17 m | ∞ (infinity) |
| 3 m | 1.32 m | ∞ |
| 5 m | 1.59 m | ∞ |
| 10 m | 1.89 m | ∞ |
Focus closer than the hyperfocal distance and the stars (at infinity) fall outside the sharp range. Focus farther than it and the stars stay inside, so if you are unsure of your distance estimate, it is safer to focus a little long (1.2 to 1.5 times the hyperfocal distance). If the stars matter most, avoid erring on the near side, which risks blurring them.
Working out the aperture you need from the foreground distance
If you know how close your foreground is, choose an aperture whose hyperfocal distance is no more than twice that distance, and everything from the foreground to the stars will be sharp. The apertures needed on full frame are as follows (rounded up to the camera's 1/3-stop values).
| Distance to foreground | 14 mm | 20 mm | 24 mm |
|---|---|---|---|
| 0.5 m | f/7.1 | f/14 | f/20 |
| 1 m | f/3.5 | f/7.1 | f/10 |
| 1.5 m | f/2.2 | f/4.5 | f/7.1 |
| 2 m | f/1.8 | f/3.5 | f/5 |
| 3 m | f/1.2 | f/2.5 | f/3.5 |
Each stop you close down halves the brightness of the sky at the same exposure time. Stopping down from f/2.8 to f/3.5 to include a foreground 1 m away at 14 mm costs about 2/3 of a stop, so you need about 1.6 times the ISO. If the distance needs f/5.6 or f/8, you will get a cleaner result with focus stacking, described next, than with a single frame.
When focus will not reach: focus stacking
In compositions with a foreground within 1 m, such as flowers or rocks at your feet, hyperfocal distance alone often is not enough. In that case, take two or more frames focused at different distances and blend the sharp parts together.
- Take one frame focused on the stars, using the NPF rule time and a higher ISO
- Without moving the tripod, take one frame focused on the foreground. Shooting the foreground at a lower ISO and longer exposure keeps noise down
- Another option is to shoot the foreground first during blue hour (about 30 minutes after sunset)
- Layer the two frames in your editing software and blend the boundary with a mask
Some lenses change their field of view slightly when you refocus (focus breathing), so software that can align frames during blending makes life easier. For the overall shooting workflow, see Milky Way camera settings; for how to find the exposure time that keeps stars as points, see the difference between the NPF rule and the 500 rule.
FAQ
- What is the hyperfocal distance at 14 mm f/2.8?
- About 2.35 m on full frame (circle of confusion 0.03 mm). Focus there and everything from about 1.2 m to the stars at infinity is sharp. With the stricter standard for checking high-resolution images at 100% (0.015 mm), it is about 4.7 m, sharp from about 2.3 m.
- My nightscape foreground is out of focus. What should I do?
- Your foreground may be closer than half the hyperfocal distance. Either stop down to shorten the hyperfocal distance (f/3.5 for a foreground 1 m away at 14 mm), or take separate frames focused on the foreground and the stars and focus stack them.
- Should I focus at infinity or at the hyperfocal distance?
- Focus at infinity (the point set on a bright star) for stars only, and at the hyperfocal distance when you include a foreground. If the foreground is far enough away (beyond about 1.2 m at 14 mm f/2.8), focusing at the hyperfocal distance makes both sharp.
- Does the same calculation work for APS-C and Micro Four Thirds?
- The formula is the same, but the circle of confusion is smaller (about 0.02 mm for APS-C and about 0.015 mm for Micro Four Thirds). Use the focal length printed on the lens: the hyperfocal distance is about 1.8 m at 10 mm f/2.8 on APS-C and about 1.5 m at 8 mm f/2.8 on Micro Four Thirds.
- If I stop down enough, will everything be in focus?
- On paper the range keeps growing, but beyond f/11 diffraction softens the whole image and the sky gets much darker. For nightscapes, most photographers stay around f/2.8 to f/4 and make up the difference with focus stacking.
Tools in this article
Related articles
NPF Rule vs 500 Rule: How to Calculate the Longest Shutter Speed Without Star Trails
When you photograph the night sky, the Earth keeps turning while the shutter is open, and stars stretch into short lines. The 500 rule is the best-known guide to how many seconds you can expose before that happens, but on today's cameras with more than 24 megapixels, stars look trailed when you view the image at 100%. This guide covers the formulas for the 500 rule and the NPF rule, quick-reference tables by focal length and resolution, and how much longer you can expose depending on where you point the camera (declination).
Read article →Milky Way Camera Settings: ISO, Aperture and Shutter Speed to Start With
To photograph the Milky Way, you set three things to suit the darkness of the sky and your lens: shutter speed, aperture and ISO. Auto modes tend to come out too dark or fail to focus, so manual mode is the way to go. This guide covers shutter speeds by lens, ISO by sky darkness, the camera settings to check before you go, and a step-by-step routine for the night of the shoot.
Read article →Darts Checkout Chart and How to Remember It: 01 Finishes for Open Out and Double Out, Plus Bogey Numbers
You are playing 01, your score drops below 100, and suddenly you freeze: where do I aim to finish from here? The right checkout depends on two settings: whether the last dart has to land in a particular ring (open out, double out or master out), and whether the bull is a single 50 or split into 25 and 50 (fat bull or split bull). This guide covers the highest checkout and the bogey numbers you cannot finish in three darts for each rule, checkout charts by remaining score, why D16 and D20 are the doubles to leave, how to fix an odd number, the one dart to throw when you cannot finish this turn, an easy way to memorise checkouts, and how to read a rough rating from PPD, PPR and count-up scores. Every number in the tables was checked by enumerating all 1 to 3-dart combinations with the same logic as the Darts Checkout Chart tool.
Read article →