Skip to main content
Read about

What Causes Stomach Cramps?

Stomach (or abdominal) cramps can occur after eating and can feel dull or like sharp pains. Sometimes it causes diarrhea. Causes include food poisoning, an intolerance to dairy products or gluten, or you may have picked up a stomach bug. Getting your period and some chronic GI conditions can also cause cramps. Drink a lot of fluids and look at your diet to try to figure out what’s irritating your stomach.
An illustration of a frowning purple-haired woman wearing a blue shirt bends over clutching her stomach. Three blue squiggles extend from her stomach.
Tooltip Icon.
Written by Ben Hagopian, MD.
Attending Physician, Western Maine Family Medicine, Norway, ME
Medically reviewed by
Last updated June 19, 2024

Stomach cramps quiz

Take a quiz to find out what's causing your stomach cramps.

Why does your stomach hurt?

Stomach cramps can range from mild achiness to severe, stabbing pain.

Common causes of stomach cramps include eating foods that can irritate your stomach, constipation, food poisoning, or a stomach infection. People who have anxiety may also develop stomach cramps.

Pregnant people may experience stomach cramps as the fetus grows. Menstrual cramps are also very common, though they actually take place in the uterus.

Sometimes stomach cramps are constant. In this case, a chronic digestive illness, such as irritable bowel disease, may be the cause.

Most stomach cramps go away on their own within a few hours or a couple of days. Changing what you eat and taking over-the-counter medication can help with symptoms while you recover.

Some stomach cramps may require medical attention. You should be concerned about stomach cramps if they last for a week or longer or are so severe that you can’t function, or you also have symptoms like fever or blood in your vomit or stool.

Causes

1. Viral or bacterial infection

Symptoms

Viral and bacterial stomach infections are often referred to as “the stomach flu.” Common viruses, like norovirus, are easily passed from person to person. Bacterial infections can be passed through contaminated food or water.

Symptoms usually get better within a couple of days with rest and by drinking plenty of water. But if you have a fever above 100.4°F, can’t keep down any food or drinks, or your symptoms aren’t improving, see your doctor. You may be dehydrated and need IV fluids or antibiotics at a hospital.

Stomach cramps quiz

Take a quiz to find out what's causing your stomach cramps.

Take symptoms quiz

2. Food poisoning

Symptoms

Food poisoning is from eating contaminated food. The food may have germs that cause infection (like bacteria, viruses, parasites) or toxins created by germs.

Symptoms of food poisoning may develop several hours or days after you’ve ingested contaminated food or water.

Most cases of food poisoning get better within a couple of days. In the meantime, treat your symptoms by resting and drinking plenty of water. Antibiotics are rarely necessary.

But if you have a fever above 100.4°F, can’t keep down any food or drinks, or your symptoms aren’t improving, see a doctor. You may be dehydrated and need to go to a hospital for IV fluids.

Why am I having stomach cramps?

“While it can be a bit comfortable to discuss, sharing your recent bowel movement history can be important in figuring out the cause of stomach cramps. Are you having diarrhea or are you constipated or are your bowel movements completely normal?” —Dr. Ben Hagopian

3. Food sensitivity

Symptoms

  • Stomach cramps
  • Bloating in the upper abdomen
  • Feeling uncomfortably full
  • Nausea
  • Heartburn
  • Diarrhea
  • Excessive gas

Symptoms of food sensitivity occur after you eat food that your body cannot handle well. Foods and drinks that are more likely to irritate the stomach of adults include greasy and sugary foods, carbonated and caffeinated drinks, and alcohol.

Some people are sensitive to gluten, which is a protein found in wheat.

Sometimes you may not be able to tolerate a particular food at all. In this case, you have a “food intolerance.” The most common food intolerance is lactose intolerance. People with lactose intolerance are unable to fully digest lactose, which is a form of sugar found in most dairy products.

Symptoms associated with food sensitivities usually go away on their own with time or can be managed with over-the-counter medication (such as antacids). If you’re not sure what food is irritating your stomach, keeping a food diary can help you identify the culprit.

