Whether you’ve got a nagging back, a sprained ankle, or cramps you curse each month, here’s a guide to which pain reliever works best.

Workout Aches

Works best: Acetaminophen

As Tylenol, acetaminophen has been available over the counter for years. Kinder to the stomach than Advil (ibuprofen) or Aleve (naproxen sodium), acetaminophen is a good option for many ailments typically treated with those other drugs. In fact, acetaminophen is the first choice of many pain specialists for relieving delayed-onset muscle soreness from working out, mild arthritis pain and stiffness, headaches, and mild to moderate joint and back pain. It’s also the best choice for pregnant women because it doesn’t appear to boost miscarriage risks the way aspirin and ibuprofen do.

Use something else if you regularly drink a fair amount of alcohol. Mixed with more than three glasses of alcohol a day, acetaminophen can wreak havoc on your liver. It’s not clear whether fewer drinks put women at risk, but experts still urge caution. Whether you drink or not, it’s important to pay attention to how much of this drug you take: It’s easy to overdose unwittingly, because there are more than 400 products that contain it. The recommended daily dose is 4,000 milligrams, or roughly 8 to 12 pills, depending on the strength. Overshooting that mark can cause big trouble—like liver failure.

Painful Periods

Works best: Ibuprofen

A nonsteroidal anti-inflammatory drug (NSAID), ibuprofen blocks key enzymes involved in the production of body chemicals that trigger pain, fever, inflammation, and uterine contractions. Often purchased over the counter as Advil or Motrin, it can ease menstrual cramps. It’s also good for pain caused by acute inflammation from muscle sprains, tendonitis, and bursitis, and for irritation and redness from cuts and bruises. Experts say it’s a good choice for injuries where there’s swelling.

Use something else if you have a sensitive stomach. Because they stop secretion of stomach-coating mucus, NSAIDs like ibuprofen are hard on the stomach and gastrointestinal (GI) tract, and can sometimes cause ulcers. A 2004 Baylor College of Medicine study showed that 71 percent of people who take an NSAID for 3 months or more have GI tract irritation. You can reduce stomach upset by com-bining ibuprofen with food, or with acid reducers (like Tagamet or Zantac) or acid blockers (like Prilosec).

Killer Headaches

Works best: Caffeine combos

The caffeine in Excedrin (which contains aspirin and acetaminophen) and Anacin (which contains aspirin) turbocharges the action of those pain relievers. Some studies suggest the caffeine-boosted versions are better than aspirin or acetaminophen alone for headaches. The FDA has approved Excedrin for migraines; both drugs are an option for sore backs and menstrual cramps.

Use something else if you get headaches frequently. Caffeine constricts blood vessels, and when it wears off, it can prompt agonizing rebound headaches. This is unlikely with occasional use, but if migraines dog you, ask your doctor if prescription medications make more sense.

Long-Lasting Relief

Works best: Naproxen sodium

As Aleve or Naprosyn, this OTC and prescription NSAID works in much the same way as ibuprofen, and is good for the same ailments. But it lasts longer (8 to 12 hours versus 6 for ibuprofen), so you probably won’t have to take it as often. It’s a good choice if you have a condition that’s likely to be around for a while—if you’ve had minor surgery, for instance, or if you have arthritis.

Use something else if your risk of heart disease is above average. New data suggests that naproxen, like Vioxx, might be unfriendly to your heart. Though the evidence is anything but conclusive, use it sparingly and check with your physician.

Arthritis

Works best: Etodolac

You may not have heard of this prescription NSAID, but it may be a smart replacement for Vioxx. In studies it seems to be as easy on the stomach as that drug, but it’s half as expensive, just as effective, and safer. A 2004 study found that Etodolac caused 60 percent fewer GI tract complications than drugstore NSAIDs, protected the stomach as well as Vioxx, and didn’t boost heart risks.

Use something else if more convenient OTC choices get the job done without causing stomach problems. Also, keep in mind that even Etodolac can cause some stomach irritation if you use it for a long time.