when to take a pregnancy test?

I am supposed to get my period in 5 days. My boyfriend and I had sex on Christmas eve and he never pulled out. I am on the pill. When should I take a pregnancy test to get an accurate result? Please help!!