What Medicine Helps With Headaches or Migraines?

The most effective headache medicine depends on the type of headache you’re dealing with. For the common tension headache, over-the-counter pain relievers like acetaminophen, ibuprofen, and aspirin all work well and perform roughly equally at standard doses. Migraines and cluster headaches typically need stronger, targeted treatments.

Over-the-Counter Pain Relievers

For everyday tension headaches, you have three main options at the pharmacy: acetaminophen (Tylenol), ibuprofen (Advil, Motrin), and aspirin. A meta-analysis comparing these found that at low doses, NSAIDs like ibuprofen and aspirin provide essentially the same relief as acetaminophen. High-dose NSAIDs may work slightly better, but they also come with more side effects, so the tradeoff isn’t always worth it.

Acetaminophen works differently from ibuprofen and aspirin. It reduces pain signals in the brain but doesn’t fight inflammation. Ibuprofen and aspirin block inflammation-causing enzymes throughout the body, which makes them a better fit when your headache involves swollen or irritated tissue, like a sinus headache.

Combination products that add caffeine to a pain reliever (like Excedrin) do offer a small but real boost. A large Cochrane review found that adding caffeine increases the chance of meaningful pain relief by about 5% to 10% compared to the same pain reliever alone. That’s a modest benefit, but for some people it’s the difference between a headache that lingers and one that clears.

Safety Limits for Common Pain Relievers

Acetaminophen has a hard ceiling: no more than 4,000 milligrams in 24 hours, and many manufacturers now recommend staying at or below 3,000 milligrams. Going over that threshold risks serious liver damage, and the danger increases significantly if you drink alcohol regularly or take other products that contain acetaminophen without realizing it (cold medicines, sleep aids, and prescription combination pills often include it).

NSAIDs carry their own risks. They can reduce blood flow to the kidneys and raise blood pressure, which makes them particularly concerning if you already have high blood pressure or kidney problems. Research published in the American Heart Association’s journal found that NSAID use in people with hypertension meaningfully increases the risk of chronic kidney disease. If you fall into that category, acetaminophen is generally the safer choice for occasional headaches.

NSAIDs can also irritate the stomach lining, so taking them with food helps. People with a history of stomach ulcers or gastrointestinal bleeding should be cautious.

Prescription Medicines for Migraines

When over-the-counter options don’t cut it for migraines, the most established prescription class is triptans. These work by activating specific serotonin receptors in the brain, which narrows swollen blood vessels and blocks pain signals along the nerve pathways involved in migraine. Seven different triptans are available in the U.S., and they come in tablets, nasal sprays, and injections, so there’s flexibility if one form doesn’t suit you.

Triptans work best when taken early in a migraine attack. They’re not meant for daily use, and they’re not appropriate for people with certain cardiovascular conditions because of their blood vessel-narrowing effects.

A newer class of migraine medicines called gepants works by blocking a protein called CGRP that plays a central role in migraine pain. Three gepants are currently available: rimegepant (an orally dissolving tablet), ubrogepant (a standard tablet), and zavegepant (a nasal spray). These are particularly useful for people who can’t tolerate triptans or who have heart-related risk factors that make triptans unsafe. Unlike triptans, gepants don’t constrict blood vessels.

Another newer option, lasmiditan (a ditan), activates a different serotonin receptor than triptans and also avoids the blood vessel effects. It can cause significant dizziness and sedation, so you can’t drive for at least eight hours after taking it.

Cluster Headache Treatments

Cluster headaches are a different beast. They strike with extreme intensity, usually on one side of the head and around the eye, and standard OTC pain relievers are too slow to help. European Academy of Neurology guidelines strongly recommend two acute treatments: breathing pure oxygen through a mask at a high flow rate for 15 minutes, and a sumatriptan injection. The injection works faster than oral triptans because cluster attacks peak rapidly and can be over before a pill is absorbed.

The Medication Overuse Trap

One of the most important things to know about headache medicine is that using it too often can actually cause more headaches. This is called medication overuse headache, and it develops when you take pain relievers on 15 or more days per month (for simple painkillers like acetaminophen or ibuprofen) or 10 or more days per month (for triptans, opioids, or combination painkillers) for longer than three months.

The result is a cycle: the headaches become more frequent, you take more medicine, and the medicine itself perpetuates the problem. The headaches typically occur on 15 or more days per month and often feel like a dull, persistent pressure that’s there when you wake up. Breaking the cycle usually means stopping or significantly reducing the overused medication, which can temporarily make headaches worse before they improve.

Headache Medicine During Pregnancy

Acetaminophen is the safest first-line option during pregnancy and while breastfeeding. Ibuprofen and other NSAIDs are considered safe earlier in pregnancy but should be stopped by around 30 weeks because they can cause premature closure of a key blood vessel in the fetus. Aspirin at pain-relief doses is not recommended during pregnancy.

For pregnant women with migraines, sumatriptan is considered safe if you’ve used it successfully before pregnancy, though it’s not ideal to try it for the first time while pregnant. For migraine prevention, the beta-blocker propranolol and the antidepressant amitriptyline are both considered safe options during pregnancy, though propranolol should be avoided if you have asthma. Newer CGRP-targeting therapies should be avoided, as there isn’t enough safety data yet.

Choosing the Right Medicine

For an occasional tension headache, any OTC pain reliever will likely do the job. Choose acetaminophen if you have stomach sensitivity, high blood pressure, or kidney concerns. Choose ibuprofen or aspirin if you have liver concerns or if inflammation seems to be part of the picture. Adding caffeine can give a small extra edge.

If your headaches are frequent, severe, or accompanied by nausea, light sensitivity, or visual disturbances, you’re likely dealing with migraines, and it’s worth exploring prescription options like triptans or gepants. Track how many days per month you’re reaching for pain relievers. If you’re approaching 10 to 15 days, that pattern itself may be making things worse.