Dark, tarry stool is also known as melena. This is a problem you should discuss right away with your primary care doctor
There are a number of things that can affect the color of your stool. In a healthy person the break down product of our red blood cells into hemoglobin, then transforming to bilirubin and bile make the color of your stool turn light yellowish/brown. A change in your diet to include more red meat will likely change your stool color to a darker brown. Likewise if you consume a lot of blue or black fruits like blue berry the stool color will be near black. However if none of the above was true and you still have dark color stool then it is very possible that you have a bleeding
stomach or duodenal ulcer
, or a bleeding mass or polyp in the colon. If you consistently have black tarry stool, it is best to get a hemocult test, checking for the presence of blood in your stool. There are certain food and supplements such as iron that can make your hemocult test falsely positive but all in all it is a pretty good screening test for bleeding in your intestine. If it is confirmed that you have blood in your stool then you'll need to undergo upper and lower endoscopies to figure out where it is coming from and potentially treat it. You can get the hemocult test by seeing your primary care provider and asking for a kit to take home.