Scale length is what you need to determine for fret placement.
That measurement is taken from the inside face of the nut to the inside face of the saddle.(string break to string break)
I recommend getting a metric metal ruler. These can be purchased at hardware and tool stores.
Metric because the layout is easier.
Once you have decided the scale length use a fret calculator to determine the spacing. Stewmac has a free online fret calculator.
It is very simple to use:
Enter the number of frets you want.
Enter the scale length you measured in millimeters. Ex. 508mm
Click the circle next to millimeter to change the calculator from inch mode.
Select your instrument type from the drop down box.
Press the red calculate button.
It will generate a fret layout chart showing the measurement to each fret from the nut on one side and the fret to fret measurements on the other. It will have the compensated length at the bottom along with a few other informational lines.
You'll want to layout using the nut to fret column and only use the fret to fret measurements as a check.
The reason is to prevent cumulative measurement errors.
Always double check your layout before cutting the fret slots.
There are other fret calculators available. Some let you print out a fret layout template that can be folded in half lengthwise and taped to the neck to use as a marking guide. If you're not confident in making multiple accurate measurements that may be an easier route for you. You would still need to check a printed template for accuracy before committing to the layout.
I have several beginner's videos on my page here. Take a look, it may answer some questions for you.
31" should be OK. My cbg's are 32" total including the box and they have a 24" scale. If you are making it a thru the box neck your scale may be a little shorter, but thats OK.
@The Phrygian Kid; thanks for the app...It's great!