You have up to 5 days (120 hours) after you have unprotected sex to take plan b and for it to work, however, the sooner you take it the better chances you have of not getting pregnant. Also, plan b also tends to throw your cycle off and cause some spotting.