Sperm

How long does it live inside a females body after inter course. And if I had sex a day before fertile window would there be a chance of pregnancy?🤔