A half step is the distance between two keys with nothing between them — black or white makes no difference. A whole step is two half steps, with exactly one key in between. C to D is a whole step; E to F is a half step.
The definition counts keys in between, not colors. Most neighboring white keys are a whole step apart, with two exceptions: there is no black key between E and F, or between B and C, so those pairs are half steps. Every bit of a scale’s character comes out of those two exceptions.
E to F: nothing in between, so a half step — even though both are white.C to D: one black key in between, so a whole step.
A major scale is just a fixed string of these: whole, whole, half, whole, whole, whole, half. Start on any key and follow that pattern and you get a major scale — which is why different keys need different numbers of black keys, all to produce the same pattern of gaps.
Common questions
What is a whole step in music?
A whole step is the distance of two half steps. On the piano, skip exactly one key, black or white, between the two you play, as from C up to D or from F up to G.
Is E to F a half step?
Yes. There is no black key between E and F, so they sit side by side, and the same is true of B and C. Every other pair of neighboring white keys has a black key between them and is a whole step.
How many half steps are in a whole step?
Two. An octave holds 12 half steps, and a major scale spends 5 whole steps and 2 half steps to cover it.