It depends not only your head's size, but the shape. For example very few helmets (and only Troxel brand) fit my head without being too loose or me getting headache. I'd suggest to look around if anyone owns helmet so you could just try and see what fits you the best. There is nothing worse then helmet, which doesn't fit.
You will need to go in to try them on but basically when you have a helmet on you should be able to move your head around quite abit and it should stay in place , that way you know when you fall off it wont move on yea !
Trying on helmets owned by others is not a good plan unless they are really new. The padding tends to conform to your head some over time and trying on a used helmet will not give you an idea of what a new helmet will fit you like. Plus, some manufacturers change their design over time so the new style might not fit like the older model.
You could go try them on if you are in sorta a hurry, but if you have the patience and you are ordering online:
Measure the circumference of your head where your temples are, then check this out: Find Your Hat Size
For example, on this helmet: Troxel Spirit Helmet - Statelinetack.com
(using my measurements):
According to the chart on both the first link I gave you OR the size chart link on the second link, I'd be a
7-1/8 or a M.