Major Scale Formula
The pattern of tones and semitones (T–T–S–T–T–T–S) that builds a major scale starting on any note.
Explainer
Every major scale follows exactly the same pattern of whole tones (W) and semitones (H): W-W-H-W-W-W-H.
Starting on C: the pattern already fits the plain white notes, so C major needs no sharps or flats.
Apply the same formula starting on any other note and you'll always get that key's major scale, adding sharps or flats exactly where needed to keep the pattern intact.
Worked examples
C major
C D E F G A B C — no sharps or flats needed; the pattern already fits.
G major
G A B C D E F♯ G — needs F♯ to keep the final step a semitone.
D major
D E F♯ G A B C♯ D — needs F♯ and C♯ to keep the whole formula intact.