Using a flexible measuring tape, wrap the tape around your head, just above your eye-brows. Make sure your head is perfectly level and that the tape passes just below your crown at the largest part of your head.
If you don't have a flexible tape, use a piece of string or similar and mark the position, then unravel the string and measure against a ruler or retractable tape measure.
Here is a picture illustrating where to measure your head:
For Sonic Helmets, here are the sizes and the head measurements:
(always select a size closer to your measurement. It's always safer to go slightly larger than smaller.)
Size
Measurement (cm)
XS
53-54cm
SM
55-56cm
MD
57-58cm
LG
59-60cm
XL
61-62cm
2XL
63-64cm