Our Services
Medical Information
Helpful Resources
Published on: 9/15/2026
Persistent stomach pain lasting weeks is far more often caused by a peptic ulcer, gastritis, acid reflux, H. pylori infection, or IBS than by stomach cancer, which is rare and usually appears with additional warning signs. Ulcer pain tends to be burning or gnawing in the upper abdomen and may change with meals, while cancer is more often suggested by unexplained weight loss, difficulty swallowing, vomiting, black or bloody stools, early fullness, or persistent fatigue and anemia. Because both conditions share overlapping symptoms and only testing such as endoscopy, H. pylori screening, or imaging can tell them apart, there are several important factors to consider below before assuming the cause. Pain that continues for more than two weeks, worsens, or comes with any red flag symptom deserves prompt medical evaluation rather than continued self treatment with antacids.
Since timing, symptom pattern, and personal risk factors change how urgently you should be seen, a free, instant, online symptom check can help you organize what you are experiencing and understand the most likely explanations and sensible next steps.
Last reviewed for medical accuracy: 09/14/2026
Stomach pain is a symptom many people experience at some point. When that pain lasts for weeks, it’s natural to worry about serious conditions like stomach cancer or an ulcer. While both can cause discomfort, stomach cancer is much less common than ulcers or other digestive issues. This guide helps you understand possible causes, warning signs, and next steps—without unnecessary alarm.
Persistent stomach pain often stems from non-cancerous issues, including:
While these are far more likely than cancer, ongoing pain always warrants investigation.
Peptic ulcers are open sores that develop on the lining of the stomach or the first part of the small intestine. They often cause burning or gnawing pain.
Most ulcers respond well to treatment with medications that reduce stomach acid and, if needed, antibiotics to clear H. pylori.
Stomach cancer develops when abnormal cells grow in the stomach lining. It’s much less common than ulcers, especially in younger people.
Because early stomach cancer often has no symptoms or only vague discomfort, it’s frequently diagnosed at a later stage. That’s why it’s crucial to pay attention to any “alarm” signs.
| Symptom | Peptic Ulcer | Stomach Cancer |
|---|---|---|
| Stomach pain | Burning, relieved by eating or antacids | Constant or progressive, not relieved |
| Appetite changes | Possible decrease due to pain | Often sharp decrease |
| Weight loss | Mild or none | Noticeable, unintentional |
| Nausea/vomiting | Occasional | May be persistent or severe |
| Vomiting blood | Possible but less common | More concerning |
| Stool changes | Rarely causes bleeding | Black, tarry stools |
| Feeling full quickly | Uncommon | Common |
This table highlights trends, not absolutes. Only a medical evaluation can provide a clear diagnosis.
If you experience any of the following “alarm symptoms,” schedule an appointment promptly:
Even if your symptoms seem mild, don’t ignore stomach pain that lasts more than two weeks. Early evaluation improves outcomes, whether it’s an ulcer that requires treatment or a more serious condition.
A healthcare professional may recommend:
These tests help distinguish between ulcers, gastritis, cancer, and other digestive disorders.
Most people heal fully with proper treatment and follow-up.
Early-stage cancer has better treatment outcomes. Advanced cases may require combined approaches to control symptoms and improve quality of life.
It’s natural to worry about persistent stomach pain. However, remember:
You might also consider doing a free, online symptom check, using the doctor approved Ubie Symptom Checker to help you sort through your symptoms and decide on next steps.
Persistent stomach pain shouldn’t be ignored. While most cases turn out to be ulcers or benign digestive issues, the possibility of gastritis or, rarely, stomach cancer makes professional evaluation key.
Most importantly, if you have any warning signs—such as bleeding, weight loss, or severe pain—speak to a doctor right away. Early diagnosis and treatment lead to the best outcomes.
(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.