Choose a sensor, focal length, aperture, and focus distance to see the near and far limits of sharp focus. Switch to star mode to compare the 500, 300, and NPF rule exposure times.
Camera sensor
Sharp range: near limit to far limit
In-focus range (distance from camera)
Total depth of field
127 ft
Hyperfocal distance
16.9 ft
35mm equivalent
35 mm
Angle of view (diagonal)
63°
TIP
A middle aperture like this usually balances depth of field and lens sharpness well for landscapes and street photography.
Shot settings
Quick presets
Aperture (f-number)
Angle of view
Horizontal
54°
Vertical
38°
Diagonal
63°
Focus range and star-sharp shutter time, side by side
Two questions come up on almost every shoot. For landscapes and portraits: how much of the scene will be in focus? For night skies: how long can the shutter stay open before stars turn into streaks? Both depend on the same inputs, which are sensor size, focal length, and aperture.
This calculator answers both. The Depth of field tab shows the near limit, far limit, total depth, and hyperfocal distance, with a bar that marks your focus point. The Star exposure tab lists the 500 rule, 300 rule, and NPF rule times next to each other and highlights the one it suggests for your sensor resolution.
Sensor selection is shared between the tabs. It covers full frame, APS-C, Micro Four Thirds, and 1-inch, and it shows your 35mm-equivalent focal length and angle of view. Distances can be shown in feet or meters.
Landscape, portrait, and night sky use cases
Landscape photos sharp from foreground to horizon
Check where the near limit falls when you focus at the hyperfocal distance, so a rock or flower at your feet stays sharp along with the mountains behind it.
Milky Way and star field exposures
Enter your lens and megapixel count to see how long you can expose before stars start to trail, using three different rules of thumb.
Portraits with a blurred background
Test wide apertures such as f/1.4 or f/1.8 at your usual distance and see how thin the sharp zone gets before you shoot.
Comparing lenses across camera systems
See the 35mm-equivalent focal length and angle of view for APS-C, Micro Four Thirds, or 1-inch cameras before you buy a lens.
How to find your focus range or star shutter time
- Select your camera's sensor size and choose feet or meters.
- Open the Depth of field tab or the Star exposure tab.
- Set the focal length and aperture. For depth of field, also set the focus distance. For stars, also set the megapixel count or enter your pixel pitch.
- Read the near and far limits, or compare the 500, 300, and NPF rule times. Use Copy results to save them.
Note: The preset buttons load typical settings for portraits, landscapes, and night sky shots, which you can then adjust.
Accuracy limits and assumptions
- Depth of field uses a circle of confusion that depends on the sensor: 0.030 mm for full frame, 0.020 mm or 0.019 mm for APS-C, 0.015 mm for Micro Four Thirds, and 0.011 mm for 1-inch. Real sharpness also depends on print size, viewing distance, and lens quality.
- The NPF result uses the simplified formula: (35 × f-number + 30 × pixel pitch in µm) ÷ focal length in mm. It does not adjust for which part of the sky you are shooting.
- The 500 and 300 rules divide by the 35mm-equivalent focal length. The NPF rule uses the actual focal length and the pixel pitch.
- When the far limit shows ∞, everything beyond the near limit is inside the depth of field.
- Pixel pitch is estimated from the sensor size and megapixel count, assuming square pixels. For a closer match, enter the pitch from your camera's spec sheet.
- The times assume a fixed tripod with no star tracker.
Maximum star exposure by focal length (500 and 300 rules)
Exposure times for common 35mm-equivalent focal lengths. The calculator above also factors in aperture and pixel pitch for the NPF rule.
| 35mm-equivalent focal length | 500 rule | 300 rule | Typical use |
|---|---|---|---|
| 14 mm | 35.7 s | 21.4 s | Ultra-wide Milky Way and night landscapes |
| 20 mm | 25.0 s | 15.0 s | Wide night sky and Milky Way |
| 24 mm | 20.8 s | 12.5 s | Night landscapes with a wide field of view |
| 35 mm | 14.3 s | 8.6 s | Stars with more of the foreground |
| 50 mm | 10.0 s | 6.0 s | Constellations and star fields |
| 85 mm | 5.9 s | 3.5 s | Star clusters and sections of the Milky Way |
| 135 mm | 3.7 s | 2.2 s | Telephoto star fields and nebulae |
Which rule does the calculator suggest?
Higher resolution makes small star movement easier to see, so the suggestion changes with megapixels.
- 500 rule: suggested up to 24 MP.
- 300 rule: suggested above 24 MP and up to 36 MP.
- NPF rule: suggested above 36 MP. It also accounts for aperture and pixel pitch.
For crop sensors, the table values apply to the 35mm-equivalent focal length. A 16 mm lens on a 1.5× APS-C camera counts as 24 mm.
Practical settings: aperture, hyperfocal focus, and star rules
A few working rules that help you pick settings quickly in the field.
Three settings control how deep the sharp zone is
A larger f-number gives more depth of field, a longer focal length gives less, and a closer focus distance gives less. Sensor size matters too, because a smaller sensor uses a smaller circle of confusion.
For landscapes, f/8 to f/11 is a common range. For portraits with a soft background, f/1.4 to f/2.8 is typical.
Enter your settings here and the bar shows where the sharp zone starts and ends.
Focusing at the hyperfocal distance for front-to-back sharpness
If you focus at infinity, part of your depth of field is wasted beyond the horizon. Focus at the hyperfocal distance instead, and the sharp zone runs from about half that distance out to infinity.
For example, with a 24 mm lens at f/8 on full frame (using this tool's 0.030 mm circle of confusion), the hyperfocal distance is about 8 ft (2.4 m). Focusing there keeps roughly 4 ft (1.2 m) to infinity sharp.
If your lens has no distance scale, focus on an object at that distance, or use live view magnification.
How the 500, 300, and NPF rules differ
The 500 rule is a quick estimate from focal length alone. It is easy to remember, but on high-resolution sensors stars can show slight trails at 100% zoom.
The 300 rule uses a smaller constant for shorter, safer exposures. The NPF rule adds the aperture and pixel pitch, so it reacts to the sensor and lens you actually use.
For web-sized images, the 500 rule is often enough. For big prints or heavy cropping, start from the NPF or 300 rule time.
Why crop sensors need the equivalent focal length
On APS-C, Micro Four Thirds, and 1-inch sensors, the same lens shows a narrower view than on full frame. Multiplying the focal length by the crop factor (about 1.5 to 1.6 for APS-C, 2.0 for Micro Four Thirds) gives the full-frame equivalent.
The 500 and 300 rules use that equivalent value. To get the field of view of a 14 mm lens on full frame, an APS-C camera needs a lens of roughly 9 mm.
Common focus and star-trail mistakes
Stopping down to f/22 and losing sharpness to diffraction
To get more depth of field, you close the aperture to f/16 or f/22. The scene is now in focus front to back, but fine detail looks soft because of diffraction.
💡 See the solution▼
Using the 500 rule on a high-resolution camera
You shoot a 45 MP camera at the 500 rule time. At 100% on your monitor, the stars show small streaks.
💡 See the solution▼
Choosing a star lens by full-frame focal length on a crop camera
You read that a 14 mm lens is ideal for the Milky Way and buy one for your APS-C camera. The view is much tighter than you expected.
💡 See the solution▼
Shooting portraits wide open and missing the eyes
You shoot at f/1.2 or f/1.4 for a soft background. With the head turned, the near eye is sharp but the far eye and nose are blurred.
💡 See the solution▼
Depth of field, hyperfocal distance, and NPF rule FAQ
Q.What is depth of field, and how does the f-stop change it?
A. Depth of field is the range of distances in front of and behind your focus point that looks acceptably sharp. A larger f-number (a smaller aperture, such as f/11) makes it deeper, so more of the scene is sharp. A smaller f-number (a wider aperture, such as f/1.8) makes it shallower, which blurs the background and foreground. Focal length and focus distance matter too: longer lenses and closer subjects both give a shallower depth of field. This calculator combines all three, plus your sensor size.
Q.What is hyperfocal distance, and how do I use it?
A. Hyperfocal distance is the closest focus distance at which the far limit of sharpness reaches infinity. If you focus at that distance, everything from about half of it out to infinity falls inside the depth of field. For landscapes, focusing there is usually better than focusing on infinity, because it keeps nearby foreground objects sharp too. The calculator shows the hyperfocal distance for your sensor, focal length, and aperture, and marks it on the range bar.
Q.What is the 500 rule for star photos?
A. The Earth rotates, so stars drift across your frame and turn into short streaks during a long exposure. The 500 rule estimates the longest exposure that keeps them looking like points: divide 500 by your 35mm-equivalent focal length. A 20 mm lens on a full-frame camera gives 500 ÷ 20 = 25 seconds. On a crop sensor, multiply the focal length by the crop factor first. A 16 mm lens on a 1.5× APS-C camera is a 24 mm equivalent, so the result is about 20.8 seconds.
Q.500 rule, 300 rule, or NPF rule: which one should I use?
A. The 500 rule only looks at focal length and was developed in the film era, so it can leave slight trails on high-resolution cameras. The 300 rule is the same calculation with a smaller constant, which gives shorter and safer exposures. The NPF rule also uses your aperture and pixel pitch, so it adapts to the sensor. In this calculator, the suggested rule is the 500 rule up to 24 MP, the 300 rule above 24 MP, and the NPF rule above 36 MP. If you plan to crop or print large, lean toward the shorter time.
Q.Does this work for APS-C, Micro Four Thirds, and 1-inch sensors?
A. Yes. Pick your sensor type and the calculator applies its crop factor (1.5× or 1.6× for APS-C, 2.0× for Micro Four Thirds, 2.7× for 1-inch) and a matching circle of confusion for depth of field. It also shows your 35mm-equivalent focal length and the horizontal, vertical, and diagonal angle of view.
Q.How do I find my camera's pixel pitch?
A. Pixel pitch is the width of one pixel on the sensor, in micrometers (µm). You can usually find it on the manufacturer's spec sheet. If you only know the megapixel count, leave the megapixel slider on and the calculator estimates the pitch from the sensor size, assuming square pixels. If you have the exact number, switch to the pixel pitch field and type it in.
Q.How accurate are the results?
A. They are estimates. Depth of field depends on a circle of confusion, a standard blur threshold, and how sharp a photo looks also depends on print size, viewing distance, and lens quality. The NPF formula used here is the simplified version, which does not adjust for where in the sky you point. Treat the numbers as a starting point, take a test shot, and zoom to 100% to check the stars or the focus.
Your feedback
makes this tool better.
Tell us which features you'd like, what should be fixed, or which new tool you'd like to see. An engineer reads every submission and uses it to guide development.