The Gregorian calendar is the calendar used in most of the world. It was introduced in October 1582 by Pope Gregory XIII as a modification of, and replacement for, the Julian calendar. The principal change was to space leap years differently so as to make the average calendar year 365.2425 days long, more closely approximating the 365.2422-day 'tropical' or 'solar' year that is determined by the Earth's revolution around the Sun. The rule for leap years is:
Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100, but these centurial years are leap years if they are exactly divisible by 400. For example, the years 1700, 1800, and 1900 are not leap years, but the years 1600 and 2000 are.
— United States Naval Observatory
There were two reasons to establish the Gregorian calendar. First, the Julian calendar assumed incorrectly that the average solar year is exactly 365.25 days long, an overestimate of a little under one day per century, and thus has a leap year every four years without exception. The Gregorian reform shortened the average (calendar) year by 0.0075 days to stop the drift of the calendar with respect to the equinoxes. Second, in the years since the First Council of Nicaea in AD 325, the excess leap days introduced by the Julian algorithm had caused the calendar to drift such that the (Northern) spring equinox was occurring well before its nominal 21 March date.
This date was important to the Christian churches because it is fundamental to the calculation of the date of Easter. To reinstate the association, the reform advanced the date by 10 days: Thursday 4 October 1582 was followed by Friday 15 October 1582. In addition, the reform also altered the lunar cycle used by the Church to calculate the date for Easter, because astronomical new moons were occurring four days before the calculated dates. It is notable that whilst the reform introduced minor changes, that the calendar continued to be fundamentally based on the same geocentric theory as its predecessor.
The reform was adopted initially by the Catholic countries of Europe and their overseas possessions. Over the next three centuries, the Protestant and Eastern Orthodox countries also moved to what they called the Improved calendar, with Greece being the last European country to adopt the calendar (for civil use only) in 1923. To unambiguously specify a date during the transition period (in contemporary documents or in history texts), both notations were given, tagged as 'Old Style' or 'New Style' as appropriate. During the 20th century, most non-Western countries also adopted the calendar, at least for civil purposes.