Spokes come in many sizes. If you have all of the broken spoke take it with you to your bike shop for sizing. Or take a complete spoke from the same side of the same wheel as the broken spoke.
Be sure you have a good spoke nipple for installing the new spoke.