Health Conditions A-Z Digestive Disorders What Causes Stomachaches? Stomachaches can happen for many reasons, ranging from short-term illnesses to chronic diseases to dietary choices. By Amanda Gardner Updated on March 27, 2023 Medically reviewed by Robert Burakoff, MD Medically reviewed by Robert Burakoff, MD Robert Burakoff, MD, MPH, is a board-certified gastroenterologist who serves as vice chair of Ambulatory Services at Lower Manhattan Hospital and professor of medicine at the Weill Cornell Medical College. learn more Share this page on Facebook Share this page on Twitter Share this page on Pinterest Email this page Nearly everyone has had a stomachache at some point. In actuality, any organ in your abdominal region could be why your stomach hurts so badly. Your stomach could ache for another reason entirely. Stomach trouble can be short-lived, come and go, or show up only after you eat, all of which are clues to the cause. Henrik Sorensen/Getty Images Short-Term Causes of Stomachaches Exposure to some things, such as medication or environmental factors, can lead to stomach pain. Temporary conditions can cause stomachaches, as well. Medications Medications are a common cause of stomach pain. Some medications can irritate the stomach or slow down how fast it empties, causing discomfort. Common medications that cause stomachaches include: Nonsteroidal anti-inflammatory drugs (NSAIDs): Ibuprofen and aspirin may cause stomach lining swelling or lead to ulcers. Oral bisphosphonates: These help preserve bone density and prevent osteoporosis. Oral bisphosphonates may cause swelling and pain in the lower esophagus, Vivek Kaul, MD, a professor of medicine in the gastroenterology and hepatology division at the University of Rochester Medical Center, told Health. Antibiotics: Specifically, antibiotics containing azithromycin can irritate the stomach. A healthcare provider may advise that you only take antibiotics after eating to avoid discomfort. Narcotic and blood pressure medications: These relax the stomach walls and allow food to sit and ferment in your stomach, which may cause nausea. Consult a healthcare provider if certain medications are causing stomachaches. They may advise that you take medicines with food or switch to a different one that does not upset your stomach. Parasites Parasitic worms or microbes can occasionally cause stomach pain. Common parasites that cause stomachaches include Giardia and Cryptosporidium. People ingest those parasites while swimming in contaminated pools or lakes or drinking contaminated water or beverages. Parasites attach to the stomach lining or hang out in the small intestine or colon, causing symptoms like cramps, diarrhea, and nausea. Symptoms typically begin about two to 10 days (for Cryptosporidium) or one to three weeks after exposure (for Giardia). Symptoms usually clear up with a lot of hydration and a little help from over-the-counter (OTC) anti-diarrheal medicine. A healthcare provider may prescribe medications if your symptoms persist. Appendicitis Appendicitis is an inflammation of the appendix. Most people with appendicitis have sudden severe pain that warrants a visit to the emergency room. Appendicitis usually starts with pain on the right side of the abdomen, which slowly worsens. "A telltale sign is pain when you bend your leg because it's pulling a muscle near your appendix as you make that motion," Patricia L. Raymond, MD, an assistant professor of clinical internal medicine at Eastern Virginia Medical School, told Health. Seek immediate medical attention if you suspect appendicitis. The appendix could burst, leading to long-term hospitalization and a potentially life-threatening infection known as peritonitis. A healthcare provider might want to remove your appendix, which is a routine procedure surgically. Ulcers Peptic ulcers are sores in the stomach and duodenum, or the first part of the small intestine. NSAIDs and Helicobacter pylori, a type of bacteria, can cause ulcers. Peptic ulcers are a common cause of stomachaches. Peptic ulcers can cause burning pain in your mid-upper abdominal area, often striking after eating. Some peptic ulcers can be painful enough to wake you in the middle of the night. A healthcare provider might prescribe antibiotics and acid-suppressing drugs to treat ulcers caused by bacteria. The acid-suppressing medication will help you feel better for the time it takes for the antibiotics to get rid of the bacteria. Stress Stress can cause stomachaches, headaches, high blood pressure, and insomnia. Stress can cause or worsen digestive problems, pain, and health conditions like irritable bowel syndrome (IBS). To reduce stress, try some of the following tips: Make time to unwind.Connect with others.Avoid addictive substances and behaviors (e.g., smoking and alcohol).Get enough sleep.Eat a healthy diet.Exercise regularly. Constipation Constipation happens if a blockage or change in your diet causes your small or large intestines to be unable to move waste along. Constipation is a common symptom when people have problems passing stool and less than three weekly bowel movements. Constipation can lead to abdominal pain, bloating, nausea, and vomiting. A healthcare provider might advise changing your diet and activity if constipation does not go away. They may suggest further treatment if lifestyle changes do not help. Gastritis Gastritis causes inflammation of the stomach lining, leading to nausea and vomiting. If untreated, gastritis may cause gastric ulcers and bleeding. There are several causes of gastritis, such as: Helicobacter pyloriNSAIDsAlcoholSmokingAutoimmune diseases A healthcare provider can help identify the type of gastritis you have. Treatment, which often includes medication, depends on the kind of gastritis. Pelvic Inflammatory Disease Pelvic inflammatory disease (PID) is a bacterial infection of the fallopian tubes, uterus, or ovaries. PID may cause pain underneath the belly button, said Dr. Raymond. Sexually transmitted infections (STIs), such as gonorrhea and chlamydia, can cause PID. You can help prevent PID by practicing safe sex and using condoms. Other, less likely but possible, causes of PID include intrauterine devices (IUDs), which can disrupt the cervix and cause bacteria to form. PID can cause scarring of fallopian tubes and increase the risk of infertility. Consult a healthcare provider right away if you experience symptoms like fever, vomiting, or signs of fainting. A healthcare provider can treat PID by prescribing antibiotics. Though, antibiotics cannot reverse any damage. Kidney Stones Kidney stones are crystalized mineral and salt deposits that form if your urine concentrates. Kidney stones cause pain when they move through the urinary system. Usually, the pain occurs in the lower back and can radiate to the lower abdomen or groin, Jacob Skeans, MD, a gastroenterologist at The Ohio State University Wexner Medical Center, told Health. Other kidney stones symptoms include: VomitingPainful urinationBlood in the urineBurning while urinatingUrine that smells or appears cloudyFeverChills "Many can pass spontaneously with hydration. Rarely, more invasive urologic procedures are needed to break up or remove stones," said Dr. Skeans. Lifestyle changes and medication can also help prevent or avoid kidney stones. Common Kidney Stone Signs and Symptoms Chronic Conditions That Cause Stomachaches Some chronic diseases, such as those affecting the digestive system or thyroid, may cause stomachaches. Thyroid Problems The thyroid, a butterfly-shaped gland in the middle of the neck, can cause stomachaches. "The thyroid regulates several functions in the body, and the digestive tract is one of the systems," Osama Alaradi, MD, a gastroenterologist, told Health. For example, hyperthyroidism (an overactive thyroid) can speed up the digestive system, causing frequent bowel movements and stomachaches. In contrast, hypothyroidism (an underactive thyroid) slows down the digestive tract, leading to constipation and gas that cause stomach cramps. A healthcare provider can help find the cause of stomach pain or order testing if needed. Cancer Though rare, certain cancers, such as stomach and colorectal cancers, can cause stomachaches. Symptoms of stomach or colorectal cancers may include: Unexplained weight lossRecurring stomach cramps or discomfortDiarrheaBlood in stool Talk with a healthcare provider about your symptoms if any of those symptoms persist for a long time. They can order tests that help rule out cancer. Inflammatory Bowel Disease Inflammatory bowel disease (IBD) causes small or large intestine inflammation, leading to painful gastrointestinal (GI) symptoms. IBD includes Crohn's disease and ulcerative colitis. IBD can cause scarring and blockage, which may cause stomachaches, diarrhea, and rectal bleeding. Symptoms are long-lasting but can flare up and subside in cycles. People with IBD must monitor their condition closely, as it can lead to severe complications. Consult a healthcare provider about managing IBD and its symptoms, including stomachaches. Irritable Bowel Syndrome Irritable bowel syndrome (IBS) symptoms often include stomachaches. IBS also causes changes in bowel movements, such as diarrhea and constipation. A healthcare provider can diagnose IBD by examining your personal and family health history and ordering tests. They can help you manage IBS by suggesting lifestyle changes, such as dietary changes. Sometimes, relaxation techniques like medication. Diverticulitis Diverticulitis is an inflammation of the diverticula, or pockets in the colon's lining. Symptoms can include lower abdominal cramps, which may respond to antibiotics. In severe cases, diverticulitis can cause abscesses, bleeding, and perforations. Those symptoms may cause severe pain or require surgery and hospitalization. Consult a healthcare provider for a diagnosis and treatment plan. In mild cases, a high-fiber diet can help. Gastroesophageal Reflux Disease Gastroesophageal reflux disease (GERD) can cause pain in the upper stomach and lower chest, known as heartburn. A weak valve separating the stomach from the esophagus typically causes GERD. A weak valve allows food and acid from the stomach to splash upward. Overeating or consuming the wrong type of food (e.g., fatty or spicy foods) can worsen GERD. Instead, to treat GERD, a healthcare provider may advise treatments, like: Losing weight if you have overweight or obesityWatching what you eatMedications, such as antacids, H2 blockers, and proton pump inhibitors Pancreatitis Pancreatitis is a severe condition that causes burning pain in the upper or middle abdomen. The pancreas is a large gland behind your stomach that releases digestive acids into your intestines. Pancreatitis happens if those digestive enzymes start digesting the pancreas. Some people even have shooting pain that drives right through to their back, said Dr. Kaul. Other symptoms include nausea and vomiting. Too much alcohol can be a culprit, noted Dr. Kaul. Gallstones that block the duct that the pancreas sends its enzymes through can cause pancreatitis, too. Pancreatitis can lead to hospitalization. A healthcare provider treats pancreatitis with intravenous (IV) fluids, antibiotics, and pain medications. Gallstones Gallstones form in the gallbladder, a tiny sac hanging out under the liver, expelling bile as needed to digest fats. Gallstones are hard, pebble-like materials that develop in your gallbladder, typically made of cholesterol or bilirubin. Gallstones can cause swelling and block the duct into the intestine, causing stomachaches. Typically, pain strikes the right side of the upper abdomen, particularly after eating high-fat foods. Those foods can trigger the gallbladder to contract. "If the gallbladder is inflamed, any contraction of that nature will be amplified and typically will cause pain to the patient," explained Dr. Kaul. Cholecystitis Cholecystitis causes inflammation of the gallbladder. A gallstone can get caught in the cystic duct, blocking drainage and causing infection, explained Dr. Skeans. Cholecystitis can cause intense symptoms like right upper abdominal pain, fever, nausea, and vomiting. Many factors up the risk of gallstones and cholecystitis, including: Birth control pillsPregnancyObesityChronic liver diseaseRapid weight lossSevere illnessCertain medications Often, cholecystitis requires surgery. Endometriosis Endometriosis occurs when tissue that normally lines the inside of the uterus migrates outside the uterus, usually to the fallopian tubes and ovaries. Endometriosis causes severe pelvic pain, abnormal menstrual bleeding, and infertility. Endometriosis can be difficult to diagnose and requires laparoscopic surgery to confirm. Often, healthcare providers recommend medications, like NSAIDs, or birth control pills, to alleviate painful symptoms. Hernia A hernia happens when an internal organ or fatty tissue pokes through a muscle or connective tissue. There are many different types, all of which often cause stomachaches, explained Dr. Skeans. For example, an external hernia usually feels like a constant dull, aching pain. In contrast, a hiatal hernia may cause heartburn, indigestion, regurgitation, and upper abdominal or chest pains. Talk with a healthcare provider if you suspect you have a hernia. Usually, hernias require surgery to treat. 9 Things That Could Cause You to Have Acid Reflux Dietary Causes of Stomachaches Rooting out the cause of a stomachache may be as simple as looking at what you have recently had to eat or drink. Food Poisoning Food poisoning from viruses or bacteria can cause stomachaches, diarrhea, and vomiting. Rarely, food poisoning can be severe and cause a fever higher than 102 degrees Fahrenheit, dehydration, and blood in the stool. Generally, food poisoning is common, and there are several national outbreaks each year in the United States. Symptoms can begin within a few minutes to a week or more after consuming spoiled food. The duration of symptoms depends on the type of bacteria or virus you consume. Symptoms often resolve on their own. Consult a healthcare provider if symptoms become severe or persist for several days. Lactose Intolerance About 65% of people worldwide cannot digest lactose properly. Lactose intolerance causes mild to severe abdominal pain. Other lactose intolerance symptoms include: BloatingDiarrheaGasIndigestion Symptoms usually occur within 30 minutes to two hours of consuming lactose. A healthcare provider can order a test if you are unsure if you have lactose intolerance. If so, they will likely advise skipping dairy products and being wary of packaged foods with hidden milk products. You might also try Lactaid milk or OTC remedies. Gluten Intolerance Some people react poorly to gluten, a protein found in wheat, barley, and rye. Celiac disease, an autoimmune disease, is a severe form of gluten intolerance. Gluten intolerance and celiac disease can cause gas, bloating, mild-to-severe pain, and fatigue. The small intestine's inability to absorb nutrients may lead to chronic diarrhea, weight loss, and malnutrition, too. See a healthcare provider for diagnosis and treatment. Commonly, treatment includes dietary changes. Sugarless Gum Consuming too much sorbitol in some sugar-free products can cause pain and diarrhea. "Sorbitol goes into your GI tract. Since your body can't absorb it, it gets to the bacteria in your colon, which eat it and produce gas and fluids that contribute to diarrhea," explained Dr. Raymond. According to a case study published in 2019, consuming more than 20 grams of sorbitol daily could lead to digestive issues. For example, chewing a pack of Trident gum with 16–18 sticks, at 1.25 grams of sorbitol per stick, would put you at or over that limit. Cut back on the amount of gum you chew to treat stomachaches due to sugar-free gum. Sugar-Free Gum Can Cause Diarrhea—Here's How A Quick Review Various health conditions can cause stomach pain, ranging from short-term illnesses to chronic diseases like IBS and certain cancers. Certain foods can cause stomachaches, as well. Consult a healthcare provider for help and treatment options if you are unsure about the cause of your stomach pains. Was this page helpful? Thanks for your feedback! Tell us why! Other Submit 32 Sources Health.com uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy. Tai FWD, McAlindon ME. Non-steroidal anti-inflammatory drugs and the gastrointestinal tract. Clin Med (Lond). 2021;21(2):131-134. doi:10.7861/clinmed.2021-0039 MedlinePlus. Antibiotics. Camilleri M, Lembo A, Katzka DA. Opioids in gastroenterology: Treating adverse effects and creating therapeutic benefits. Clin Gastroenterol Hepatol. 2017;15(9):1338-1349. doi:10.1016/j.cgh.2017.05.014 Centers for Disease Control and Prevention. Parasites - Giardia. Centers for Disease Control and Prevention. Parasites - Cryptosporidium (also known as "Crypto"). Centers for Disease Control and Prevention. Diagnosis and treatment information for medical professionals. Centers for Disease Control and Prevention. Treatment. MedlinePlus. Appendicitis. Malik TF, Gnanapandithan K, Singh K. Peptic ulcer disease. In: StatPearls. StatPearls Publishing; 2022. Centers for Disease Control and Prevention. Coping with stress. National Institute of Diabetes and Digestive and Kidney Diseases. Constipation. National Institute of Diabetes and Digestive and Kidney Diseases. Gastritis and gastropathy. Centers for Disease Control and Prevention. Pelvic inflammatory disease (PID) - CDC basic fact sheet. MedlinePlus. Kidney stones. National Kidney Foundation. Kidney stones. National Institute of Diabetes and Digestive and Kidney Diseases. Hyperthyroidism (overactive thyroid). MedlinePlus. Hypothyroidism. American Cancer Society. Signs and symptoms of stomach cancer. Centers for Disease Control and Prevention. What are the symptoms of colorectal cancer?. Centers for Disease Control and Prevention. What is inflammatory bowel disease?. National Institute of Diabetes and Digestive and Kidney Diseases. Irritable bowel syndrome (IBS). National Institute of Diabetes and Digestive and Kidney Diseases. Definition & facts for diverticular disease. National Institute of Diabetes and Digestive and Kidney Diseases. Symptoms & causes of GER & GERD. MedlinePlus. Pancreatitis. National Institute of Diabetes and Digestive and Kidney Diseases. Gallstones. Jones MW, Genova R, O’Rourke MC. Acute cholecystitis. In: StatPearls. StatPearls Publishing; 2022. Eunice Kennedy Shriver National Institute of Child Health and Human Development. About endometriosis. MedlinePlus. Hernia. Centers for Disease Control and Prevention. Fast facts about food poisoning. MedlinePlus. Lactose intolerance. MedlinePlus. Gluten sensitivity. Liauw S, Saibil F. Sorbitol: Often forgotten cause of osmotic diarrhea. Can Fam Physician. 2019;65(8):557-558.