Gregorian Calander

Does anyone know the equation to find out if a year is a Leap Year on the Gregorian Calander, and the day of the week a certain date will fall on depending on the Year. Thanks in advance.