Fertile window

When would you have a smaller chance of getting pregnant? Before or after your fertile window? When would the safest time be?