Astrophotography Calculator
Enter your sensor, lens and target declination to get the longest untrailed exposure by the NPF, 500, 400 and 300 rules.
Free · runs in your browser · nothing is uploaded
An astrophotography calculator tells you the longest exposure you can use before stars turn into trails. Enter your sensor size and resolution, the lens focal length and f-number, and the declination of your target, and the answer card shows the NPF exposure in seconds for pinpoint stars.
A table sets it beside the simplified NPF rule and the 500, 400 and 300 rules and shows how many pixels the stars would trail at each. A second table gives Milky Way ISO starting points, and a third lists pixel pitch for common sensors. You can also type an exposure of your own to see its trail. Tracking mounts and star-trail stacking are outside the scope of this tool.

How to use the Astrophotography Calculator
- Pick your sensor size from the list: full frame, APS-C Sony/Nikon/Fujifilm, APS-C Canon, Micro Four Thirds, 1-inch or medium format.
- Set Resolution anywhere from 12 to 61 megapixels to match your camera.
- Optional: type a Pixel pitch in micrometres to override the value the tool calculates.
- Enter the Lens focal length (mm).
- Enter the Lens f-number, such as 2.8 for f/2.8.
- Enter the Declination of the target (degrees). Use 0 for a target on the celestial equator.
- Type Your exposure (seconds) if you want to test a specific time.
- Read the answer card for the complete NPF exposure.
- Select Copy link to reproduce these exact settings later or send them to someone else.
The form opens with defaults of full frame, 24 MP, 24 mm, f/2.8, declination 0 and 20 seconds. You only need to change the fields that differ from your kit. Compare the NPF row with the simplified NPF and 500 rule rows in the first table to see how far stars would trail at the longer times, then read the Milky Way table for an ISO that matches your f-number. The pixel pitch table at the bottom lists the computed value for each sensor and resolution, which helps if you want to type a pitch in by hand. Because Copy link reproduces your settings, you can save a shot plan and reopen it from the same link.
What is the 500 rule for star photography?
The 500 rule divides 500 by your focal length times the crop factor to give the longest exposure in seconds before stars smear. On a full-frame camera with a 24 mm lens that is 500 / 24 = 20.8 seconds. It ignores pixel size, so it often allows trails on high-resolution sensors.
What is the 400 rule in astrophotography?
The 400 rule is a stricter 500 rule: 400 / (focal length × crop factor), so every exposure is 20 percent shorter. On a full-frame 24 mm lens it gives 16.7 seconds, and the 300 rule gives 12.5 seconds.
What is the NPF rule?
The NPF rule includes aperture (N), pixel size (P) and focal length (F). Frédéric Michaud of the Société Astronomique du Havre devised it. His complete formula for pinpoint stars is seconds = (16.856 × f-number + 0.0997 × focal length + 13.713 × pixel pitch in micrometres) / (focal length in mm × cos(declination)), which he prints rounded as 16.9, 0.10 and 13.7. The answer card uses this form.
The widely quoted simplified version, (35 × f-number + 30 × pixel pitch) / focal length, has no declination term. Michaud built it to allow a drift of one star diameter on the celestial equator, which works out the same as the complete formula at a declination near 60 degrees. On the equator it gives about twice the pinpoint time, so the tool shows it only as a comparison row.
How do I calculate exposure for astrophotography?
Find the pixel pitch, then apply the complete NPF formula. Pixel pitch is sensor width / pixels across, and pixels across = √(megapixels × 1,000,000 × width / height). A full-frame 24 MP sensor has 6000 pixels across, so 6.00 micrometres. For 5.9 micrometres, 24 mm and f/2.8 on the celestial equator: (16.856 × 2.8 + 0.0997 × 24 + 13.713 × 5.9) / 24 = (47.2 + 2.4 + 80.9) / 24 = 5.4 seconds. The simplified NPF rule gives (35 × 2.8 + 30 × 5.9) / 24 = 11.5 seconds and the 500 rule 20.8 seconds. For the Milky Way core at declination −29, divide by cos(29°) = 0.875: 6.2 seconds.
What exposure should I use for the Milky Way?
A common starting point is ISO 3200 at f/2.8 for 20 seconds. The Milky Way table keeps that exposure value at other apertures by changing ISO, at the complete NPF time for pinpoint stars. For 24 mm, 5.9 micrometres and declination 0:
| Aperture | NPF exposure | ISO matching ISO 3200 at f/2.8, 20 s |
|---|---|---|
| f/1.4 | 4.5 s | 4000 |
| f/2.8 | 5.4 s | 12800 |
| f/4 | 6.3 s | 20000 |
If slightly elongated stars are acceptable, Michaud allows up to three times these exposures, which brings the ISO down by the same factor.
How long can I expose before stars trail?
The sky turns 15.04 arcseconds per second at the celestial equator, so trail length is exposure × 15.04 × cos(declination) arcseconds. Divide by the plate scale, 206.265 × pixel pitch / focal length (50.7 arcseconds per pixel here), to get pixels. For 24 mm, f/2.8, 5.9 micrometres and declination 0:
| Rule | Exposure | Trail |
|---|---|---|
| NPF, complete | 5.4 s | 1.6 px (82 arcsec) |
| NPF, simplified | 11.5 s | 3.4 px (172 arcsec) |
| 500 rule | 20.8 s | 6.2 px (313 arcsec) |
| 400 rule | 16.7 s | 4.9 px |
| 300 rule | 12.5 s | 3.7 px |
A star image here is about 3 pixels across once lens blur, seeing and the colour filter grid are added, so the complete NPF time lets stars drift half their own width.
How this tool works and where the numbers come from
Complete NPF rule (Frédéric Michaud, Société Astronomique du Havre): seconds = (16.856 × f-number + 0.0997 × focal length + 13.713 × pixel pitch in um) / (focal length in mm × cos(declination)), with k = 1 for pinpoint stars; Michaud prints the constants rounded to 16.9, 0.10 and 13.7. The simplified rule (35 × f-number + 30 × pixel pitch) / focal length and the 500, 400 and 300 rules, K / (focal length × crop factor), are shown as usually quoted, without a declination term. The simplified row reproduces npfcalculator.com’s published example (5.9 um, 24 mm, f/2.8: 11.5 s versus 20.8 s) and Wikipedia’s worked examples. Star motion is 360 degrees per sidereal day of 86164.09 s; plate scale is 206.265 × pixel pitch / focal length.
Sources
- Société Astronomique du Havre: La règle NPF (Michaud, complete and simplified formulas)
- Société Astronomique du Havre: Les coulisses de la règle NPF (derivation)
- NPF Calculator (published example and formula)
- Wikipedia: Astrophotography (500 rule, NPF rule)
- Wikipedia: Sidereal time (sidereal day 86164.0905 s)
Frequently asked questions
Why does declination change my exposure?
Stars near the celestial poles move slowly, so the complete NPF result is divided by cos(declination). At declination 60 it doubles, while the trail in pixels stays the same. Use the declination of the part of your frame closest to the celestial equator, since those stars move fastest. The simplified NPF and the 500, 400 and 300 rules are shown as usually quoted, without a declination term, so their trails shrink as you move toward the pole. Declinations beyond 89 degrees are treated as 89, because the formula grows without limit at the pole.
Why is the Milky Way ISO only a starting point?
Moonlight, light pollution and your sensor can move the right ISO by a stop or more. Treat the table as a starting point and check your first frame before settling on a setting.
Can I enter my own pixel pitch?
Yes. Type a value in micrometres into the optional pixel pitch field to override the calculated figure. For example, the Sony A7R IV’s published pitch at 61 MP is 3.76 micrometres, and you can enter that directly.
How much does the sensor resolution matter?
A lot for the NPF rule and not at all for the 500 rule. Smaller pixels show a given trail as more pixels: a full-frame 61 MP sensor has 3.76 micrometre pixels and gets a shorter NPF exposure than a 24 MP one with 6.00 micrometre pixels at the same lens and f-number.
Does this tool cover tracked shots?
No. Tracking mounts and star-trail stacking are outside what this tool covers, so its exposure limits apply to fixed, untracked shots.
- Milky Way Calendar: check when the Milky Way is well placed before you plan a shoot.
- Moon Tonight: see how bright the Moon is, since moonlight affects your exposure.
- New Moon Calendar: find the darkest nights for long exposures.
- Astronomical Twilight Calculator: work out when the sky is dark enough to start shooting.
- Star Map Generator: find which objects sit in the part of the sky you plan to photograph.
- Meteor Shower Calendar: plan wide-field shots around meteor peaks.
- Telescope Magnification Calculator: pick eyepieces if you also observe by eye.
Planning a trip? The Night Gaze Camp app ranks campgrounds by tonight’s moonlight, clouds and sky darkness.