Picket fence spacing calculator.
This calculator uses Javascript.
If  you are making a railing for a set of stairs this calculator may help. Spacing calculator for stairs.
This has turned out to be by far my most popular page.
For any requests or comments contact Peter@findlowsaltfood.info

The usual advice on the web of how to set out the spacing is to use a spacer of some sort.
Even if you make the correct size spacer there is the real possibility that errors will creep in and the last space will be incorrect.
One way to attach fence pickets so that all the gaps are equal is to calculate the distance from one end to where the edge of each picket should sit
and to mark both the rails. If the rails are different lengths (one post not vertical perhaps) doing the calculation for both rails will help to disguise the problem.
If you enter the distance between the posts along the rails, the number of pickets and their width this little program will produce a list of measurements.
Print out the page,mark the distances and confirm that you are happy with the spacing.
The program also works for picket gates, porch trim and similar. 

To produce a list of  spacings enter requested information in mm.
You can try different numbers of palings until you get the gap that you desire.