Music Theory, Audio Engineering & Instruments Instrument Setup & Strings 12-tone equal temperament; fret constant 2^(1/12)

Fret Spacing Calculator (Fretboard Layout)

Every fret position on a modern instrument comes from one constant: the twelfth root of two. Fretting a string shortens it, and shortening it by the factor 21/12 raises the pitch by exactly one semitone - so the distance from the nut to fret n is the scale length minus the scale length divided by 2n/12. This calculator lays out every fret in inches and millimetres, gives the spacing between adjacent frets for slotting, places the compensated saddle, and handles multi-scale fanned-fret layouts with any perpendicular fret you choose.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Scale lengthNut to saddle before compensation. Fender 25.5 in, Gibson 24.75 in, classical 650 mm, most basses 34 in.25.5 in
Number of fretsHow many frets to lay out. Twenty-two is the common electric guitar count; classical guitars use 19.22
Fret to reportThe single fret whose measurements appear in the headline figures above the table.12
Saddle compensationExtra length added behind the theoretical scale so fretted notes play in tune. Set it by ear or a strobe tuner; the bass side always needs more than the treble.0.06 in
Multi-scale (fanned frets)Tick to lay out a fanned fretboard with a different scale length on each side.No
Bass-side scale lengthThe longer scale under the low strings. The scale length above is then the treble side.27 in
Perpendicular fretThe fret that sits square to the strings, where the fan reverses direction. Zero puts the nut square instead.7

It returns

  • Nut to the selected fret — Measured along the treble-side scale, from the nut face to the centre of the fret slot.
  • Same distance in millimetres
  • Gap from the previous fret
  • Twelfth fret position
  • Compensated saddle position
  • Bass-side offset at the selected fret

The formula

d(n)=LL2n12
g(n)=(Ld(n1))(121/12)
g=Ld(n1)17.8172

In plain text: d(n) = L - L / 2^(n/12)

  • d(n)Distance from the nut to fret n (in or mm)
  • LScale length, nut to theoretical saddle (in or mm)
  • nFret number, counting from the nut (integer)

The formula works in any unit, because it is purely proportional: every fret is a fixed fraction of the scale length. L/2^(n/12) is the string length still free to vibrate, which is what sets the pitch.

Updated Category Instrument Setup & Strings Verified against published test cases Reading time 12 min

Why frets sit where they do

A fret works by shortening the vibrating string. Pitch is inversely proportional to speaking length, so to raise a note by a semitone you must reduce that length by the semitone ratio, 21/12 = 1.0594631. Turn that round: the remaining length after n frets is the scale length divided by 2n/12, and the distance from the nut to fret n is whatever is left over - LL/2n/12.

Two consequences fall straight out. The twelfth fret is at exactly half the scale, because twelve semitones is an octave and an octave is a halving. The twenty-fourth is at exactly three quarters, because two octaves is a quartering. Those are the two measurements to check on any instrument or template: if the twelfth fret is not at half the nut-to-saddle distance, something is wrong before you look at anything else.

The other consequence is that the frets crowd together as they climb. Each gap is a fixed fraction - 5.6126% - of the length still remaining, and since that remaining length shrinks geometrically, so does the gap. On a 25.5-inch scale the gap into fret 1 is 1.43121 in and the gap into fret 13 is 0.71560 in, exactly half, because you have travelled one octave. The pattern is self-similar: any twelve consecutive frets span half of what the previous twelve did.

The formula, the rule of 18, and where compensation comes in

The direct form is the one to use for layout: compute each fret's distance from the nut independently, so that no error accumulates. Measure every slot from the nut face, not from the previous slot. A tenth of a millimetre of drift per fret, cumulated over twenty-two frets, is a badly intonated instrument; measured absolutely, each slot is only ever as wrong as one measurement.

