Miscarriage? Help!

It's 22 days since the first day of my last period. The app is always right about when my period will start. It shouldn't start for another 5 days. Last night I started spotting. It was a mixture of cervical mucus and blood. I spotted light all night. Today all of a sudden I had extreme stomach pains and bleeding so heavy that I bled through a few super size tampon. A few hours later I went back to spotting. I now am barely bleeding. Could this have been a miscarriage? My period is always on time. And if it's off its only by a day. Not by 5 or more days. I'm not taking any be meds or doing anything different.