Our Services
Medical Information
Helpful Resources
Published on: 9/15/2026
Stomach pain that persists for weeks can be a sign of a peptic ulcer, and in less common cases stomach cancer, though gastritis, H. pylori infection, acid reflux, IBS, and gallbladder problems are far more frequent explanations. Red flags that warrant prompt medical evaluation include black or bloody stools, vomiting blood, unexplained weight loss, difficulty swallowing, feeling full after only a few bites, or ongoing nausea and vomiting. The pain's location, its timing in relation to meals, your age, NSAID use, and family history all shift the likelihood in meaningful ways, and there are several important factors to consider below before assuming the worst or dismissing it. Because ulcers and stomach cancer can produce nearly identical early symptoms, guessing from a list is far less useful than mapping your specific pattern of symptoms against the conditions that actually match them. Take a free, instant, online symptom check to see which causes best fit what you are experiencing and to understand which next step, from a pharmacy visit to an urgent doctor's appointment, makes sense for you.
Last reviewed for medical accuracy: 09/14/2026
Could stomach pain for weeks be a sign of an ulcer or stomach cancer?
Stomach pain—discomfort anywhere between the chest and the groin—is a common complaint. When that pain stretches over days or weeks, it’s natural to wonder if something serious, like a peptic ulcer or stomach (gastric) cancer, could be behind it. While most prolonged stomach pain stems from less threatening issues, it’s important to recognize warning signs, understand possible causes, and know when to seek medical advice.
• Any ache, cramp, or burning in the upper or central abdomen lasting more than 14 days.
• Pain that comes and goes but recurs month after month.
• Discomfort interfering with sleep, work or daily activities.
If your symptoms fit this pattern, it’s time to explore potential causes.
Before jumping to worst-case scenarios, consider these frequent culprits:
• Gastritis – inflammation of the stomach lining, often due to infection (H. pylori), alcohol, stress or certain medications (NSAIDs).
• Acid reflux (GERD) – stomach acid creeping up into the esophagus, causing heartburn and pain.
• Peptic ulcer – a sore in the stomach or upper small intestine lining, commonly from H. pylori infection or long-term NSAID use.
• Irritable bowel syndrome (IBS) – a functional gut disorder leading to cramping, bloating and changes in bowel habits.
• Gallbladder issues – gallstones or inflammation can cause upper-right abdominal pain radiating to the back.
• Pancreatitis – inflammation of the pancreas, often intense and constant, sometimes triggered by gallstones or alcohol.
• Food intolerances – lactose or gluten sensitivity can lead to ongoing crampy pain and bloating.
• Stress and anxiety – can heighten perception of normal digestive activity, leading to persistent discomfort.
Most of these conditions are manageable and often reversible with lifestyle changes or medication.
Peptic ulcers are open sores that develop on the inner lining of the stomach (gastric ulcer) or upper small intestine (duodenal ulcer).
Key symptoms
• Burning or gnawing pain between meals or at night
• Pain that briefly eases after eating or taking antacids
• Bloating, belching or heartburn
• Nausea or mild vomiting
Risk factors
Diagnosis and treatment
With proper care, most ulcers heal completely within several weeks. However, complications (bleeding or perforation) can occur if left untreated.
Stomach cancer is far less common than ulcers but becomes more likely as you age, especially past 60. Early stages often cause vague, mild symptoms.
Possible symptoms
• Persistent stomach pain or discomfort
• Feeling full after small meals (early satiety)
• Unexplained weight loss
• Loss of appetite
• Nausea or vomiting
• Blood in stool or vomit (dark, tar-like stool; coffee-ground vomit)
• Fatigue, weakness (from anemia)
Risk factors
Diagnosis
Treatment
Early detection improves outcomes dramatically, but symptoms can overlap with benign conditions, making prompt evaluation crucial.
Most prolonged stomach pain has a benign cause, but watch for:
If you notice any of these warning signs, seek medical care immediately.
A doctor will take your history, perform a physical exam, and may order tests such as:
Discuss your full symptom picture, including pain patterns, diet, stress levels and medication use. This helps your provider narrow down the cause and choose the right tests.
While you’re waiting for a medical evaluation, consider these steps to ease discomfort and support digestive health:
• Eat small, regular meals – avoid large, heavy servings.
• Limit or avoid known irritants:
You might also try a free, online symptom check, using the doctor approved Ubie Symptom Checker to get insights into potential causes and next steps.
• Keep track of any changes in your pain, appetite or weight.
• Share your symptom diary with your healthcare provider.
• Follow through on recommended tests and treatments.
• Ask for referrals if your symptoms persist or worsen.
Remember, most cases of stomach pain—even when lasting weeks—are not cancer. Peptic ulcers and acid reflux are far more common and often respond well to treatment. However, persistent pain accompanied by any red flags should not be ignored.
This information is not a substitute for professional medical advice. If you experience severe or worrying symptoms, please speak to a doctor promptly. Early evaluation and intervention can make all the difference in diagnosing and treating conditions like ulcers or, more rarely, stomach cancer.
(References)
* Flasar MH, Goldberg E. Acute abdominal pain. Med Clin North Am. 2006 May;90(3):481-503. doi: 10.1016/j.mcna.2005.11.005. PMID: 16473101.
* Horn A, O'Neill G, Costantino TG. Pneumoperitoneum. J Emerg Med. 2011 Jun;40(6):e121-2. doi: 10.1016/j.jemermed.2008.11.020. Epub 2009 Feb 28. PMID: 19251388.
* Schulman AR, Tavakkoli A, Thompson CC, Miller AL, Loscalzo J. Making the Connection. N Engl J Med. 2017 Feb 2;376(5):476-482. doi: 10.1056/NEJMcps1602495. PMID: 28146669.
* Hána L, Ryska M. Acute abdomen in drug abusers. Rozhl Chir. 2019 Winter;98(1):14-17. PMID: 30781961.
* Qi X, Guo X, Shao X. Double pylorus. Dig Liver Dis. 2019 Dec;51(12):1739. doi: 10.1016/j.dld.2019.09.007. Epub 2019 Oct 11. PMID: 31611154.
* Bartolo AD, Sircar S, Mitchell R. Post-partum duodenal perforation. N Z Med J. 2020 Jun 12;133(1516):97-99. Epub 2020 Jun 12. PMID: 32525866.
* Lax Y, Singh A. Referred Abdominal Pain. Pediatr Rev. 2020 Aug;41(8):430-433. doi: 10.1542/pir.2019-0221. PMID: 32737258.
* Demir M, Akın M, Yücel N, Unal A, Gürel D, Yaşa E. Role of Radiology and Laparoscopy in Childhood Peptic Ulcer Perforation. J Environ Public Health. 2022;2022:1211499. doi: 10.1155/2022/1211499. Epub 2022 Jul 20. PMID: 35910757; PMCID: PMC9328947.
* Corazziari ES, Gasbarrini A, D'Alba L, D'Ovidio V, Riggio O, Passaretti S, Annibale B, Cicala M, Repici A, Bassotti G, Ciacci C, Di Sabatino A, Neri M, Bragazzi MC, Ribichini E, Radocchia G, Iovino P, Marazzato M, Schippa S, Badiali D. Poliprotect vs Omeprazole in the Relief of Heartburn, Epigastric Pain, and Burning in Patients Without Erosive Esophagitis and Gastroduodenal Lesions: A Randomized, Controlled Trial. Am J Gastroenterol. 2023 Nov 1;118(11):2014-2024. doi: 10.14309/ajg.0000000000002360. Epub 2023 Jun 13. PMID: 37307528; PMCID: PMC10617666.
* Vakil N. Peptic Ulcer Disease: A Review. JAMA. 2024 Dec 3;332(21):1832-1842. doi: 10.1001/jama.2024.19094. PMID: 39466269.
We would love to help them too.
For First Time Users
We provide a database of explanations from real doctors on a range of medical topics. Get started by exploring our library of questions and topics you want to learn more about.
Was this page helpful?
Purpose and positioning of servicesUbie Doctor's Note is a service for informational purposes. The provision of information by physicians, medical professionals, etc. is not a medical treatment. If medical treatment is required, please consult your doctor or medical institution. We strive to provide reliable and accurate information, but we do not guarantee the completeness of the content. If you find any errors in the information, please contact us.