This sheet lays out a 3 ft (36") deck railing between post faces. It compares 1-1/2" wood with 3/4" metal, gives every mark from one hook of the tape, and checks the 4" sphere rule and post spacing.
1-1/2" wood: 7 balusters
36" ÷ (1-1/2" + gap) fits 7 balusters with 8 equal gaps of 3-3/16" (3.188"), 4-11/16" on centre.
From the post face the leading edges fall at 3-3/16", 7-7/8", 12-9/16", 17-1/4" and on in 4-11/16" steps. Buy 8 to allow 10% for splits and miscuts.
3/4" metal: 8 balusters
Thinner balusters need more of them: 8 at 3-5/16"+ gaps, 4-1/16" on centre. The first four marks: 3-5/16", 7-7/16", 11-1/2", 15-9/16".
1" metal or composite takes 7 at 3-5/8"; 3-1/2" flat pickets take 5 at 3-1/16".
Posts and heights
With 4x4 posts the centres are 39-1/2" apart, inside the 6'-0" DCA 6 limit for guard posts.
The guard top sits at least 36" above the deck and the bottom rail less than 4" above it.