# Star trails exposure calculator > How long can the shutter stay open before stars trail? The longest exposure for sharp stars from your lens, aperture and sensor, by the NPF rule and the 500 rule. Find the longest exposure for pin-sharp stars in night-sky and aurora photography with the NPF rule and the 500 rule, from lens, aperture and sensor. - Page: https://how.box/star-trails/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/star-trails/?f={f}&n={n}&s={s}&mp={mp}&dec={dec} - `f` (number 0 to 2000): Real focal length, mm. Example: `24`. - `n` (number 0.7 to 32): f-number. Example: `2.8`. - `s` (full_frame, aps_c, aps_c_canon, micro_four_thirds or one_inch): full_frame, aps_c, aps_c_canon, micro_four_thirds or one_inch. Example: `full_frame`. - `mp` (number 1 to 400): Megapixels. Example: `24`. - `dec` (number -89 to 89): Declination of the stars, degrees. Example: `0`. Example answer: https://how.box/star-trails/?f=24&n=2.8&s=full_frame&mp=24&dec=0 A complete link carries the primary answer in the page HTML; a missing or invalid value shows the default page. ## Agent tools - `star_trails_calculate`: Longest exposure for sharp stars in night-sky photography by the NPF rule and the 500 rule. - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"star_trails_calculate","arguments":{"focal_length_mm":24,"aperture":2.8,"sensor":"full_frame","megapixels":24,"declination_deg":0}}}` - GET: https://how.box/mcp/run/star_trails_calculate?focal_length_mm=24&aperture=2.8&sensor=full_frame&megapixels=24&declination_deg=0 ## How it works The Earth turns, so stars slide across your camera's sensor during a long exposure and turn into short streaks. To photograph them as points, whether for the Milky Way or the northern lights, the shutter must close before a star moves by more than a pixel or so. A longer lens magnifies the motion and a sensor with smaller pixels shows it sooner, so both shorten the time you have. The classic 500 rule gives t = 500 / (focal length × crop factor): 500 / 24 = 21 seconds for a 24 mm lens on a full-frame camera. It ignores the sensor's resolution, so on modern high-resolution cameras it often produces trails. The NPF rule includes it: t = (35 × N + 30 × p) / f, where N is the f-number, p the pixel size in micrometres and f the focal length in millimetres. With f/2.8 and 6 µm pixels, that gives (98 + 180) / 24 = 11.6 seconds. Stars near the celestial pole move more slowly, so both times are divided by the cosine of the declination. These are guides for viewing at normal size; stars viewed at 100 % zoom or in large prints need a shorter time. The pixel size is estimated from the sensor width and megapixels, so a camera with a different aspect ratio or crop mode may differ slightly. Sources: Frédéric Michaud's NPF rule (2010) and Wikipedia on star trails. ## FAQ **Why is the NPF rule shorter than the 500 rule?** The 500 rule dates from film and low-resolution cameras. Modern sensors have small pixels that show a streak sooner, and the NPF rule accounts for that and for the lens aperture. **What shutter time do aurora photographers use?** Auroras move and change, so 3 to 15 seconds is typical. Use the NPF time as an upper limit for the stars and shorten it when the aurora is bright and fast. **Does the declination matter?** Yes. At the celestial equator stars move fastest on the sensor, which is the worst case; looking toward Polaris, at declination about 89°, they barely move, and the allowed time grows by 1 / cos(declination). **What if I use a star tracker?** A tracker cancels the Earth's rotation, so these limits no longer apply to the stars, only to the foreground, which stays blurred beyond them. **What focal length do I enter on a crop sensor?** The real focal length printed on the lens. The tool applies the sensor's crop factor itself and shows the full-frame equivalent. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)