4. Irritable bowel syndrome (IBS)

Symptoms

  • Stomach cramps more than once a week, are often related to bowel movements.
  • Diarrhea.
  • Constipation.
  • Stool becomes frequent (more than 3 times a day) or less frequent (fewer than every 3 days).

Irritable bowel syndrome (IBS) is a common, chronic disorder of the gut (primarily the large intestine) that causes abdominal pain and changes in your bowel movements.

IBS is a chronic disease in adults, meaning that symptoms last for months or years (although the symptoms usually come and go over time).

Your doctor will discuss your diet to see if any foods or drinks trigger your symptoms that you should avoid. They may recommend fiber supplements, regular exercise such as walking or yoga, and ways to manage life stressors (including getting enough sleep).

If these do not control your symptoms, your doctor may prescribe medication.

Options include anti-spasmodics (for belly pain and cramps), probiotics, antibiotics, or even antidepressants to treat anxiety or depression.

5. Menstrual cramps

Symptoms

Menstrual cramps are very common. These occur in the uterus, which is located in the lower abdomen. They develop when the uterus contracts to shed its lining. Typically, cramps start up to 2 days before your period begins and last for 1 to 3 days beyond that. Some women also have an upset stomach during their period.

Menstrual cramps are treated with over-the-counter nonsteroidal anti-inflammatory drugs (NSAIDs) like Advil and Naproxen. You can also ease your symptoms by exercising and resting a heating pad on your lower abdomen.

In some cases, menstrual cramps may be a sign of a more serious problem, such as endometriosis or fibroids. If your menstrual cramps are so severe that they interfere with your everyday functioning or if they occur regularly (not just when you have your period), see your doctor.

6. Constipation

Symptoms

  • Stomach cramps
  • A feeling of fullness in your abdomen
  • Bloating
  • Hardened, pellet-like stool that’s difficult to pass
  • Having fewer than 3 bowel movements a week

Everyone has, some point, been constipated. Constipation is when stool becomes hard, making it difficult to have a bowel movement.

You can become constipated for many reasons. You may not be eating enough fiber or drinking enough water. Not exercising and stopping yourself from having bowel movements can also cause constipation.

You may need to eat more fiber-rich foods (such as fruit and vegetables), drink more water, start exercising regularly. Creating a “bowel schedule”—a time each day when you try to have a bowel movement—can also help. You can also relieve constipation with over-the-counter medications such as stool softeners and laxatives.

See your doctor if constipation lasts for more than a couple of weeks and doesn’t improve with at-home treatments. Sometimes, constipation is a sign of a more serious condition, such as colon cancer, so don’t ignore it.

7. Anxiety

Symptoms

  • Stomach pain or cramping
  • Elevated heart rate
  • Increased breathing rate
  • Constipation or diarrhea
  • Stress

It’s not uncommon to experience stomach cramps when you’re anxious. This is sometimes referred to as a “nervous stomach.” Anxiety can cause your stomach to cramp and also diarrhea or constipation.

Techniques such as deep breathing, meditation, and exercise may help stomach cramps related to anxiety. See your doctor or a mental health professional if your anxiety is affecting your everyday life or you’re having panic attacks (episodes of intense fear that make you feel out of control, breathless, etc.).

8. Pregnancy

Symptoms

  • Stomach cramps
  • Bloating

Pregnancy cramps are often described as pulling sensations on one or both sides of the abdomen. These cramps are from the uterus expanding to make room for the growing fetus.

In most cases, mild cramps early in pregnancy that come and go are common and not a cause for concern.

In the second trimester, you may experience round ligament pain. The round ligament supports your uterus. When it stretches during pregnancy, it can cause cramps. These cramps may be sharp and stabbing or feel like a dull ache in the lower abdomen.

In the third trimester, women will often experience Braxton Hicks contractions towards the end of pregnancy. These are like a false alarm for true labor.

You can treat pregnancy cramps by changing positions (standing up, sitting down, lying down, or even just moving around to see which position is most comfortable for you). Soaking in a warm bath (below 100°F) and drinking plenty of water may also help.

