The Rule of 18 and Intonation
By Lila Karash, Local Musician and Teacher at Twin Town Guitars
Intonation is defined as the ability of the guitar to play the correct tone at each fret. In order for the notes to have the correct pitches, the guitar neck must be divided into parts according to a mathematical formula. As you go up the neck of the guitar, each fret raises the pitch by shortening the string.
Historically, the "rule of eighteen" is the mathematical formula used to determine the fret positions on the guitar neck, but it should really be called the "rule of 17.817, since technology has allowed for more accurate calculations. Here is how it works: To find the distance between the nut and the first fret, first figure out the scale length of the guitar. The scale length is defined as the total length of the vibrating string, between the nut and the saddle (use the high E string). Divide the scale length by 17.817, and that is the distance to measure for the placement of the first fret. Now take the remaining distance - first fret to saddle - and divide that by 17.817 to find the placement of the second fret. Repeat the process using the remaining distance to place the 3rd fret, and follow the procedure all the way up to the final fret.
The object of these calculations is to put the 12th fret at exactly half the scale length. Halving the vibrating string doubles the frequency of the open string. However, some correction must be made because the string stretches slightly when it is being fretted, and this would cause each note played on a higher fret to be progressively sharper, causing inaccurate intonation. Guitar makers (luthiers) overcome this problem by moving the bridge/saddles to increase the length of the vibrating string. Also, since each successive string has a heavier gauge, the saddle is sloped to maintain correct intonation.
Sources: The Guitar Handbook by Ralph Denyer
Lutherie Information Website: http://liutaiomottola.com/formulae/fret.htm