Chris Collins

Tools · photography

Night-sky photography

The longest shutter speed for pinpoint stars — the 500 rule against the NPF rule, from your sensor's pixel pitch, aperture, focal length and where you point — a star-trail planner (frames, gaps, total time, arc swept, card space), and when the Milky Way's core is up in a dark sky, tonight and through the year.

Added

How to use it

Sharp stars

The sky turns 15° an hour, so in a long exposure stars smear into short lines. Choose the Sensor (or Custom with its size), the focal length and aperture, and where you point: stars near the celestial equator (Orion’s belt) move fastest; near the poles they hardly move. The tool shows:

  • NPF rule — Frédéric Michaud’s formula (Société Astronomique de France, 2014), which accounts for pixel size, aperture (diffraction and the lens’s blur) and declination: t = k × (16.856 × N + 0.0997 × f + 13.713 × p) ÷ (f × cos δ), with N the f-number, f the focal length in mm, p the pixel pitch in µm and δ the declination. k is the tolerance: 1 for pixel-sharp at 100%, 1.5–2 for prints or web-size images.

  • NPF, simplified — (35 × N + 30 × p) ÷ f, the version popularised by PhotoPills. It matches the full formula at about δ = ±60°; at the celestial equator the full formula allows only about half as long.

  • 500 rule (or 400, 300) — 500 ÷ (focal length × crop factor). It dates from film and ignores pixel size, so on modern sensors stars visibly elongate; the card shows by how many pixels.

  • Use — the longest standard shutter speed not longer than the NPF result.

Pixel pitch is worked out from the sensor’s width and height and the megapixels, or type it. Sensor presets: phone-small, phone-main (1/1.3″, assumed binned to 12.5 MP — what night mode saves), one-inch, mft, apsc-canon, apsc, ff24, ff45, ff61 and gfx. The chart and table repeat the three rules for common focal lengths.

Star trails

Plan a stack of frames from an intervalometer: exposure per frame and the gap between frames, then either the total time or the number of frames. You get the total time, the angle the sky turns (360° per sidereal day, 23 h 56 min 4 s — 15.04° per hour), the length of a trail at the declination you aim at (the turn × cos δ — circles round Polaris are short, trails at the equator long and straight) and roughly how long it is on the sensor, the finish time, card space, and the share of time lost in gaps — at more than 1 s or about 3%, stacked trails look dotted.

Milky Way

The bright core of the Milky Way — the galactic centre in Sagittarius, RA 17 h 45.7 min, Dec −29.0° — is a southern object: from a latitude φ it never rises higher than 90° − |φ + 29°|, and north of about 61° N it never rises at all. Pick a place (or type coordinates, or use your location — kept in this browser, never in links) and the date the night starts. The tool shows astronomical darkness (sun more than 18° below the horizon), the hours the core is at least 0–20° up within it, where it is highest and in which direction, a chart of the night, and the 1st and 15th of each month for the year — the season runs roughly February to October, best around June. The moon’s brightness is estimated from the average lunar month (to about half a day); use the sun and moon planner for exact moonrise and moonset.

The sun’s position uses NOAA’s solar equations, the same as the sun and moon planner; the core’s position the standard sidereal-time conversion (Meeus, Astronomical Algorithms, chapters 12–13). Sources for the rules: Frédéric Michaud’s NPF rule as published by PhotoPills and PetaPixel (2017).

Limits

  • The NPF and 500 rules are rules of thumb for an untracked camera. Coma, astigmatism and vignetting at wide apertures, and focus, often matter more; check at 100%.

  • Trail length on the sensor is the small-angle estimate for a star near the middle of the frame.

  • The core’s altitude ignores refraction (under 0.1° above 10°) and your horizon: hills to the south hide it at low altitudes.

  • Light pollution and the moon decide what you actually see; this tool does not know your sky’s darkness.

Related: sun and moon planner, exposure (ISO, aperture and shutter), depth of field and hyperfocal distance, flash, EXIF statistics, compass (find south or Polaris’s direction).

Linking to an example

Links can be written by hand. Add the tab after #: sharp, trails or milky-way.

Parameter Meaning Example

sensor

Sensor preset id (see above), or custom

sensor=apsc

w, h

Custom sensor width and height in mm

w=23.5&h=15.6

mp

Megapixels

mp=45.7

pitch

Pixel pitch in µm (overrides the one worked out)

pitch=4.35

f

Focal length in mm

f=14

N

Aperture (f-number)

N=2.8

dec

Declination you point at, degrees

dec=-29

rule

The rule’s constant: 500, 400 or 300

rule=400

acc

NPF tolerance: 1, 1.5 or 2

acc=1.5

exp

Star trails: exposure per frame, seconds

exp=30

gap

Gap between frames, seconds

gap=1

mode

duration (plan by total time) or frames

mode=frames

frames

Number of frames

frames=300

dur

Total time in minutes

dur=120

tdec

Declination of the stars in the trails, degrees

tdec=89

mb

File size per frame, MB

mb=45

start

Start time, HH:MM

start=22:00

loc

Milky Way: city, typed or here

loc=typed

city

Place id: yosemite, death-valley, la-palma, mauna-kea, san-pedro-de-atacama, uluru, queenstown, london…

city=la-palma

lat, lon

Typed coordinates, degrees (north and east positive)

lat=-31.27&lon=149.06

tz

IANA time zone for typed coordinates

tz=Australia/Sydney

date

The date the night starts, YYYY-MM-DD

date=2025-07-24

alt

Lowest useful altitude of the core: 0, 5, 10 or 20

alt=20

example

One of the presets below; parameters given with it override the preset’s

example=ff24-14mm

Presets:

example= Shows

ff24-14mm

24 MP full frame, 14 mm f/2.8: the 500 rule says 36 s, the NPF rule 20 s simplified or 9 s at the celestial equator (open)

ff61-20mm

61 MP full frame, 20 mm f/1.8: 3.7 µm pixels — the 500 rule’s 25 s smears stars across 10 pixels; NPF allows about 4 s (open)

apsc-16mm

APS-C, 16 mm f/2.8 aimed at the Milky Way core (δ −29°) (open)

phone-night

A phone’s main camera, 6.9 mm f/1.8 (open)

trails-2h

Two hours of 30 s frames with a 1 s gap: 232 frames, a 30° turn (open)

polaris-circles

Four hours of 20 s frames round Polaris: a 60° arc (open)

mw-atacama

The core from the Atacama in June: overhead and up all night (open)

mw-yosemite

The core from Yosemite in late July: low in the south for a few hours after dark (open)

mw-london

London at midsummer: no astronomical darkness, and the core under 10° (open)

Runs entirely in your browser; nothing you type leaves this page.