Pregnancy Test Accuracy

How early can you take a pregnancy test and get an accurate result??