Stomach pain has dozens of possible causes, ranging from a mild stomach bug that clears in a day to serious conditions that need immediate treatment. Where you feel the pain, how long it lasts, and what other symptoms come with it are the biggest clues to what’s going on. Most episodes trace back to something straightforward like gas, indigestion, or a viral infection, but persistent or severe pain deserves a closer look.
Why Stomach Pain Is Hard to Pin Down
Your abdomen is packed with organs: stomach, intestines, liver, gallbladder, pancreas, kidneys, and more. Pain from any of these can feel like generic “stomach pain.” To make things trickier, internal organs don’t send pain signals the same way your skin does. Pain from organs tends to be vague and hard to locate, often felt as a deep ache or cramping somewhere in the middle of your belly. That’s why gas pain and early appendicitis can initially feel identical. As a condition progresses, pain often becomes sharper and more localized, which helps narrow the cause.
Infections and Food-Related Causes
Viral and bacterial infections of the digestive tract are among the most common reasons for sudden stomach pain. Norovirus, the classic “stomach bug,” causes intense vomiting and cramping that typically resolves within 12 to 60 hours. Bacterial infections from organisms like Salmonella tend to last longer, with most people recovering in two to five days, though symptoms can stretch to a week.
Food intolerances are another frequent culprit. Lactose intolerance, gluten sensitivity, and fructose malabsorption all cause bloating, cramping, and diarrhea after eating trigger foods. The pattern is the key clue: if you notice pain consistently after dairy, wheat, or certain fruits, an intolerance is worth investigating. Food poisoning follows a similar pattern to gastroenteritis but usually comes on faster, often within hours of eating contaminated food.
Ulcers and Upper Stomach Pain
A burning or dull pain between your belly button and breastbone that comes and goes over days or weeks may point to a peptic ulcer. These are sores in the lining of your stomach or the first part of your small intestine. For some people, the pain flares when the stomach is empty or at night and temporarily improves after eating. For others, eating makes the pain worse.
The two most common causes of ulcers are infection with a bacterium called H. pylori and regular use of anti-inflammatory painkillers like ibuprofen, naproxen, or aspirin. H. pylori is treatable with a course of antibiotics, and ulcers from painkillers often heal once the medication is stopped or swapped for an alternative. Left untreated, ulcers can bleed or, in rare cases, create a hole through the stomach wall.
What the Location Tells You
Upper Right Side
Pain in the upper right part of your abdomen is often related to the gallbladder or liver. Gallstones are the most common cause, producing sharp pain that often flares after fatty meals and can radiate to your right shoulder or back. Gallbladder inflammation causes similar but more persistent pain, sometimes accompanied by fever. Various forms of liver disease, including hepatitis and fatty liver disease, can also cause a dull ache or fullness in this area. Yellowing of the skin or the whites of your eyes is a strong signal that the liver or bile ducts are involved.
Upper Left Side
This area houses part of the stomach, the pancreas, the spleen, and the left kidney. Pancreatitis causes severe upper left pain that often bores straight through to the back and worsens after eating. Kidney stones on the left side produce intense, wave-like pain that can radiate down into the groin. An enlarged spleen, sometimes from infections like mono, creates a feeling of fullness or discomfort under the left ribs.
Lower Right Side
Lower right pain is the classic location for appendicitis, which typically starts as vague pain around the belly button before migrating to the lower right within several hours. In women, right-sided ovarian cysts or ectopic pregnancy can cause similar pain. In children, swollen lymph nodes in the abdomen (a condition called mesenteric lymphadenitis) sometimes mimic appendicitis, though the pain tends to be more spread out. In one study of children evaluated for suspected appendicitis, 16% actually had swollen lymph nodes, most often from a viral infection.
Lower Left Side
Pain specifically in the lower left is most often related to diverticular disease, especially in adults over 40. Small pouches form in the colon wall over time, and when one becomes inflamed or infected, the result is diverticulitis: steady lower left pain often accompanied by fever and changes in bowel habits. Constipation is another common source of lower left discomfort.
Irritable Bowel Syndrome
When stomach pain keeps coming back without an obvious structural cause, irritable bowel syndrome (IBS) is one of the most likely explanations. IBS is diagnosed when you’ve had recurring abdominal pain at least one day per week for three months, and the pain is linked to bowel movements, changes in how often you go, or changes in stool consistency. Symptoms need to have been present for at least six months before a diagnosis is made.
IBS doesn’t damage your intestines, but it can significantly affect quality of life. Stress, certain foods, hormonal changes, and disrupted sleep are common triggers. Treatment focuses on identifying your personal triggers, adjusting your diet (a low-FODMAP approach helps many people), managing stress, and sometimes medication to control specific symptoms like cramping or diarrhea.
Causes Specific to Children
Kids get stomach pain from many of the same things adults do, but a few causes are especially common or unique to childhood. Constipation is the leading culprit in children with recurring belly pain. A child likely has constipation if they have fewer than three bowel movements a week, pass large or hard stools, strain or show pain during bowel movements, or if stool can be felt through the abdominal wall.
Infections outside the digestive tract can also trigger stomach pain in children. Strep throat, urinary tract infections, and even lower lung infections sometimes present primarily as belly pain, which can be confusing for parents. In infants and toddlers, a condition called intussusception, where one section of intestine telescopes into another, causes sudden severe pain that comes in waves, often with vomiting and sometimes bloody stool. This is a medical emergency.
Pain That Needs Immediate Attention
Most stomach pain is not dangerous, but certain features signal that something serious may be happening. Sudden, severe pain that comes on all at once raises concern for conditions like a ruptured appendix, perforated ulcer, or twisted bowel. Pain that gets significantly worse with coughing, walking, or any jarring movement suggests irritation of the abdominal lining, which can indicate infection or a perforation.
A rigid abdomen, where the muscles stay tensed and hard even when you try to relax, is one of the most reliable signs that something urgent is happening inside. Other warning signs include vomiting blood or material that looks like coffee grounds, black or tarry stools, high fever with abdominal pain, pain so severe you can’t stand up straight, or signs of dehydration like dizziness and very little urine output. Abnormal vital signs, like a rapid heart rate or low blood pressure alongside belly pain, also indicate a potentially serious cause.
How the Cause Gets Identified
Doctors narrow down the cause primarily through your description of the pain: where it is, when it started, what makes it better or worse, and what other symptoms you have. A physical exam checking for tenderness, rigidity, and specific pain patterns adds more information.
When imaging is needed, a CT scan of the abdomen is often the first choice because it provides a fast, detailed look at virtually all abdominal organs at once. Ultrasound is preferred for evaluating gallbladder problems, and it’s the go-to option for pregnant patients and children to avoid radiation. Blood tests can reveal signs of infection, inflammation, or organ dysfunction, and stool tests help identify bacterial infections or hidden bleeding. For suspected ulcers, an upper endoscopy lets a doctor see the stomach lining directly and test for H. pylori.

