A common rule of thumb to figure out your maximum shutter speed for sharp stars at night is to divide 500 by your focal length. Sometimes it’s called the 600 Rule or the 400 Rule or several other numbers that can be used depending on your sensor size. Unfortunately, it’s a a very inaccurate rule today.
The so-called 500 Rule was designed for 35mm film grain at higher ISOs; but current digital sensors far out-resolve grainy film, especially with high-megapixel count, medium format, or printing larger than 20″ x 30″. The rule doesn’t take into account pixel density, aperture, or diffraction; however, it is an easy formula to remember and calculate in your head in the field, so it is often used.
If you’re going to use this rule, I recommend subtracting 5 or 10 seconds from the result if you wish to print large from a high-resolution sensor. Or, better yet, use…
The NPF Rule
A much more complicated and accurate rule for sharp stars is: (35 x aperture + 30 x pixel pitch) ÷ focal length = shutter speed in seconds. Pixel pitch = the camera sensor’s physical width in millimeters ÷ number of pixels in width x 1000 to measure it in microns.
Don’t forget your “order of operations” from high school math class for the above formula: solve the multiplication before the addition or you won’t get the correct results!
That’s a lot of mental gymnastics in the field, so I made the below spreadsheet to reference on your computer or smartphone to do the calculations for you (click to download).