The digestive system and excretory system are two bodily systems with seemingly unrelated functions: that of breaking down food for energy and that of removing waste from the body, respectively. There is, however, a good deal of overlap in the relationship between the digestive system and excretory system. In particular, the liver plays a role that relates to both systems, as it receives blood from the intestines and filters out post-digestive waste such as drugs and alcohol before that blood is cycled back into the body. It then releases bile, a substance that is necessary to the filtering process, back into the intestines in exchange. That bile then becomes a part of the stool that is eliminated from the body during defecation.
The digestive system includes all organs and passageways of the digestive tract, including the mouth, throat, esophagus, stomach, liver, gallbladder, pancreas, small intestine, and large intestine. These organs are responsible for transporting, breaking down, and extracting nutrients from food that the body can use for energy and for other metabolic processes. At the lower end of the digestive tract, the colon performs another function: the removal of undigested food waste and bile from the body. This is one example of the overlap in the relationship between the digestive system and excretory system. That is, even though this type of waste removal is considered a function of the digestive system, as the intestines are namely a digestive organ where nutrients are absorbed into the bloodstream and not strictly an organ of excretion like the kidneys, in this role they contribute to the excretory process.
Organs included in the excretory system tend to be those that function to remove waste, although they may not do this exclusively. The kidneys and bladder are included because they remove metabolic byproducts like salt and water via urine. Skin is included because it contains sweat glands that excrete a small amount of metabolic byproducts in perspiration. The lungs are included because they expel carbon dioxide in exchange for oxygen, with carbon dioxide a byproduct of metabolism. Simply put, any metabolic process, or that in which energy taken in through food is released as calories burned, resulting in waste byproducts, requires an excretory function.
Most of the overlap in the relationship between the digestive system and excretory system occurs in the liver. The liver is found in alongside the stomach in the abdominal cavity; it is linked to the digestive tract by a large vessel called the hepatic portal vein. After drugs, alcohol, or other toxic substances have reached the large intestine, they are absorbed through the intestinal wall into the bloodstream and transported to the liver via the hepatic portal vein, and then filtered out of the bloodstream. Additionally, the liver produces bile, a substance that is released into the small intestine to emulsify dietary fat so that it may be absorbed by the body. Bile as well as bilirubin, or dead red blood cells contained in the bile that are a byproduct of metabolism in the liver, are then eliminated from the body through excretion in stool.