The historic method was incremental and is worth understanding because you will meet it in old texts. Luthiers used the rule of 18: divide the remaining length to the bridge by 18 and place the next fret there. That is a rational approximation, and it is slightly wrong - the exact divisor is 1 / (1 − 2−1/12) = 17.8172. Using 18 puts every fret a little too close to the nut, and the error compounds: on a 25.5-inch scale the rule of 18 puts the twelfth fret at 12.657 in rather than 12.750. That is 0.093 in short of the halfway point, so the string left vibrating is 12.843 in instead of 12.750 and the octave plays 1200 x log2(12.750/12.843) = 12.5 cents flat. The better historic constant, 17.817, was in use well before equal temperament was universal.

Then there is compensation, which the fret formula deliberately ignores. Pressing a string to a fret stretches it slightly, and stretching raises tension and therefore pitch. The higher the action, the thicker the string, and the stiffer it is, the more it sharpens. The cure is to move the saddle back so the actual speaking length is a little longer than the theoretical scale, cancelling the sharpening. Compensation is therefore per-string: a plain treble string may need well under a millimetre while a wound low E needs several times that, which is why electric bridges have six adjustable saddles and acoustic saddles are cut at an angle. Set it with a strobe tuner by matching the fretted twelfth-fret note to the twelfth-fret harmonic, and expect to redo it after any change of gauge - the string tension calculator shows how much a gauge change alters the load.

Worked example: laying out a 25.5-inch fretboard

Take a standard 25.5-inch scale and place the first few frets, the octave and the twenty-fourth.

  1. The fret constant. 21/12 = 1.0594631, so 2−1/12 = 0.9438743 and 1 − 0.9438743 = 0.0561257. That fraction is the whole of the calculation.
  2. Fret 1. 25.5 x 0.0561257 = 1.43121 in, or 36.353 mm. Cross-check with the rule of 17.8172: 25.5 / 17.8172 = 1.43122 in. The two agree, as they must, since 17.8172 is 1/0.0561257.
  3. Fret 2. Speaking length is 25.5 / 22/12 = 25.5 / 1.1224620 = 22.71792 in, so the fret sits at 25.5 − 22.71792 = 2.78208 in. The gap from fret 1 is 2.78208 − 1.43121 = 1.35087 in, which is 0.0561257 x 24.06879 - the remaining length after fret 1.
  4. Fret 5. 2−5/12 = 0.7491535, so the speaking length is 19.10342 in and the fret is at 25.5 − 19.10342 = 6.39658 in.
  5. Fret 7. 2−7/12 = 0.6674199, giving a speaking length of 17.01921 in and a fret position of 8.48079 in.
  6. Fret 12. 2−1 = 0.5, so the speaking length is 12.75 in and the fret is at 12.75 in - exactly half, as an octave requires.
  7. Fret 24. 2−2 = 0.25, so the fret sits at 25.5 x 0.75 = 19.125 in, leaving 6.375 in of string.
  8. The saddle. With 0.060 in of compensation on the treble E, the saddle goes at 25.5 + 0.060 = 25.560 in from the nut. The bass E will need more; adjust it by ear against the twelfth-fret harmonic.

Check the self-similarity claim from the first section: the gap into fret 12 is 12.75000 − 11.99185 = 0.75815 in, and the gap into fret 24 is 19.12500 − 18.74592 = 0.37908 in - exactly half, one octave later.

Scale length, feel and how accurate you need to be

Scale length is a design decision with consequences well beyond the fret positions. A longer scale means higher tension at the same pitch and gauge - tension goes as the square of the length - so a 25.5-inch guitar feels tighter than a 24.75-inch one with the same strings, and its string spacing at the upper frets is more generous. It also has a slightly brighter attack, because a stiffer, more highly tensioned string supports its upper partials better. A shorter scale bends more easily and feels warmer.

On tolerance: fret slot position is the single most accuracy-critical measurement in a fretted instrument. An error of 0.010 in at the first fret on a 25.5-inch scale shortens the speaking length by that amount out of 24.069 in, which sharpens the note by 1200 x log2(24.069 / 24.059) = 0.72 cents. That is inaudible. The same 0.010 in error at fret 12, where the speaking length is 12.75 in, gives 1.36 cents; at fret 19, where it is 8.51 in, it gives 2.03 cents. Errors matter more the higher you go, which is why templates and slotting jigs are worth their cost and why measuring cumulatively is such a bad idea.

