ovulation question!

j
so I have 2 questions
​1. how long do you ovulate for? is it a matter of hours or days?
​2. how long do sperm live inside of you? 
​I've seen different things. one site will say you can have sex the day before ovulating and because it's inside you, you could get pregnant.  another site says it only live for a few hours and you only ovulate for a few hours so it has to be at the PERFECT time. this is more stressful than it should be..