Black feces can occur due to damage to the esophagus, stomach, or small intestine. It is important to always pay attention to stool that appears black and tarry, particularly if it persists.
Read on to learn more about the possible causes of black stool and when to contact a doctor.

One of the main causes of black stool is a bleed in the upper GI tract, which includes the esophagus, stomach, and small intestine. Upper GI tract bleeds affect around 80–150 out of 100,000 people each year.
Upper GI bleeds can occur as a result of:
- peptic ulcer disease
- duodenal ulcers
- erosive esophagitis
- duodenitis
- varices
- Mallory-Weiss tears
- vascular malformations
- gastroesophageal reflux disease
- variceal bleeding, particularly if you have cirrhosis
A bleed from a tumor in the upper GI tract can signify cancer, including:
- esophageal cancer
- stomach cancer
- small bowel cancer
- pancreatic cancer
- liver cancer
- cancers of the biliary system
Other cancers, such as breast cancer and lung cancer, can spread to the stomach, which can also lead to bleeding in the upper GI tract.
Peptic ulcer disease is the most prevalent cause of upper GI bleeds, accounting for up to 40–50% of cases.
Although you should never ignore black or tarry feces, it does not always indicate cancer. Other causes of black stool include medication side effects and some foods.
Food
Certain foods can cause your stool to have a dark or black appearance. These include:
- blueberries
- dark leafy vegetables
- black licorice
- Oreo cookies
- grape juice
It is also possible for Pepto-Bismol to cause your stool to appear black. This happens when the active ingredient, bismuth, comes into contact with sulfur in your saliva and digestive system.
Medications
Some medications can also result in black stool. One example is aspirin, which can contribute to bleeding in the upper GI tract. Taking aspirin combined with P2Y12 antiplatelet drugs makes this more likely.
Anticoagulants (blood thinners), such as warfarin, can also contribute to the likelihood of having black feces.
Ferrous fumarate and other medications for iron deficiencies may also result in black stool. Contact your doctor if you notice that your stool becomes black and sticky when taking iron.
Learn more about bloody stool here.
The type of treatment required will depend on the cause of the black stool. This can include making changes to your diet, taking over-the-counter medications, and seeking medical intervention.
Dietary changes
If black stool occurs due to consuming black or dark foods, reducing your intake of those foods can help prevent this. However, black feces that occurs as a result of eating dark foods is not usually a cause for concern.
Iron supplements can also cause black stool. It is important to contact your doctor before changing or stopping any supplements you are taking, particularly if you take iron for an iron deficiency.
Medical treatment
You may require medical treatment to treat the root cause of black stool. This will depend on the condition but may involve:
- a blood transfusion, if a bleed in the upper GI tract results in the excessive loss of red blood cells
- proton pump inhibitors to reduce the production of acid
- injection therapy, wherein a doctor will inject a medication directly into the source of the bleeding
- thermal techniques, which involve applying heat probes to cauterize the area that is bleeding
- angiographic embolization, during which coils are placed onto a catheter to stop blood flow to the injured site
- surgery to apply stitches to lacerations
Cancer treatment
If your black stool is a symptom of a cancer of the upper GI tract, your surgeon may be able to surgically remove the tumor and affected areas.
If the cancer has not spread, your doctor may recommend radiation therapy.
If it is not possible to operate on the cancer, or if it has spread to other parts of your body, your doctor may recommend radiation therapy or chemotherapy.
You may experience symptoms alongside black and tarry stool that can help a doctor identify the underlying cause.
If you have a bleed in the esophagus, you may experience:
- difficulty swallowing
- vomiting blood, or hematemesis
- indigestion
Contact your doctor if you notice that your stool is black or tarry. They can arrange for tests to identify the underlying cause.
Seek immediate medical attention if you experience any of the following symptoms alongside black and bloody stool:
To help diagnose the cause of your black stool, your doctor will ask for information about when you first noticed it and how frequently it occurs.
They may also arrange for tests to take a closer look at your upper GI tract. These tests can include:
- Upper endoscopy: The doctor will use a thin device with a camera at the end to look inside the upper digestive tract. Learn more here.
- Stool culture: In some cases, your doctor may take a sample of your black stool to send to the laboratory for analysis.
- Blood tests: Blood tests can help identify any possible medical causes of black stool.
If your doctor feels that your black stool may be due to cancer, they will arrange for tests to diagnose this. Tests for this purpose can include:
- an MRI scan
- a PET scan
- a CT scan
- an endoscopic ultrasound
- endoscopic retrograde cholangiopancreatography
- magnetic resonance cholangiopancreatography
Although there is no “correct” stool color, a healthy bowel movement is typically brown. This brown color is due to the presence of bile and bilirubin, which occur when dead red blood cells naturally break down in the intestine.
If your stool is any color other than brown, it may be due to something you have consumed or a result of a medical condition. The table below provides more information about stool colors and what they might mean.
Black | Black stool may occur as a result of a bleed in the upper GI tract. It may also occur if you eat dark foods, take iron supplements, or use aspirin. |
---|---|
Red | Bright red or bloody stool may be a symptom of a bleed in the lower GI tract. It can also occur due to hemorrhoids, anal fissures, fistulas, or consuming large amounts of red foods. |
Blue | Blue stool tends to occur if you eat a lot of blue foods, such as blueberries. Eating foods that contain blue dye can also cause blue stool. |
Orange | Orange stool can occur if you consume excessive amounts of beta-carotene from supplements or vegetables. These include carrots, squash, sweet potatoes, and some leafy greens. |
Yellow | Yellow or pale stool may occur if there is too much bile present. Pale yellow stool can also be a symptom of liver or gallbladder problems. Bright yellow diarrhea can indicate giardiasis, which is a stomach bug caused by a parasite. |
Green | Green stool typically occurs if you eat a lot of leafy green vegetables or foods with green food coloring. You may also notice green feces if it passes too quickly through the large intestine, which occurs when bile does not have enough time to break down. Learn more here. |
Contact your doctor if you notice blood in your stool or changes in your stool or bowel habits that persist.
Black stool may occur as a result of a bleed in the upper GI tract. This may be due to damage to the esophagus, stomach, or upper intestine. An upper GI bleed may indicate cancer, but this is not always the case.
To diagnose the cause of your black feces, a doctor will carry out a procedure called upper endoscopy. They may also arrange for blood tests and an analysis of stool culture, as well as tests to detect the presence of cancer.
Treatment will depend on the cause of the black stool, but it can include getting a blood transfusion, stitching the site of the bleed, or undergoing surgery to remove a tumor.
Contact your doctor if you have persistent black stool, blood in your stool, or any other changes in your stool or bowel habits.