Antacids can relieve stomach ulcer pain, but they are not the most effective treatment for healing an ulcer. Proton pump inhibitors (PPIs) are the gold standard, consistently keeping stomach acid low for 15 to 22 hours per day and healing ulcers significantly faster than any other option. If you’re looking for the best over-the-counter relief while you get proper treatment, a combination aluminum-magnesium antacid offers the strongest balance of symptom control and tolerability.
Why Antacids Alone Won’t Heal Most Ulcers
Antacids neutralize acid that’s already in your stomach, which brings fast but temporary relief. They don’t stop your stomach from producing more acid. A randomized controlled trial found that a low-dose aluminum-magnesium antacid healed 67% of gastric ulcers after six weeks, compared to 25% with placebo. That sounds decent until you compare it to stronger acid-suppressing medications.
PPIs (sold over the counter as omeprazole, esomeprazole, and lansoprazole) shut down the acid-producing pumps in your stomach lining directly. They maintain a low-acid environment for most of the day, which gives the ulcer crater time to close. In head-to-head comparisons, PPIs healed about 15% more duodenal ulcers and 10% more gastric ulcers than H2 blockers (like famotidine) after just two weeks. H2 blockers themselves only keep acid suppressed for about four hours per dose, healing roughly 76 to 78% of ulcers over a full treatment course.
So the hierarchy is clear: PPIs heal ulcers fastest, H2 blockers are a solid second choice, and antacids are the weakest option for actual healing. But antacids still play a useful supporting role for immediate pain relief while stronger medications take effect, since PPIs can take one to four days to reach full acid suppression.
How the Three Main Antacid Types Compare
Not all antacids work equally well, and each comes with trade-offs worth knowing about.
Calcium carbonate (Tums, Rolaids) has the highest acid-neutralizing capacity of the three common types. It works by binding to free acid in your stomach and raising pH quickly. The downside: it tends to cause constipation and gas, and long-term heavy use can lead to dangerously high calcium levels in your blood, a condition sometimes called milk-alkali syndrome. If you have a history of kidney stones, calcium-based antacids are a poor choice.
Magnesium hydroxide (Milk of Magnesia) reacts rapidly with stomach acid and provides fast relief. Its main side effect is diarrhea, which gets worse at higher doses. For people who already deal with loose stools, this one can make things uncomfortable.
Aluminum hydroxide has the lowest neutralizing power of the three. It tends to cause constipation and, with prolonged use, can deplete phosphorus and magnesium levels in your body.
This is why many pharmacists recommend combination products that contain both aluminum and magnesium (like Maalox or Mylanta). The two ingredients offset each other’s bowel effects: aluminum slows things down, magnesium speeds them up. The result is more balanced digestion and a broader acid-neutralizing effect.
When Antacids Are Not Enough
The most common cause of stomach ulcers is infection with the bacterium H. pylori. No amount of antacid, and no PPI on its own, will permanently heal an ulcer caused by this infection. The bacteria burrow into your stomach lining and create ongoing inflammation. Without antibiotics, the ulcer will keep coming back.
Current guidelines recommend testing for H. pylori as the first step for anyone with ulcer symptoms. If the test is positive, treatment involves a PPI combined with two or three antibiotics taken for 10 to 14 days. The preferred regimen pairs a PPI with bismuth (the active ingredient in Pepto-Bismol) and two antibiotics, because this combination works well even against antibiotic-resistant strains. Older triple-therapy regimens have become less reliable as bacterial resistance has increased worldwide.
The second most common cause is regular use of nonsteroidal anti-inflammatory drugs (NSAIDs) like ibuprofen, aspirin, or naproxen. These medications weaken the protective mucus lining of your stomach. If NSAID use is the cause, stopping or reducing the medication (when possible) is essential, alongside a PPI to let the ulcer heal.
Timing Antacids for Ulcer Pain
Ulcer pain often flares between meals and at night, when your stomach is empty and acid has nothing to digest but your own tissue. For daytime relief, take antacids about an hour after eating. For nighttime symptoms, take them on an empty stomach at bedtime rather than with a meal, since food can change how they work.
If you’re also taking a PPI or a prescription mucosal protectant (which forms a physical coating over the ulcer), space your antacid at least 30 minutes before or after the other medication. Antacids can interfere with the absorption of many drugs when taken at the same time.
Signs You Need More Than an Antacid
Certain symptoms signal that an ulcer may be bleeding or perforating, both of which require immediate medical attention. Black, tarry stools indicate bleeding somewhere in your upper digestive tract. Vomit that looks like coffee grounds is another sign of active bleeding. Sudden, severe abdominal pain that doesn’t ease up, dizziness, fainting, or a racing pulse all point to a potential emergency. If any of these appear, an antacid is not the answer.
Even without those red flags, relying on antacids for more than two weeks to manage recurring stomach pain is a signal that something deeper is going on. Ulcers left untreated can erode through the stomach wall or cause scarring that narrows the digestive tract. Getting tested for H. pylori and starting appropriate treatment is the single most important step you can take to resolve the problem rather than just masking it.

