The nut side is 5/16-24 and the side that threads into the head is 5/16-18.
How bad are they? Tap and die sets are not magic. They cannot cut material that isnt there. If the threads are just a little deformed or you are trying to clean up some corrosion then often times it works. If they are stripped you need to replace the stud.