The earliest you can detect pregnancy using home pregnancy tests is from the first day of your missed period. If you are unsure of the date of your next period you can do the test three weeks after you had sex.
1 Additional Answer
The earliest time that you can detect pregnancy is at two weeks. This is a time when you start noticing some changes to your body and the amount of human chorionic gonadotrophin in your urine can be detected.