how long do I wait

Okay so I am on birth control, but it's been acting wonky. (Currently on day 37 of a period that is finally ending) 
My boyfriend and I had condomless sex a few days ago (still on period) and he came inside me. (He doesn't usually cum inside, but I wanted him to this time) 
As a precaution due to irregular cycles, I prefer to take random pregnancy tests to keep my mind at ease.
How long should I wait to take a pregnancy test that will include the other night.