Beyond about five cents an error becomes noticeable against another instrument, and the cents and interval calculator converts any length error into cents directly. Note too that a fretted instrument is locked to equal temperament by its geometry: a straight fret gives every string the same ratio, so pure thirds are not available anywhere on the neck. That is the trade the design makes, and it is why some builders experiment with wavy or true-temperament frets.

One more practical figure: the nut is a special case. A string is stiffer near its termination and the nut usually sits slightly high, so many builders shorten the nut-to-first-fret distance by a few thousandths - nut compensation - to stop first-position chords playing sharp. This calculator gives the theoretical positions; nut compensation is a deliberate departure from them.

Fret positions for common scale lengths

Distance from the nut in inches, computed as L x (1 - 2^(-n/12)). The 650 mm classical scale is 25.5906 in.
Fret24.75 in25.5 in650 mm (25.591 in)34 in bass
11.38911.43121.43631.9083
22.70032.78212.79203.7094
33.93784.05714.07155.4095
45.10595.26065.27937.0142
56.20846.39666.41938.5288
78.23148.48088.510911.3077
910.033610.337610.374313.7835
1212.375012.750012.795317.0000
1514.343914.778614.831019.7048
1715.479215.948316.004921.2644
1916.490716.990417.050722.6539
2217.804818.344318.409424.4591
2418.562519.125019.192925.5000

Every column is the same set of fractions scaled: fret 12 is always half the scale and fret 24 always three quarters, so any position can be converted between scales by multiplying by the ratio of the lengths. None of these figures includes saddle compensation.

Pitfalls in layout

  • Measuring each fret from the previous one. Errors accumulate. Measure every slot from the nut face so no error is ever compounded.
  • Using the rule of 18 instead of 17.8172. It puts the twelfth fret 0.093 in short on a 25.5-inch scale, which makes the octave about 12.5 cents flat.
  • Confusing scale length with nut-to-bridge distance. Scale length is nut to theoretical saddle; the real saddle is further back by the compensation, and on an acoustic it is also angled.
  • Forgetting that the slot has width. The calculated position is the fret's centre, so a saw kerf must be centred on it rather than started at it.
  • Ignoring fingerboard taper on a fanned board. Fret slot ends must be laid out on the actual board edges, which converge; the offsets from this calculator are along each scale line.
  • Neglecting nut compensation. The theoretical nut position makes first-position chords play slightly sharp on many instruments, which some builders correct by shortening the nut end by a few thousandths.
  • Assuming compensation is one number. It varies per string with gauge, action and stiffness, which is why bridges have individual saddles.

Multi-scale boards and the limits of straight frets

A fanned-fret or multi-scale instrument gives each string its own scale length, longer on the bass side and shorter on the treble. The reason is tension: tension scales as the square of the length, so a low string on a longer scale can carry a usable tension at a sane gauge, while the treble strings keep the easier bending of a shorter scale. On a seven- or eight-string instrument tuned down to B or F sharp, that difference is what separates a playable low string from a floppy one.

Geometrically it is two ordinary layouts side by side. Each side gets its own L and its own set of positions; the two are then slid along each other until one chosen fret - the perpendicular fret - lines up square to the strings. Frets below it slant one way and frets above it slant the other, which keeps the maximum angle at the hand small. Choosing a low perpendicular fret puts more slant in the upper register; choosing fret 7 or 8 is a common compromise, and putting it at the nut makes every fret slant in the same direction. The offsets this calculator reports are measured along each scale line, so the fingerboard taper still has to be applied when marking the board edges.

