Possible miscarriage???

This just came out of me, and previous to it coming out I had really bad cramps. Is it just a blood clot or could it be a miscarriage?