The Julian calendar introduced after Julius Caesar's reform set ordinary years at 365 days and added leap days according to a rule. This improved the alignment of the earlier Roman calendar with the seasons.

Its average year was slightly longer than a tropical year, producing a growing discrepancy over time. The Gregorian calendar later adjusted the leap-year rules.

Motivation

The ordinary year in the previous Roman calendar consisted of 12 months, for a total of 355 days. In addition, a 27- or 28-day intercalary month, the Mensis Intercalaris, was sometimes inserted between February and March. This intercalary month was formed by inserting 22 or 23 days after the first 23 days of February; the last five days of February, which counted down toward the start of March, became the last five days of Intercalaris. The net effect was to add 22 or 23 days to the year, forming an intercalary year of 377 or 378 days. Some say the mensis intercalaris always had 27 days and began on either the first or the second day after the Terminalia (23 February).

If managed correctly, this system could have allowed the Roman year to stay roughly aligned to a tropical year. However, since the pontifices were often politicians, and because a Roman magistrate's term of office corresponded with a calendar year, this power was prone to abuse: a pontifex could lengthen a year in which he or one of his political allies was in office, or refuse to lengthen one in which his opponents were in power.

Caesar's reform was intended to solve this problem permanently, by creating a calendar that remained aligned to the sun without any human intervention. This proved useful very soon after the new calendar came into effect. Varro used it in 37 BC to fix calendar dates for the start of the four seasons, which would have been impossible only 8 years earlier. A century later, when Pliny dated the winter solstice to 25 December because the sun entered the 8th degree of Capricorn on that date, this stability had become an ordinary fact of life.

Context of the Julian reform

Although the approximation of 365+1⁄4 days for the tropical year had been known for a long time, ancient solar calendars had used less precise periods, resulting in gradual misalignment of the calendar with the seasons.

The octaeteris, a cycle of eight lunar years popularised by Cleostratus (and also commonly attributed to Eudoxus) which was used in some early Greek calendars, notably in Athens, is 1.53 days longer than eight mean Julian years. The length of nineteen years in the cycle of Meton was 6,940 days, six hours longer than nineteen mean Julian years. The mean Julian year was the basis of the 76-year cycle devised by Callippus (a student under Eudoxus) to improve the Metonic cycle.

In Persia (Iran) after the reform in the old Persian calendar by introduction of the Persian Zoroastrian (i. e. Young Avestan) calendar in 503 BC and afterwards, the first day of the year (1 Farvardin, Nowruz) slipped against the vernal equinox at the rate of approximately one day every four years.

Likewise in the Egyptian calendar, a fixed year of 365 days was in use, drifting by one day against the sun in four years. An unsuccessful attempt to add an extra day every fourth year was made in 238 BC (Decree of Canopus). Caesar probably experienced this "wandering" or "vague" calendar in that country. He landed in the Nile Delta in October 48 BC and soon became embroiled in the Ptolemaic dynastic war, especially after Cleopatra managed to be "introduced" to him in Alexandria.

Year length; leap years

The Julian calendar has two types of year: "normal" years of 365 days and "leap" years of 366 days. There is a simple cycle of three "normal" years followed by a leap year and this pattern repeats forever without exception. The Julian year is, therefore, on average 365.25 days long. Consequently, the Julian year drifts over time with respect to the tropical (solar) year (365.24217 days).