The string data on the guitar starts with 0 for the open fret to the 20th fret on an acoustic guitar. Here is a chart for the measurements of thre frets from the bridge.
Most electric guitars are 24 frets. The first twelve frets from the guitar are the same notes just one octave higher than the second twelve frets from the bridge. Here is a chart another chart which demonstrates the relationship between inches and cm and the guitar frets.
The open E is measured as 26 inches from the bridge and the 12th fret E is 13.45 inches from the bridge. So each fret should grow by a certain amount from the last to create the same notes along the fret board. So we find that the twelveth root of 1/2 is the number that we want because there are twelve frets in each octave of the scale. So as the frets go away from the bridge they will increase by the measurement of that fret multiplied by 1/12th root of 2. This will give us the measurement for the next fret.