The best medicine for a headache depends on the type of headache you have, how often it happens, and how severe it is. For the occasional tension headache, over-the-counter pain relievers like ibuprofen or acetaminophen work well for most people. But migraines, cluster headaches, and chronic headaches each respond to different treatments, and picking the wrong one can actually make things worse over time.
Over-the-Counter Options for Everyday Headaches
For a standard tension headache, three main over-the-counter categories work reliably: ibuprofen, acetaminophen, and aspirin. Ibuprofen and aspirin are anti-inflammatory drugs (NSAIDs), which means they reduce both pain and the inflammation that can contribute to it. Acetaminophen works differently, targeting pain signals in the brain without affecting inflammation. For most people, ibuprofen tends to provide slightly faster and longer-lasting relief for headaches compared to acetaminophen, but individual responses vary.
Combination products that pair acetaminophen, aspirin, and caffeine are also available over the counter and can be more effective than any single ingredient alone. The caffeine narrows blood vessels and helps your body absorb the pain relievers faster. These are particularly useful for tension headaches that haven’t responded to a single ingredient.
The FDA sets the maximum safe dose of acetaminophen at 4,000 milligrams per day across all medications you’re taking. That’s an important detail because acetaminophen hides in dozens of products, from cold medicines to sleep aids. Taking more than that threshold risks serious liver damage. With NSAIDs like ibuprofen, the main concern is your stomach. Among people who take NSAIDs regularly, roughly 15% to 30% develop stomach ulcers at any given time, and serious gastrointestinal complications occur in about 1.5% of regular users. For occasional use, these risks are low, but they climb quickly with daily or near-daily use.
One firm safety rule: never give aspirin to children or teenagers, especially during a viral illness. Aspirin use in young people has been linked to Reye’s syndrome, a rare but potentially fatal condition that causes swelling in the liver and brain. Acetaminophen or ibuprofen (at appropriate pediatric doses) are the safe alternatives.
Prescription Treatments for Migraines
Migraines are a different beast from tension headaches, and they often need targeted medication. Triptans have been the standard prescription treatment for decades. They work by narrowing blood vessels and blocking pain pathways specific to migraines. Sumatriptan, the most widely used triptan, is available as a tablet, nasal spray, or injection. The injection form works fastest and is also used for cluster headaches.
A newer class of medications called gepants takes a different approach. These drugs block a protein called CGRP that your nerves release during a migraine attack. CGRP transmits pain signals and contributes to the throbbing, nausea, and light sensitivity that make migraines so debilitating. Gepants bind to the receptors where CGRP would normally attach, essentially shutting down those pain signals. You take a tablet as soon as an attack starts, and unlike triptans, gepants don’t constrict blood vessels, making them a better option for people with heart disease or blood pressure concerns.
What makes gepants particularly versatile is that some can be taken daily as a preventive measure, not just during an attack. This dual role (stopping a migraine in progress or preventing one from starting) sets them apart from older treatments that serve only one purpose.
Cluster Headache Treatments
Cluster headaches are among the most painful conditions in medicine, often described as a burning or piercing sensation behind one eye. Standard pain relievers are too slow to help because cluster attacks peak within minutes. The two most effective acute treatments are high-flow pure oxygen breathed through a mask and sumatriptan given as an injection. Oxygen provides relief for most people who use it and has essentially no side effects, making it the preferred first option. Sumatriptan injections work rapidly as well and are used when oxygen isn’t available or sufficient.
The Rebound Headache Trap
Here’s the counterintuitive problem with headache medicine: using it too often can cause more headaches. This is called medication overuse headache, and it’s diagnosed when you have headaches on 15 or more days per month after regularly using acute headache medication for more than three months. The threshold for “overuse” varies by medication type. For triptans, combination analgesics, and opioids, it’s 10 or more days per month. For simple pain relievers like ibuprofen or acetaminophen alone, it’s 15 or more days per month.
Rebound headaches create a vicious cycle. The headache returns as the medication wears off, prompting another dose, which temporarily helps but ultimately makes the pattern worse. Breaking the cycle usually requires stopping the overused medication, which can mean a rough week or two of increased headaches before things improve. If you find yourself reaching for pain relievers more than two or three days a week, that’s a signal to explore preventive strategies instead of continuing to treat each headache as it comes.
Preventing Headaches Before They Start
For people with frequent migraines (four or more per month), preventive treatment often does more good than any acute medication. Several prescription options exist, including blood pressure medications, certain antidepressants, and anti-seizure drugs that have been found to reduce migraine frequency. Monthly or quarterly CGRP-blocking injections are a newer preventive option that targets migraines specifically rather than borrowing a drug designed for another condition.
Some supplements also have meaningful evidence behind them. The American Headache Society notes that riboflavin (vitamin B2) at 400 milligrams per day can help reduce migraine frequency. Coenzyme Q10 at 300 milligrams per day has also been shown to reduce how often migraines occur in adults. Magnesium, taken orally as magnesium oxide or magnesium citrate, is another commonly recommended option, though the optimal dose varies. These supplements are well tolerated and worth trying before or alongside prescription preventives, especially for people who prefer fewer medications.
Lifestyle factors matter too, and sometimes more than any pill. Consistent sleep schedules, regular hydration, stress management, and identifying personal triggers (certain foods, alcohol, hormonal changes, weather shifts) can meaningfully reduce headache frequency. These aren’t just add-ons to medication. For many people, they’re the foundation that makes everything else work.
Matching the Medicine to Your Headache
The “best” headache medicine is really a question of matching the treatment to the problem. A quick reference:
- Occasional tension headache: Ibuprofen or acetaminophen, taken early when the headache starts.
- Tension headache that doesn’t respond to one ingredient: A combination of acetaminophen, aspirin, and caffeine.
- Migraine attacks: Triptans or gepants, depending on your cardiovascular health and how you respond.
- Cluster headaches: High-flow oxygen or sumatriptan injection for fast relief.
- Frequent migraines (4+ per month): Daily preventive medication or supplements like riboflavin, CoQ10, or magnesium.
- Headaches more than 2 to 3 days per week: Stop relying on acute medication and shift toward prevention to avoid rebound headaches.
If over-the-counter options aren’t controlling your headaches, or if you’re using them more than a couple of times a week, that’s a sign the headache type may need a more targeted approach. Migraines in particular are undertreated because many people assume their “bad headaches” are just tension headaches and never try the medications that would actually work.