Sometimes pregnancy cramps can be a sign of a serious problem. Call your doctor if you have severe cramps or abdominal pain, cramps that don’t go away, vaginal bleeding, or labor pain (contractions).

9. Appendicitis

Symptoms

  • Stomach cramps
  • Abdominal pain (usually near the navel or right lower abdomen)
  • Fever
  • Nausea
  • Vomiting

Appendicitis is more common in children but can also affect adults. Appendicitis is an inflammation of the appendix, which is a thin, short, tube-like organ connected to your large intestine. The appendix becomes inflamed when it is blocked or injured.

Pain usually begins near the belly button and moves toward the right side of the lower abdominal area.

If you think your child has appendicitis, go to the ER immediately. Appendicitis is life-threatening and needs to be treated at a hospital. Treatments include IV antibiotics and surgery to remove the appendix.

Is abdominal cramping painful?

“Usually, I think of stomach cramps as being more in the center portion of the abdomen, rather than farther out on the sides. They can feel like spasms or that your abdomen is moving or twitching. I usually don’t associate stomach cramps with severe pain, constant pain, sharp pain, or burning pain.” —Dr. Hagopian

Other possible causes

A number of conditions may also cause stomach cramps, though their symptoms are more severe and the pain lasts for a longer period of time. These include:

When to call the doctor

Make an appointment with your doctor if you have any of these symptoms:

  • Severe stomach cramps or abdominal pain.
  • Cramps that started after an injury to the abdomen.
  • Cramps that don’t improve after 1 to 3 days.
  • Cramps that are interfering with your daily activities.

Should I go to the ER for stomach cramps?

You should go to the ER if you have the following:

  • Severe abdominal pain
  • Chest pain
  • Vomit with blood in it
  • Stool with blood in it or that is dark and tar-like
  • Fever above 100.4°F
  • For pregnant women: severe cramps or abdominal pain, vaginal bleeding, or labor contractions

Are there medicines that treat stomach cramps?

“There are not a lot of effective prescription medications for stomach cramps.” —Dr. Hagopian

Treatment

At-home care

  • If you have an intestinal infection or food poisoning, try to drink a lot of fluids. Combine 1 liter of water with 6 tsp of sugar and ½ tsp of salt. This solution is more hydrating than plain water. You can also buy a sports drink like Gatorade. Drink it throughout the day.
  • When you’re ready to eat again, start with bland foods.
  • Change your diet if certain foods or eating habits (like eating too much or too late, or eating spicy or greasy foods) are bothering your stomach.
  • Keep a food diary so you can see which foods are causing your stomach cramps.
  • Gently massage your stomach to ease cramps.
  • Place a heating pack or hot water bottle (or sit in a warm bath) to soothe cramps.
  • Take over-the-counter medications to relieve stomach cramps. Depending on your symptoms, you may want to use medications such as antidiarrheals (like Pepto-Bismol/bismuth), antacids, or stool softeners.
  • Treat menstrual cramps with NSAIDs like ibuprofen (Advil, Motrin) or naproxen (Aleve).

Other treatment options

  • You may need to get IV fluids at a hospital if you develop severe dehydration.
  • Prescription medication may be necessary depending on what is causing your stomach cramps.
  • In some cases, your doctor may want to take X-rays or a CT scan of your abdomen.

Stomach cramps treatment quiz

Take a quiz to find out how to treat your symptoms.

Take treatment quiz

Share your story
Once your story receives approval from our editors, it will exist on Buoy as a helpful resource for others who may experience something similar.
The stories shared below are not written by Buoy employees. Buoy does not endorse any of the information in these stories. Whenever you have questions or concerns about a medical condition, you should always contact your doctor or a healthcare provider.
Dr. Le obtained his MD from Harvard Medical School and his BA from Harvard College. Before Buoy, his research focused on glioblastoma, a deadly form of brain cancer. Outside of work, Dr. Le enjoys cooking and struggling to run up-and-down the floor in an adult basketball league.

Was this article helpful?

92 people found this helpful
Tooltip Icon.
Read this next
Slide 1 of 4