Stressed to the max!

I need advice..I'm stressing out way too much over if I'm gonna have my period on time. I don't want to have a baby yet and just thinking about it is giving me an anxiety attack..I had sex 4 days ago, how long should I wait to take a test?