help :(

when should i take a pregnancy test ? i’ve been having unprotected sex a couple of times with my boyfriend.(i know very stupid) but i was ovulating too so a plan b wouldn’t have even helped. i just keep stressing it and don’t know when to take a pregnancy test. i’m expecting my period on january 9th.