The Scale Length of an instrument is the distance measured from the nut to the bridge.

The Rule of 18 is used to calculate the spacing between frets on a fretted instrument, like a guitar. However, 18 is rarely used. Instead, 17.817 is used instead. This ratio will allow instrument makers to place the 12th fret on at the midpoint of the scale length (the first octave).
The first fret is calculated by dividing the scale length by 17.817. This value is how far you must measure from the nut to place the first fret.
$$ \begin{aligned}
\text{Let: } \\
SL &= \text{Scale Length} \\
17.817 &= \text{Ratio used to calculate frets} \\
M &= \text{Measurement of distance to fret} \\ \text{Formula:} \\
M &= \frac{SL}{17.817}
\end{aligned} $$
Example: The scale length of an instrument is 24 inches. Calculate the distance for the placement of the first fret. $$ \begin{aligned} \text{Let: } \\ 24 &= \text{Scale Length} \\ 17.817 &= \text{Ratio used to calculate frets} \\ M &= \text{Measurement of distance to fret} \\ \text{Answer:} \\ M &= \frac{24}{17.817} = 1.35 in \end{aligned} $$ This means that you would measure 1.35 inches from the nut and place your first fret on the neck of the instrument.
Example: The scale length of an instrument is 23 inches. Calculate the distance for the placement of the second fret.
This is a little trickier to do. First you would calculate the first fret, round it to the hundredth place. Then subtract it from the scale length and find the fret measurement like above. Think of it as finding the next fret, but using the new (but shorter) length measured from the first fret to the bridge (instead of from the nut to the bridge).
$$ \begin{aligned}
\text{Let: } \\
23 &= \text{Scale Length} \\
17.817 &= \text{Ratio used to calculate frets} \\
M_1 &= \text{Measurement of distance to 1st fret} \\
M_2 &= \text{Measurement of distance to 2nd fret} \\
\text{Answer:} \\
M_1 &= \frac{23}{17.817} = \color{yellow}{1.29 in} \\
M_2 &= \frac{23 - \color{yellow}{M_1}}{17.817} = \frac{23 - \color{yellow}{1.29}}{17.817} = 1.22 in
\end{aligned} $$
This means that you would measure 1.35 inches from the 1st fret and place your 2nd fret on the neck of the instrument.
Example: The scale length of an instrument is 18 inches. Calculate the distance for the placement of the third fret.
$$ \begin{aligned}
\text{Let: } \\
18 &= \text{Scale Length} \\
17.817 &= \text{Ratio used to calculate frets} \\
M_1 &= \text{Measurement of distance to 1st fret} \\
M_2 &= \text{Measurement of distance to 2nd fret} \\
M_3 &= \text{Measurement of distance to 3rd fret} \\
\text{Answer:} \\
M_1 &= \frac{18}{17.817} = \color{yellow}{1.01 in} \\
M_2 &= \frac{18 - \color{yellow}{M_1}}{17.817} = \frac{18 - \color{yellow}{1.01}}{17.817} = \color{lightgreen}{0.95 in} \\
M_3 &= \frac{18 - \color{yellow}{M_1} - \color{lightgreen}{M_2}}{17.817} = \frac{18 - \color{yellow}{1.01} - \color{lightgreen}{0.95}}{17.817} = 0.9 in
\end{aligned} $$
This means that you would measure 1.20 inches from the 2nd fret and place your 3rd fret on the neck of the instrument.
Note: The spacing between the frets are becoming thinner and thinner as you move towards the 12th fret. See picture above.