What Medicine Should You Take for a Headache?

For most headaches, an over-the-counter pain reliever like ibuprofen (Advil, Motrin) or acetaminophen (Tylenol) is the first-line choice. These work well for tension headaches, the most common type, and for mild to moderate migraines. Which one you reach for, how much you take, and when to consider something stronger depends on the type of headache you’re dealing with and your overall health.

Over-the-Counter Options

Ibuprofen and acetaminophen work differently but are equally reasonable starting points. Ibuprofen reduces inflammation and blocks pain signals, making it particularly effective when a headache involves swollen blood vessels or muscle tension. Acetaminophen works primarily on pain perception in the brain rather than inflammation. Both typically start relieving pain within 30 to 60 minutes.

Aspirin and naproxen (Aleve) are two other over-the-counter options. Naproxen lasts longer than ibuprofen, around 8 to 12 hours per dose, so it can be a better pick if your headaches tend to linger. Combination products that pair acetaminophen with ibuprofen or with aspirin and caffeine (like Excedrin) can also be more effective than a single ingredient alone, since they target pain through multiple pathways at once.

Caffeine deserves a special mention. It narrows blood vessels in the brain and helps your body absorb pain relievers faster. That’s why it’s included in products like Excedrin Migraine. A cup of coffee alongside your pain reliever can have a similar boosting effect, though regular caffeine users may see less benefit.

Safe Dosing Limits

Acetaminophen has a hard ceiling: no more than 4,000 milligrams (4 grams) in a 24-hour period. Going over that threshold risks serious liver damage, and the margin for error shrinks if you drink alcohol regularly or take other products that contain acetaminophen (many cold and flu medicines do). For most adults, staying at or below 3,000 mg per day is a safer target.

Ibuprofen’s over-the-counter maximum is typically 1,200 mg per day (three doses of 400 mg, spaced six to eight hours apart). Taking it with food reduces the chance of stomach irritation. Naproxen tops out at 660 mg per day without a prescription.

For children, ibuprofen is dosed by weight at roughly 10 mg per kilogram, with a maximum of 600 mg per dose. Acetaminophen is also weight-based. Always use a measuring device rather than a kitchen spoon, and never give aspirin to children or teenagers because of the risk of a rare but serious condition called Reye’s syndrome.

Who Should Avoid NSAIDs

Ibuprofen, naproxen, and aspirin all belong to a class called NSAIDs (nonsteroidal anti-inflammatory drugs). They’re effective, but they’re not safe for everyone. The National Kidney Foundation recommends that people with chronic kidney disease avoid NSAIDs entirely, especially if kidney function is below a certain level. The same goes for people with liver disease, heart failure, or high blood pressure, and for those taking blood pressure medications like ACE inhibitors or diuretics.

NSAIDs can also irritate the stomach lining and raise the risk of ulcers or bleeding, particularly with long-term use. If any of these apply to you, acetaminophen is generally the safer choice for headache relief, since it doesn’t affect the stomach, kidneys, or blood pressure in the same way.

Prescription Medicines for Migraines

If over-the-counter options don’t touch your headache, or if your headaches come with nausea, light sensitivity, or throbbing pain on one side of your head, you’re likely dealing with migraines. Migraines often need targeted treatment.

Triptans are the most widely prescribed class for acute migraine attacks. They work by changing blood circulation in the brain and altering how the brain processes pain signals. Sumatriptan (Imitrex) is the most common, available as a tablet, nasal spray, or injection. Other options include rizatriptan (Maxalt) and zolmitriptan (Zomig). Triptans work best when taken early in a migraine, ideally within the first hour of symptoms. They’re not painkillers in the traditional sense; they specifically interrupt the migraine process.

A newer class of migraine medications called gepants works by blocking a protein involved in migraine pain (CGRP). Ubrogepant and rimegepant are oral options that can be taken during an attack, similar to triptans. Rimegepant has an added benefit: it can also be taken regularly as a preventive. Clinical trials have shown these drugs carry fewer side effects than older migraine preventives, and they appear safe for people with cardiovascular risk factors, which matters because triptans aren’t recommended for people with heart disease or uncontrolled blood pressure.

Cluster Headache Treatment

Cluster headaches are a different beast. They produce intense, stabbing pain around one eye and can strike multiple times a day for weeks. Standard painkillers are too slow to help because cluster attacks peak within minutes.

The two most effective treatments are high-flow oxygen and injectable sumatriptan. Breathing pure oxygen through a mask provides relief for most people within about 15 minutes. An injection of sumatriptan works even faster. Nasal spray versions of sumatriptan or zolmitriptan also work, though not quite as quickly as a shot. Oral medications are generally too slow for cluster headaches, which is why injections and sprays are preferred.

The Rebound Headache Trap

Taking headache medicine too frequently can, paradoxically, cause more headaches. This is called medication overuse headache, and it’s diagnosed when headaches occur on 15 or more days per month in someone who has been using acute pain medication regularly for more than three months. The threshold depends on the drug: for triptans, combination analgesics, and opioids, using them on 10 or more days per month can trigger the cycle. For simple painkillers like ibuprofen or acetaminophen alone, the cutoff is 15 days per month.

The pattern usually looks like this: you take medicine for a headache, it wears off, another headache appears, you take more medicine. Over weeks, the headaches become more frequent until they’re nearly daily. Breaking the cycle typically means stopping the overused medication, which can temporarily make headaches worse before they improve. If you notice your headaches getting more frequent over time, that pattern itself is worth paying attention to.

Headache Warning Signs

Most headaches are harmless, but certain features signal something more serious. A sudden, explosive headache that reaches maximum intensity within seconds (sometimes called a “thunderclap headache”) can point to a ruptured blood vessel and needs emergency evaluation immediately.

Other red flags include headache accompanied by fever, night sweats, or unexplained weight loss; headache with new neurological symptoms like weakness in an arm or leg, numbness, or vision changes; a new pattern of headaches starting after age 50; headaches that are clearly getting worse over weeks; and headaches that change with body position or are triggered by coughing or straining. A headache that starts during or shortly after pregnancy also warrants prompt evaluation, since it can reflect blood pressure or vascular problems specific to that period.

None of these necessarily mean something catastrophic is happening, but they’re the scenarios where imaging or further workup can rule out causes that need treatment beyond a pain reliever.