Even a perfect layout is only as good as the temperament it implements. Straight frets impose one ratio on every string, so a fretted instrument is equal-tempered by construction, with the errors the cents and interval calculator tabulates - thirds 13.7 cents wide, fifths 2 cents narrow. Builders have tried to do better with curved frets, per-string offsets and split frets; the results improve some chords and worsen others, because there is no fret geometry that makes every key pure. The natural harmonics remain the exception: touching the string at 1/2, 1/3 or 1/4 of its length gives the pure ratios of the harmonic series, which is why a twelfth-fret harmonic is a better intonation reference than a fretted note.

Finally, the fret positions and the pitches they produce are two halves of the same system. The note to frequency calculator gives the frequency at each fret, and it is worth confirming that fret 12 really does double it - that is the check the whole layout rests on.

Frequently asked questions

How do I calculate fret positions?

Use d = L − L / 2^(n/12), where L is the scale length and n is the fret number. On a 25.5-inch scale, fret 1 is 25.5 − 25.5/1.059463 = 1.4312 in, fret 12 is 25.5 − 12.75 = 12.75 in, and fret 24 is 19.125 in. Measure every fret from the nut rather than from its neighbour, so that no error accumulates down the board.

Where should the twelfth fret be?

At exactly half the scale length: 12.75 in on a 25.5-inch scale, 12.375 in on a 24.75-inch one, and 325 mm on a 650 mm classical guitar. Twelve semitones is an octave, and an octave halves the speaking length. This is the fastest check on any instrument - measure nut to twelfth fret, double it, and that is the theoretical scale length before compensation.

What is the rule of 18?

A historic incremental method: divide the remaining distance to the bridge by 18 and place the next fret there. It is a convenient approximation to the exact divisor 17.8172, which is 1/(1 − 2^(-1/12)). Using 18 places every fret slightly too close to the nut, and because the method is cumulative the error grows - on a 25.5-inch scale it puts the twelfth fret at 12.657 in instead of 12.750, which makes the octave 12.5 cents flat.

Why is the saddle not exactly at the scale length?

Because pressing a string to a fret stretches it and raises its pitch, so the string must be made slightly longer to compensate. The amount depends on action height, string gauge and string stiffness, so each string needs its own correction - typically a fraction of a millimetre on a plain treble string and several times that on a wound bass string. That is why electric bridges have individually adjustable saddles and acoustic saddles are cut at an angle.

Does the formula work in millimetres?

Yes, and in any other unit, because it is purely proportional. A 650 mm classical scale gives fret 1 at 650 x 0.0561257 = 36.48 mm and fret 12 at 325 mm. Nothing in the formula is unit-dependent; L simply carries whatever unit you supply and every distance comes out in the same one.

How accurate do fret slots need to be?

Accurate to a few thousandths of an inch, and the tolerance tightens as you go up the neck. An error of 0.010 in at the first fret of a 25.5-inch scale shifts the pitch by 0.72 cents, which nobody hears; the same error at fret 12 gives 1.36 cents and at fret 19 gives 2.03 cents. Since about five cents is the audible threshold against another instrument, that argues for templates and jigs rather than for hand measurement.

What are fanned frets for?

They give each string its own scale length so that low strings can be longer and therefore tighter at a reasonable gauge, while treble strings stay short and easy to bend. Tension scales as the square of the length, so moving a low B from 25.5 in to 27 in gains 12.1% of tension at the same gauge and pitch. The frets fan because each side has its own set of positions, aligned at one chosen perpendicular fret.

Why do the frets get closer together as they go up?

Because each fret takes the same fraction of the length that remains - 5.6126% of it - and that remaining length shrinks geometrically. The first gap on a 25.5-inch scale is 1.431 in and the twelfth is 0.716 in, exactly half, because you have covered one octave. Any twelve consecutive frets span half the distance the previous twelve did, all the way up the board.

References

  • The Physics of Musical Instruments, 2nd ed. — Neville H. Fletcher and Thomas D. Rossing, Springer
  • Guitarmaking: Tradition and Technology — William Cumpiano and Jonathan Natelson, Chronicle Books
  • Left-Brain Lutherie: Using Physics and Engineering Concepts for Building Guitar Family Instruments — David C. Hurd, self-published