The heartburn aisle can be confusing. Prilosec, Nexium, Pepcid and Tums all promise relief, but they work in completely different ways, at very different speeds, and they are meant for different situations. Choosing the wrong one can mean waiting days for relief you needed in minutes, or taking a powerful daily drug for a problem that only shows up after the occasional pizza.
This guide compares the four, using product labels and research, so you can match the medicine to your symptoms and know when it is time to see a doctor instead.
The quick answer
- Tums (calcium carbonate) is an antacid. It works fastest but wears off quickly, often in about an hour. Best for occasional heartburn.
- Pepcid (famotidine) is an H2 blocker. It starts working within about an hour and lasts for several hours. Good for occasional or predictable heartburn, and can be taken before a trigger meal.
- Prilosec (omeprazole) and Nexium (esomeprazole) are proton pump inhibitors (PPIs). They are the strongest acid reducers but take 1 to 4 days for full effect. OTC versions are for frequent heartburn, as a 14-day course.
- At equivalent doses, Nexium and Prilosec perform about the same in most trials.
How each one works
Antacids: Tums
Antacids like Tums contain calcium carbonate, which directly neutralizes acid that is already in your stomach. They do not stop your stomach making more.
H2 blockers: Pepcid
Famotidine blocks histamine-2 receptors on the acid-producing cells in your stomach, reducing how much acid they make. Pepcid AC and Zantac 360 both contain famotidine (Kaiser Permanente drug guide).
PPIs: Prilosec and Nexium
PPIs switch off the proton pumps that pump acid into the stomach. This is the final step in acid production, which is why PPIs are the most powerful acid reducers. Omeprazole is a 50/50 mix of two mirror-image forms of the molecule. Esomeprazole contains just one of those forms, the S-form (Therapeutics Initiative, UBC).
Speed and duration
A randomized trial published in JAMA compared Tums with a 10 mg dose of famotidine after a meal (Feldman, 1996):
- Calcium carbonate started neutralizing acid quickly, within the first 30 minutes, but its effect lasted only about 60 minutes.
- Famotidine took longer to start, beginning after about 90 minutes in that study, but its effect lasted at least 9 hours.
StatPearls, a medical reference, states that oral famotidine starts acting within 1 hour and peaks at 1 to 3 hours (StatPearls: Famotidine).
PPIs are different again. The Prilosec OTC label says it is not intended for immediate relief and may take 1 to 4 days for full effect, although some people get complete relief within 24 hours (DailyMed).
Prilosec vs Nexium: is Nexium better?
Nexium was marketed as an improvement on Prilosec. But independent reviews have not found a meaningful advantage at equivalent doses. A 2026 review by the University of British Columbia's Therapeutics Initiative found that of 5 trials comparing esomeprazole and omeprazole at equivalent doses for reflux or erosive esophagitis, 3 showed no significant difference and 1 favored omeprazole. The only study favoring esomeprazole compared non-equivalent doses (Therapeutics Letter 160).
Both share the same class warnings and long-term risks. OTC versions of both follow the same 14-day, every-4-months regimen. For most people, the choice comes down to cost and personal response.
Pepcid vs Prilosec
- Strength: PPIs suppress acid more strongly. For healing erosive esophagitis, the American College of Gastroenterology strongly recommends PPIs over H2 blockers (ACG GERD Guideline, 2022).
- Speed: Pepcid works within about an hour. Prilosec takes days to reach full effect.
- Flexibility: Pepcid can be taken as needed or before a trigger meal. The Pepcid AC label directs taking it 15 to 60 minutes before eating food or drinking beverages that cause heartburn, and not using more than 2 tablets in 24 hours unless directed by a doctor (MedlinePlus).
- Kidneys: Famotidine is cleared by the kidneys, so people with reduced kidney function may need a lower dose. The American Geriatrics Society advises a reduced dose for older adults with reduced kidney function (StatPearls).
Tums: fast but short
- Best for occasional, mild heartburn when you want relief right away.
- Its effect is short, so it is not a solution for frequent heartburn.
- Calcium carbonate can cause constipation in some people.
- Antacids can affect how other medicines are absorbed, so ask your pharmacist about spacing them apart from your other medicines.
- Follow the label's maximum daily dose. Regularly needing the maximum is a reason to see a doctor.
Which one fits your heartburn?
Occasional heartburn (less than twice a week)
An antacid like Tums for fast relief, or famotidine if you want longer-lasting relief. A PPI is usually more than you need.
Predictable heartburn (you know a certain meal will trigger it)
Famotidine taken 15 to 60 minutes before that meal, according to the label.
Frequent heartburn (2 or more days a week)
An OTC PPI like Prilosec OTC or Nexium 24HR, taken as a 14-day course as labeled. See How long can you take Prilosec OTC?
Heartburn that keeps coming back, or lasts more than 3 months
See a doctor. You may need a diagnosis, testing or a prescription plan. See Prilosec OTC vs prescription omeprazole.
Side effects and safety at a glance
- PPIs (Prilosec, Nexium): most common side effects include headache, stomach pain, nausea, diarrhea and gas. Long-term use is linked with low magnesium, low vitamin B12, C. diff infection and other concerns. See Omeprazole side effects.
- H2 blockers (Pepcid): generally well tolerated; doses need adjusting for reduced kidney function.
- Antacids (Tums): constipation is possible; follow label limits; can interfere with absorption of other drugs.
Do not self-treat if you have warning signs
See a doctor rather than choosing a heartburn medicine if you have trouble or pain swallowing, vomiting blood, black or bloody stools, unexplained weight loss, or chest pain, especially with sweating, shortness of breath or pain spreading to the arm, neck or shoulder. These warnings appear on OTC heartburn labels because heartburn-like pain can sometimes be a heart problem.
Frequently asked questions
Can I take Tums with Prilosec?
Yes, generally. The omeprazole prescribing information says antacids may be used together with omeprazole. Tums can bridge the gap while omeprazole builds up its effect.
Can I take Pepcid and Prilosec together?
Doctors sometimes combine them in specific situations, but do not combine them on your own without advice. Ask your doctor or pharmacist.
Is Nexium stronger than Prilosec?
At equivalent doses, trials mostly show no meaningful difference, according to the Therapeutics Initiative review.
Which is safest for long-term use?
No heartburn medicine should be taken long-term without a doctor's review. PPIs carry the most label warnings for long-term use, which is one reason to use the least powerful option that controls your symptoms.
What about natural options?
Lifestyle changes such as weight loss, not eating within 2 to 3 hours of bedtime and raising the head of the bed are recommended by the ACG. See How to reduce reflux without Prilosec.
The bottom line
Match the medicine to the problem. Tums for fast relief of occasional heartburn, Pepcid for longer or planned relief, and an OTC PPI like Prilosec or Nexium only for frequent heartburn as a 14-day course. If you need any of them often, see a doctor. For more, read our complete guide to Prilosec.
Sources
- Feldman M. Comparison of the effects of over-the-counter famotidine and calcium carbonate antacid on postprandial gastric acid. JAMA. 1996. PubMed.
- Therapeutics Initiative (UBC). Therapeutics Letter 160: Surge in doses of PPIs. 2026. ti.ubc.ca.
- StatPearls. Famotidine. NCBI Bookshelf.
- MedlinePlus. Famotidine. MedlinePlus. Kaiser Permanente. Pepcid AC 10 mg tablet. KP drug encyclopedia.
- Katz PO, et al. ACG Clinical Guideline for GERD. 2022. PMC.
- Prilosec OTC Drug Facts label; omeprazole prescribing information. DailyMed (OTC); DailyMed (Rx).
Medical note: This article is for education and does not replace advice from your doctor or pharmacist. Always follow product labels. Chest pain, trouble swallowing, vomiting blood or black stools need urgent medical care.

