Yea you need to see your doctor, and I'm assuming your parents will need to know so you can do that.
I agree the sooner the better. I was 17 when I got pregnant with my daughter and it killed me to try and hide it, its stressful to keep such a secret. And the longer you wait most likely they'll become upset that you didn't tell them sooner. Just remember people can't stay upset forever and you never know u might not get such a bad reaction out if it. I expected the worst but it wasn't that bad at all. I am now pregnant again at 19 the only difference is I'm out of school and married. But I still live at home. I decided to come out to my mom the day after I found out and my husband the day of. It's quite relieving to put it all out on the table. I would tell the guy first and then come together as adults and inform your families. It shows maturity and responsibility for your actions. Things will be better once this weight is off your chest, you need the support right now more than anything.
I would tell them as soon as possible I know it's hard but they need to know especially the father of the child hopefully you won't feel alone anymore (:
The best time to tell them is now. The sooner the better. You're going to need a support system to help you through the transition. It may seem scary and you're worried about how they take it but you have to have ppl on your side to help you through this. I'm 8 weeks and I found out at 5 and told everyone the same day.