Why Does It Hurt When I Poop?

Medically Reviewed By Cynthia Taylor Chavoustie, MPAS, PA-C
Was this helpful?

Some causes of painful defecation are manageable with home care. But more serious reasons could be due to STIs, irritable bowel syndrome, or cancer. Read on to learn what may cause pain when you poop, what to do about it, and when to contact your doctor.


A roll of toilet paper set against a red background
Jeremy Pawlowski/Stocksy United

Defecation (pooping) is your body’s way of removing solid waste via the colon, rectum, and anus. Painful defecation is a signal that there is a problem with this natural process.

It can also signify a more serious condition, so it is important to know when to contact your physician if you experience painful pooping.


Painful pooping can have multiple possible causes. The location and severity of the pain depend on the cause.

Spicy food

Some foods can cause pain with pooping. Many spicy foods contain capsaicin. When you consume capsaicin, it binds to a pain receptor known as TRPV1. These receptors are present in the gastrointestinal (GI) tract and anus, among other areas of the body.

If capsaicin passes through your GI tract undigested, it may cause a burning sensation and pain when you poop.


Rectal or anal pain when pooping may be caused by passing large, hard, or dry stools.

The National Institute of Diabetes and Digestive and Kidney Disease (NIDDK) notes that constipation may cause a few symptoms:

  • having fewer than three bowel movements a week
  • having hard, dry stools
  • experiencing difficulty or pain when passing stool
  • feeling like not all stool has passed

Lifestyle factors such as too little water or fiber in your diet may cause constipation. Ignoring the urge to poop will cause the stool to become hard and dry as water is absorbed in the large intestine.

Conditions that affect the nerves in your intestinal tract, such as Parkinson’s disease, may also cause constipation.

Pregnancy can also lead to constipation as the baby grows and applies pressure on the intestines.

Learn more about prevention and treatment for constipation.


Diarrhea is defined as three or more loose, watery stools. Painful pooping related to diarrhea may be due to abdominal reasons, such as cramps. Also, frequent defecating and wiping can damage the skin around the anus, causing pain.

Many infections can cause diarrhea, which in turn can lead to pain when pooping. These include:

  • viruses like rotavirus or norovirus
  • traveler’s diarrhea, caused by consuming contaminated water or food
  • amoebiasis, in which an amoeba species causes severe diarrhea
  • food poisoning, caused by organisms like Salmonella

Learn more about diarrhea.

Irritable bowel syndrome

Irritable bowel syndrome (IBS) involves abdominal pain with constipation or diarrhea. Depending on the type of IBS you have, you may also experience both symptoms.

IBS is a functional condition, meaning it does not cause visible problems in your GI tract.

Learn more about the types of IBS.

Inflammatory bowel disease

Inflammatory bowel disease (IBD) is chronic inflammation in the GI tract. The two main types are Crohn’s disease and ulcerative colitis.

Like IBS, IBD conditions like Crohn’s disease and ulcerative colitis can cause constipation and diarrhea.

Learn more about IBD.


Hemorrhoids are inflamed, distended veins around your anus or lower rectum. They can be external or internal.

Hemorrhoids cause stinging pain and can also cause itching. In addition to hurting while pooping, you may also notice bright red blood on your toilet tissue or in your toilet bowl.

Other conditions that can result in pain when pooping, like constipation or diarrhea, can cause hemorrhoids.

Learn more about hemorrhoids.

Anal fissure

An anal fissure is a tear inside the anal canal, usually caused by passing a large, hard stool. It can cause sudden stinging or sharp anal pain when pooping.

Learn more about anal fissures.

Injury to the tailbone

Some people may have an injury to the tailbone at the base of the spine. The tailbone can become dislocated due to childbirth, or events like a hard fall may break it.

The tailbone has several ligaments, which can also cause pain when defecating if they become overstretched or inflamed.


Endometriosis can affect the bowel and lead to severe pain and rectal bleeding when defecating. If the pain is associated with your periods, contact your doctor.

Learn more about endometriosis.


Proctitis is inflammation in the lining of the rectum. This condition can cause:

  • diarrhea
  • constipation
  • pain and cramping in the anus and rectum
  • rectal bleeding

The causes of proctitis include IBD, radiation therapy, infections, and previous ostomy surgery.

Learn more about proctitis.

Sexually transmitted infections

A few sexually transmitted infections (STIs) can cause pain when pooping, such as chlamydia and gonorrhea. This may occur more often in people assigned male at birth due to prostate and rectal area inflammation.


Similar to other causes of painful pooping, colorectal cancer can cause diarrhea or constipation. These symptoms may not appear until the later stages of the disease, making screening essential.

In addition, anal cancer can cause pain or a feeling of fullness in the anus, which may cause you to hurt when pooping.

Other symptoms that might occur

Depending on the cause, painful pooping may be accompanied by some of the following symptoms:

  • nausea or vomiting
  • bleeding or black, tarry-looking stools
  • fever
  • skin irritation
  • pain associated with menstruation
  • a mass in or near the anus
  • swollen lymph nodes in or near the anus
  • loss of bowel control


