Why do we have leap years? The science behind the Gregorian, Hijri and Rumi calendars
Why does February sometimes have 29 days? Why does Ramadan come about 11 days earlier each year? What do the Rumi dates in old Ottoman documents mean? We explain the astronomy and history behind calendars in plain language.
By Kuazara Bilim EkibiPublished: Updated: 7 min read

In this article · 7 sections
Someone born on 29 February can celebrate their birthday on its actual date only once every four years. So why was such an odd day added to our calendar? The answer lies in the “imperfect” number that comes with the Earth’s motion around the Sun. In this post we explain the reason for leap years, why different calendars work differently, and what the Rumi dates we see in Ottoman documents mean.
The sky doesn’t run like clockwork
A calendar is people’s attempt to keep count of events that repeat in the sky. There are three natural cycles:
- Day: the Earth turning once on its own axis.
- Month (lunar month): the Moon going through all its phases; about 29.5 days from one new moon to the next.
- Year (solar year): the seasons coming round once; about 365.2422 days.
Here is the problem: these cycles don’t divide into each other a whole number of times. A year is not exactly 365 days, and a year doesn’t hold exactly 12 cycles of the Moon’s phases either. Every calendar has to choose a way of dealing with these “leftover fractions”. This is the main reason why different calendars are different.
Leap years: the missing quarter of a day
If you take a year to be 365 days, you fall behind by about a quarter of a day (about 6 hours) every year. That seems small, but it adds up: one day in 4 years, about 24 days in 100 years, about 6 months in 700 years! In the end your calendar says July while you are living through winter.
To solve this problem, in 46 BC Julius Caesar set up a new calendar on the advice of the astronomer Sosigenes of Alexandria. In this system, called the Julian calendar, one day was added to the year every four years. So the average length of a year became:
Still not enough: the Gregorian correction
365.25 days is a little longer than the true value of 365.2422 days. The difference is only about 11 minutes a year:
But even this small difference adds up to a whole day in about 128 years. By the 16th century the calendar had drifted about 10 days out of step with the seasons. The spring equinox was falling around 11 March instead of on 21 March, where it should have been.
In 1582 Pope Gregory XIII announced a calendar reform. Two steps were taken:
- To wipe out the accumulated drift, 10 days were skipped: the day after Thursday 4 October 1582 became Friday 15 October 1582.
- The leap year rule was refined.
The new rule is:
- Years divisible by 4 are leap years (2024, 2028...).
- But years divisible by 100 are not leap years (1900, 2100...).
- However, years divisible by 400 are leap years after all (2000, 2400...).
With this rule there are 97 leap years in every 400 years, not 100. The average length of a year is:
This value is so close to the real one that the error only adds up to one day in about 3,000 years. The calendar used across most of the world today, known in Turkish as the Miladi calendar, is this very Gregorian calendar.
The Hijri calendar: a calendar that follows the Moon
The Hijri calendar is based entirely on the Moon. Its year is made up of 12 months of 29 or 30 days and lasts about 354 or 355 days in total. Its starting point is 622, the year the Prophet Muhammad migrated from Mecca to Medina (the Hijra). This starting point was made official in the time of Caliph Umar.
Because the Hijri year is about 11 days shorter than the solar year, the Hijri months don’t stay fixed to the seasons. This is why the month of Ramadan comes about 11 days earlier in the Gregorian calendar each year. In about 33 years, Ramadan moves through all the seasons and comes back round to the same one. Over a lifetime, a person fasts both in the long days of summer and in the short days of winter.
In the Hijri calendar, each month traditionally begins when the new crescent Moon is sighted. Today many countries also use astronomical calculations instead. In the tabular Hijri calendar used for calculations, 11 years in each 30-year cycle are counted as 355 days and the rest as 354 days.
The Rumi calendar: the Ottoman fiscal calendar
In old title deeds, population registers or Ottoman documents, you may come across dates such as “1333”. These usually belong to the Rumi calendar.
The Ottoman state had trouble collecting taxes and paying salaries. Taxes depended on the harvest, in other words on the solar year, but the state used the Hijri calendar. Because the Hijri year is shorter, roughly every 33 years an “extra” year went by, and the accounts for civil servants’ salaries got muddled. To solve this problem, the Rumi calendar was adopted in 1840 for use in financial matters.
The Rumi calendar is an interesting hybrid: it counts days and months according to the Julian calendar, so it is a solar calendar. But, like the Hijri calendar, it counts its years from the Hijra in 622. Its new year falls on 1 March. In 1917 the days of the Rumi calendar were brought into line with the Gregorian calendar, and 13 days were skipped in the process. From then on, Rumi and Gregorian years usually differ by 584 years; for example, Rumi 1333 corresponds to 1917 in the Gregorian calendar. However, because the two calendars start their years on different days, this difference can be off by one year for dates in the first months of the year; to convert exactly, it is safest to use a table.
With a law passed on 26 December 1925, the Republic of Türkiye adopted the Gregorian calendar as its official calendar from 1 January 1926.
Myth or fact?
- “There is a leap year every four years.” Not exactly. 1900 was not a leap year, and 2100 won’t be either. 2000, on the other hand, was a leap year because it is divisible by 400.
- “A year is exactly 365 days and 6 hours.” Approximately. The real value is about 365 days, 5 hours and 48 minutes; that difference is the reason for the Gregorian reform.
- “The Rumi calendar is a Christian calendar.” False. It counts days according to the Julian system, but its count of years starts from the Hijra. It is a uniquely Ottoman compromise.
- “Calendars don’t drift at all any more.” Even the Gregorian calendar isn’t perfect, but its error is so small that it won’t be noticeable in our lifetimes or our grandchildren’s.
Connection to today
The calendar problem hasn’t stayed in the history books. When programmers get the leap year rule wrong, software can fail on 29 February. Whether 2000 was a leap year was one of the things many software teams checked at the time. If you try to write a simple program that works out which day of the week a date falls on, you will run into exactly the same problems that Caesar and Gregory faced.
Summary
- The solar year is about 365.2422 days long; calendars use different rules to handle the leftover fraction.
- The Julian calendar added a leap year every 4 years; the Gregorian calendar refined this with the 100 and 400 rules.
- The Hijri calendar is based on the Moon; its year is about 354 days long, which is why Ramadan comes about 11 days earlier each year.
- The Rumi calendar was used by the Ottomans for financial matters; it combined Julian days with years counted from the Hijra.
- Türkiye has used the Gregorian calendar since 1926.
Frequently asked
4 questionsWhy do leap years exist?
Which years are leap years?
Why does Ramadan come earlier every year?
How do I convert a Rumi date to the Gregorian calendar?
Sources
3 sources- 1.Encyclopaedia Britannica — Gregorian calendar
- 2.Richards, E. G. — Mapping Time: The Calendar and its History, Oxford University Press (1998)
- 3.Reingold, E. M., Dershowitz, N. — Calendrical Calculations, Cambridge University Press
- #leap year
- #calendar
- #hijri calendar
- #rumi calendar
- #gregorian calendar


