Sex around ovaulation

Can you get pregnant if you have sex a few days before your ovulation day or a few days after or is it just on your ovulation window