Diagnosing the cause of your painful pooping begins with a physical assessment and detailed history. Based on the results, your physician may order the following tests:

  • laboratory tests of your blood and stool to check for inflammation, infection, or signs of bleeding
  • imaging scans to look for masses or areas of diseased tissue
  • biopsy of any masses to check for cancer
  • direct visualization of your upper or lower GI tract via colonoscopy, endoscopy, or flexible sigmoidoscopy
  • manometry and colonic transit testing to assess the function of your sphincter and intestinal processing speed


Treatment for pain when pooping also depends on the cause, severity, and location of the pain.

Lifestyle changes like increasing fiber and water intake and adding daily exercise may help with constipation.

Treatments for anal or rectal pain may include:

  • topical anesthetics
  • warm tub or sitz baths
  • skin barrier ointments

Over-the-counter (OTC) medications may include:

  • stool softeners to prevent or resolve constipation
  • antidiarrheal medications to resolve diarrhea
  • analgesics such as Tylenol
  • fiber supplements like Metamucil

Your doctor may prescribe medications to treat defecation pain. These may include:

  • medications to relax the muscles of the intestines and the anal sphincter
  • antimicrobial medications for infection
  • Botox injections for chronic anal fissures
  • medications that increase the fluid in your colon

Surgery to repair a fissure, remove hemorrhoids or other masses, or remove sections of diseased intestine for conditions such as Crohn’s disease might also be necessary.


Depending on the cause, people who experience pain while pooping may be able to treat their symptoms at home. In other cases, medical treatment might be necessary.

Contact your physician if your symptoms do not go away in a few days.


Painful pooping may lead to complications. These include:

  • Chronic constipation can result from avoiding pooping due to pain and may lead to fecal impaction.
  • Dehydration is a serious potential complication of diarrhea.
  • Chronic anal fissures can result from straining to pass hard stools.


It may be possible to prevent some causes of pain when pooping. Things you can do include:

  • Drink more water or add more fiber to your diet.
  • Get daily exercise.
  • Follow your doctor’s treatment plan for any underlying conditions.

Learn more about foods that are high in fiber.

When to see a doctor

You should see a doctor if your symptoms do not resolve after a day or two or if you have any of the following potentially serious symptoms:


If you experience pain when pooping that does not resolve with home care after a few days, or if it is accompanied by additional concerning symptoms, contact a doctor. They can determine the cause and provide treatment.

Was this helpful?
Medical Reviewer: Cynthia Taylor Chavoustie, MPAS, PA-C
Last Review Date: 2022 Nov 17
View All Digestive Health Articles
THIS TOOL DOES NOT PROVIDE MEDICAL ADVICE. It is intended for informational purposes only. It is not a substitute for professional medical advice, diagnosis or treatment. Never ignore professional medical advice in seeking treatment because of something you have read on the site. If you think you may have a medical emergency, immediately call your doctor or dial 911.
  1. Anal fissure. (n.d.). https://fascrs.org/patients/diseases-and-conditions/a-z/anal-fissure
  2. Colorectal cancer signs and symptoms. (2020). https://www.cancer.org/cancer/colon-rectal-cancer/detection-diagnosis-staging/signs-and-symptoms.html
  3. Garcia, M. R., et al. (2022). Sexually transmitted infections. https://www.ncbi.nlm.nih.gov/books/NBK560808/
  4. Definition & facts of hemorrhoids. (2016). https://www.niddk.nih.gov/health-information/digestive-diseases/hemorrhoids/definition-facts
  5. Kumagai, Y. et al. (2022). Coccyx subluxation: Coccyx pain aggravated by the prone position. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9634120/
  6. McDowell, C., et al. (2022). Inflammatory bowel disease. https://www.ncbi.nlm.nih.gov/books/NBK470312/
  7. Nemeth, V., et al. (2021). Diarrhea. https://www.ncbi.nlm.nih.gov/books/NBK448082/
  8. Sharma, A. et al. (2021). Review article: diagnosis, management and patient perspectives of the spectrum of constipation disorders. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8252518/
  9. Signs and symptoms of anal cancer. (2020). https://www.cancer.org/cancer/anal-cancer/detection-diagnosis-staging/signs-and-symptoms.html
  10. Symptoms & causes of constipation. (2018). https://www.niddk.nih.gov/health-information/digestive-diseases/constipation/symptoms-causes
  11. Symptoms & causes of irritable bowel syndrome. (2017). https://www.niddk.nih.gov/health-information/digestive-diseases/irritable-bowel-syndrome/symptoms-causes
  12. Symptoms & causes of proctitis. (2021). https://www.niddk.nih.gov/health-information/digestive-diseases/proctitis/symptoms-causes
  13. Tsamantioti, E. S., et al. (2022). Endometriosis. https://www.ncbi.nlm.nih.gov/books/NBK567777/
  14. Yang, F., et al. (2017). Understand spiciness: mechanism of TRPV1 channel activation by capsaicin. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5326624/