What is the standard maximum spacing?
Most building codes (like IRC) require that a 4-inch sphere cannot pass through the balusters, so spacing is typically set to a maximum of 4 inches.
To center the layout, find the center of the rail. Place the center of the middle space at the center of the rail.
Your spacing of 3.7826" is within the maximum limit.
Spacing = (Length - (Count × Width)) / (Count + 1)LengthTotal rail lengthWidthWidth of one balusterCountNumber of balusters