I went to the er

I was spotting quite a bit with pretty bad cramps. And the health department said I was 7 weeks along. But when I went to the ER they gave me an ultrasound and everything is okay. But they said I was only 5 weeks not 7 weeks. How accurate could that be? I'm just curious.