The Gregorian calendar was calculated to be 52 weeks long after German astronomer Christopher Clavius proposed that leap years should be counted only if the digits of years ending in 00 were divisible by 400. The Gregorian calendar is based on the Roman Julian calendar.
The Julian calendar served as the template for the Gregorian calendar, but it was inaccurate due to an error that caused it to be 11 minutes and 14 seconds shorter than the actual solar year. This inaccuracy caused a 10-day difference between the actual solar year and the time that the Gregorian calendar was created. The solar year was calculated by observing and recording annual positioning of the sun and other stars. The Gregorian calendar was created to fix this error.
Clavius calculated that the inaccuracy totaled three days every 400 years, and suggested that it could be fixed by removing the leap year from every century leap year that occurred between centuries that had digits divisible by 400. This idea allowed the 10-day difference between the actual solar year and the proposed Gregorian calendar to be greatly reduced, increasing the calendar's accuracy and causing it to be 52 weeks long. After the idea for the Gregorian calendar was accepted and put into effect by the Pope on Oct. 4, 1582, the following calendar day was announced as October 15 in order to correct the 10-day discrepancy.