when's a good time you tell your parents?

Br
So I'm 18, living with my boyfriend, I found out I was pregnant a couple of days ago. When is a good time to tell my parents that I'm pregnant and how should I break it to them?