There are few things every runner agrees on. The best running shoe, the most accurate GPS watch, and whether KT tape really works are all up for debate in running communities.

One thing all runners can all agree? Shin splints (pain along either or both of the shinbones) are the absolute worst—second only to a DNF next to our online race results.

Studies suggest that up to 20 percent of runners experience shin splints, an overuse injury technically known as media tibial stress syndrome, or MTSS Current Developments Concerning Medial Tibial Stress Syndrome. Craig DI. The Physician and Sports Medicine, 2010, Mar.;37(4):0091-3847.. They can range from a stress injury (the swelling of your shinbone) to a stress fracture (a crack in your bone), says Jordan Metzl, M.D., a sports medicine physician and author of Running Strong.

Since the catch-all term applies to many different pain points, it’s often difficult to identify the actual root of the problem. “Some people feel pain in the muscle, others feel it right in the tibia (shinbone), while still others feel pain at the knee,” explains Mike Young, a certified strength and conditioning specialist, track and field coach, and founder of Athletic Lab. And that makes easing the pain a challenge.

The Science Behind the “Ouch”

There are two types of shin splints: bone- and muscle-related.

Ninety percent of shin splints stem from the shinbone, meaning the bone gets sore from running or another impact-related activity and starts to swell, says Metzl, who’s also an endurance athlete (he’s finished 33 marathons and 12 Ironman races). If not treated correctly, that stress injury can turn into a stress fracture, causing more pain and requiring an even longer recovery period.

The other 10 percent of shin splints are caused by muscle-related issues. In this instance, the muscle in the front of the leg (the tibialis anterior) starts to swell. As the muscle engorges, the tendons around it become too tight, causing pain. If you can (gently) apply pressure to your shinbone without a ton of pain, your injury is likely muscle-related.

Unsurprisingly, shin splints are more common in runners, specifically long-distance runners who cover a significant amount of miles. But athletes who experience big impacts on hard surfaces, like basketball players jumping on asphalt courts, also have a history of shin splints, Young says.

No matter your exercise, three major factors are at the root of shin splints, Metzl explains. First there’s the mechanics of your body: If your feet roll inward when you run (a.k.a. underpronation) or you’re over-striding, extra unnecessary force could be loaded onto your tibia bone, causing discomfort Inverse relationship between the complexity of midfoot kinematics and muscle activation in patients with medial tibial stress syndrome. Rathleff MS, Samani A, Olesen CG. Journal of Electromyography and Kinesiology: Official Journal of the International Society of Electrophysiological Kinesiology, 2011, Apr.;21(4):1873-5711.. Second, increasing how far or how often you run too quickly can trigger the pain. Lastly, the lower your bone density (which peaks at age 30), the greater your risk, and high BMI levels have also been linked to shin splints.

An Ounce of Prevention…

The old adage holds true: The best way to get rid of shin splints is never to get them in the first place. By the time a runner seeks medical attention, often the damage has already been done, Metzl says. That’s why it’s so important for runners to listen to their bodies and educate themselves.

One rule to always keep in mind: “Never increase your mileage by more than 10 percent from the week before,” says Marnie Kunz, a Brooklyn-based running coach. (For example, if you run a total of 10 miles one week, add on 1 mile the next for a total of 11.) On those runs, vary the surface type so you aren’t always on asphalt, Young suggests. Try occasionally running on a bridle path or grass to reduce the likelihood of overuse.

Being aware of any pain in your shins (and scaling back accordingly) is another way to prevent long-term distress, but it’s crucial to strengthen your lower legs and feet. Add foot-strengthening exercises such as rolling out your arches over a lacrosse ball, jumping in sand, and running barefoot to your routine, Young suggests.

Eccentric calf raises are also great, says Abigail Bales, a running coach and personal trainer. Stand on a flat surface, holding onto something for balance, and press up and balance on the balls of your feet. Distribute your weight evenly between your first and second toes. Slowly lower back down to your heels over a five-second count, aiming for your weight to land on the outside of the back of your heels last. Do three sets of five to eight reps.

Work on ankle mobility several times a week too, Bales recommends: Step one foot forward and bend the front knee as far forward as it can go, without the heel lifting off the ground. It’s OK to let your knee go over the angle of the ankle, since you won’t be putting weight on it—it’s about mobility, not strength. Do 20 reps on each side.

And (to add one more thing to the list) don’t neglect all-around strength training, Metzl advises. “The stronger the glutes and core, the better position you’re in when you run—and the less likely you are to get shin splints.”

8 Ways to Relieve the Pain

So, despite following the above advice, you overdid it while training for your first half-marathon and your lower legs are begging for mercy. Fortunately, there are a number of steps to take to alleviate shin splints.

1. Rest.

Sorry, all you type-A athletes: Sometimes you’ve just gotta take a few days off. “Pain in general is your body’s way of telling you to scale back,” Young says. Take a few days off from running until the pain subsides, Bales recommends. If you’re antsy to move while you wait it out, try lower-impact activities like cycling, water running, or resistance training.

2. Check your kicks.

Look at your athletic shoes to ensure they’re fitted correctly, and try orthodics to see if they can provide relief, Young says. Research has found that shock-absorbing insoles can help prevent shin splintsThe Prevention of Shin Splints in Sports: a Systematic Review of Literature. Thacker SB, Gilchrist J, Stroup DF. Medicine and Science in Sports and Exercise, 2002, Feb.;34(1):0195-9131..

3. Analyze your gait.

This will help you determine if you’re underpronating or overpronating, Kunz says. Check to see if your local running store offers complimentary gait analysis, or a physical therapist can also help assess your gait pattern.

4. Foam roll.

Yep, this tried-and-true recovery method also comes in handy for shin splints. If you are experiencing muscular shin pain, Metzl recommends using the foam roller on your calves and around the affected areas.

5. Ice it.

If the discomfort is bone-related, icing your shins and taking anti-inflammatories is the way to go. Ice and elevate your shins for at least 20 minutes twice a day to ease pain and swelling, Kunz says.

6. Consider supplements.

To build up your bone mass, Metzl suggests including plenty of calcium and vitamin D in your diet.

7. Shed some pounds.

This may be the most difficult, yet crucial, step to relieving pain. Dropping a few pounds will alleviate the relative force put on your body as you move, Young says.

8. See the pros.

If pain persists, Kunz recommends seeing a doctor or physical therapist for a diagnosis so you know you have shin splints and not something more serious.