How many days does it take after sex until you can take a home pregnancy test?

5 days before the first day of your upcoming period