What's the earliest?

What's the earliest I can take a pregnancy test before my period and get an accurate answer?