Some headache medicines, such as ibuprofen, acetaminophen, or aspirin, can be used for mild to moderate headaches caused by colds, stress, or fatigue.
In cases of severe headaches or migraines, a doctor may recommend other medications like sumatriptan or dihydroergotamine mesylate, which help by narrowing the brain’s blood vessels and blocking pain signals.
Treatment for headaches should always be guided by a neurologist or general practitioner, who can recommend the best medicine based on age, headache type, and severity.
Over-the-counter medicines
The most commonly used over-the-counter headache medicines include:
1. Acetaminophen
Acetaminophen (Tylenol) is an over-the-counter pain reliever used for mild to moderate headaches. It is available in tablets, capsules, and liquid forms.
Some products combine acetaminophen with caffeine, which helps improve absorption and provides faster relief.
Although generally safe, taking more than the recommended dose of acetaminophen can seriously damage the liver and may lead to life-threatening liver failure.
How to use: The recommended adult dose is 1 to 2 tablets of 500 mg, 3 to 4 times per day, with or without food. Do not exceed 8 tablets (4,000 mg) in 24 hours.
2. Ibuprofen
Ibuprofen (Advil, Motrin) is a nonsteroidal anti-inflammatory drug (NSAID) that helps relieve headache pain by reducing inflammation and blocking pain signals.
It is available in tablets, capsules, and liquid drops. It should not be used by pregnant women, breastfeeding women, or children under 6 months of age.
Ibuprofen should also be avoided by people who have allergies to NSAIDs or conditions such as gastritis, ulcers, gastrointestinal bleeding, asthma, or rhinitis.
How to use: The recommended adult dose is 1 to 2 tablets of 200 mg every 8 hours, after meals. Do not exceed 3,200 mg per day (typically 5 doses of 200 mg).
3. Aspirin
Aspirin (acetylsalicylic acid) is another NSAID used to treat headaches and is available in 325 mg or 500 mg tablets.
It should not be used during pregnancy, by children under 12, or by people with conditions like dengue, stomach ulcers, gastritis, or intestinal bleeding.
Aspirin should also be avoided by individuals who are taking blood thinners like warfarin, as it may increase the risk of bleeding.
How to use: The recommended adult dose is 1 to 2 tablets of 500 mg every 4 to 8 hours. Do not take more than 8 tablets (4,000 mg) per day.
Combination products that include aspirin, acetaminophen, and caffeine—such as Excedrin Migraine—are also available for migraine relief.
4. Naproxen
Naproxen (Aleve) is a nonsteroidal anti-inflammatory drug (NSAID) that helps relieve headaches by reducing inflammation and blocking pain signals. It can also be used to help manage migraine symptoms.
It is available in tablets or capsules and should not be used by pregnant women, breastfeeding women, or people with a history of stomach ulcers, gastrointestinal bleeding, or kidney problems.
How to use: The typical adult dose is one 220 mg tablet every 8 to 12 hours. Do not exceed 660 mg in a 24-hour period unless advised by a healthcare provider.
Prescription medicines
In addition to over-the-counter options, several prescription medicines may be recommended by a doctor to treat or prevent headaches, especially migraines or chronic tension-type headaches.
5. Sumatriptan
Sumatriptan (Imitrex) is a prescription medication used to treat migraine attacks, with or without aura.
It works by narrowing the blood vessels in the brain and blocking pain pathways. It is available as tablets, nasal sprays, and injections under brand names like Imitrex, Tosymra, or Sumavel.
Sumatriptan is not recommended for children, pregnant women, or individuals with uncontrolled high blood pressure, coronary artery disease, or a history of stroke.
How to use: The typical adult dose is one 50 mg tablet taken at the first sign of migraine symptoms. If symptoms return, another dose may be taken after at least 2 hours, but do not exceed 200 mg per day.
Other triptans that may be prescribed include naratriptan (Amerge), zolmitriptan (Zomig), and rizatriptan (Maxalt).
6. Dihydroergotamine mesylate
Dihydroergotamine mesylate is used to relieve severe headaches or acute migraine attacks and is typically prescribed for adults. It is available in nasal spray or injection form in the US under the brand name Migranal.
It works by narrowing blood vessels in the brain and reducing pain signals.
This medication should not be used by pregnant or breastfeeding women, children, or individuals with liver or kidney problems, high blood pressure, vascular disease, coronary artery disease, or a history of heart attack.
How to use: For the nasal spray form, the usual adult dose is one spray (0.5 mg) in each nostril at the onset of a migraine. If needed, a second dose can be used after 15 minutes, up to a total of 4 sprays (2 mg) per day.
7. Acetaminophen + butalbital + caffeine
This combination medicine, sold under brand names like Fioricet, is used to treat tension headaches and some types of migraines. Butalbital is a barbiturate that helps relax muscle contractions, while caffeine enhances the pain-relieving effect of acetaminophen.
How to use: Typically prescribed as 1 to 2 capsules every 4 hours as needed. Do not take more than 6 capsules in 24 hours. Because it contains butalbital, it may cause dependence if used frequently.
8. Naproxen + sumatriptan
Available under brand names like Treximet, this medication combines an anti-inflammatory with a migraine-specific drug. It is often used for acute migraine attacks and can help reduce symptoms more effectively than either drug alone.
How to use: One tablet at the onset of migraine symptoms. A second dose may be taken after 2 hours if needed, but do not exceed 2 tablets in 24 hours.
9. Divalproex sodium
Divalproex sodium (Depakote) is an anticonvulsant used as a preventive treatment for migraines. It is often prescribed for people who experience frequent or severe migraine attacks.
How to use: Taken daily in tablet form, as prescribed by a doctor. It is not used to treat migraines once they start but helps reduce how often they occur.
10. Propranolol
Propranolol is a beta-blocker used to prevent migraines. It may be particularly helpful for people who also have high blood pressure, anxiety, or essential tremor.
How to use: Usually taken once or twice a day. It is used as a long-term treatment to reduce the frequency and intensity of migraine attacks.
11. Topiramate
Topiramate (Topamax) is another anticonvulsant used for migraine prevention. It helps reduce nerve activity in the brain and may be recommended for people with frequent or disabling migraines.
How to use: Taken daily, often starting at a low dose and gradually increased. It is not intended for immediate headache relief.
12. CGRP inhibitors
CGRP inhibitors are a newer class of drugs that block a protein involved in migraine attacks. Some are used to relieve migraines when they occur, while others are taken regularly to prevent them. Examples include:
-
Erenumab (Aimovig) – monthly injection for prevention
-
Rimegepant (Nurtec ODT) – oral dissolvable tablet for acute relief or prevention
-
Ubrogepant (Ubrelvy) – oral tablet for acute migraine relief
How to use: Usage depends on the specific medication. Some are taken at the first sign of migraine, while others are used as routine monthly treatments.
Headache medicine during pregnancy
During pregnancy, the safest headache medicine is acetaminophen, which is generally considered safe when used under medical guidance.
However, many medications can cross the placenta and potentially affect the baby’s development. For this reason, natural or non-pharmacological options—such as rest, hydration, cold compresses, and gentle massage—are usually preferred during pregnancy.
Always consult an obstetrician before using any medication while pregnant.