This app will calculate how many balusters are needed for a given rail length, their spacing, and the series of centers for every baluster.
Note that the center spacing for the first and last are slightly less than the rest due to not having a baluster on the ends. Also you may occasionally notice that one or more of the center spacings in the series don't seem the same as the rest. This is due to round-off of the internal high precision numbers to the nearest 1⁄16 inch. This slight variation won't be noticable in the end product whereas the odd size of the end spacing may be noticeable if all of the rounding errors were held until the end. Center 2 will generally be the same as Center 1 but could vary slightly due to the aforementioned rounding.
Many (most?) U.S. building codes for porch and deck railings require a minimum 36 inch height and no more than a 4 inch gap between rails (a 4 inch ball can not pass through). Be certain to check with local regulations to ensure you are compliant with all size, spacing, and strength requirements for your locality.
Disclaimer: This app is provided as-is and is not guaranteed in any way. You are entirely responsible your use of this application and author will not be held liable for any errors, omissions, or misunderstandings.
Start over