This app was mentioned in 2 comments, with an average of 2.50 upvotes
Code issue, no gap over 4", assembled rail has to withstand #200 sideload. I usually do PT rails: Cut posts at 35"+ (finished guardrail should be 38"-42" per IRC). Install horizontal 2x4s between posts flush to interior 4x4 face - top 2x even with the cut post, bottom 2x spaced 3-1/2" off deck surface (I'm in snow country, much easier to clear off w/ space there). Install 5/4x6 cap rails. Bevel-cut bottoms of 2x2 balusters and screw to outer face of 2x4s. For evenly spaced balusters - I use android app Blankstair, a web app would work too.
The only app I use is Blank Stair. It greatly speeds up baluster spacing and rise/run calcs.