In stringed instruments such as guitar, bass, banjo, etc. scale length is the distance from the nut to the bridge or saddle; basically, the total length of the vibrating portion of the string. The scale length is a major determinant for the pitch range of the instrument. For example, a violin has a shorter scale length than a viola. A piano, however, has different scale lengths to make it easier to cover a greater range of pitches. In instruments such as guitar, bass, banjo, etc. string tension increases with scale length. This is because a longer string will tend to vibrate at a lower frequency; therefore it requires more tension to bring it up to a given pitch. There are compromises to be made in either direction so it’s not as if shorter or longer scale lengths are “better;” they simply provide different characteristics that may or may not be advantageous to a given player or instrument.
A formula is applied to the scale length to determine the fret positions for instruments with frets. This is critical for the correct intonation at various positions. Guitars, basses, etc. may have varying numbers of frets, but they always have a very carefully calculated relationship to scale length. The 12th fret up the fingerboard on most of these instruments plays a note one octave above the open string. It’s commonly believed that this 12th fret is at the halfway point along the string, however, pressing the string down onto the fingerboard stretches it and raises the pitch slightly, so the octave fret is usually a bit shy of the halfway point to compensate. A guitar player does use the halfway point of the open string to play a harmonic one octave higher.