The 12th fret (octave) sits 323.85 mm from the nut and 323.85 mm from the bridge saddle.
The 1st fret is 36.35 mm from the nut. Fret spacing gets progressively narrower toward the body: at fret 12 the gap is 19.26 mm.
Fret 12 is at 50.0% of the scale length from the nut, which is the correct position in any equal-tempered tuning.
Next stepWhen routing fret slots, work from the nut end toward the body and double-check the 12th fret against half your scale length - any accumulated error shows up there first.