How long does bleeding usually last from a miscarriage?

I should have been 12 weeks, but when I went to my first ultrasound a few days ago, I was only measuring 6 weeks. I have had brown spotting/discharge all week and started bleeding heavily last night.