. If we look at the history of the calendar then it is seen that Egyptians made the first attempt to chalk out a perfect calendar. The Egyptians were knowledgeable enough to know that the Earth moves along an orbit in space around the Sun. They counted each day of the year and got a total of 365 days. They divided the year into 12 months and decided that each month would have 30 days. According to this, the total days of the year came to 360. There was a difference of 5 days. To accommodate these days in a calendar year they simply added the remaining five days to the last month.
The final calculation was still incorrect since a year is the time taken by the Earth to complete one circle round the Sun and that is equal to 365.25 days, and not exact 365 days. They had not taken into account the 1/4th day that remained. The Egyptians perhaps did not realize this fact. As a result, as the years succeeded one another, their calendar started going wrong. The mistake was only of 1/4th day. Nevertheless, after a lapse of many years this small mistake snowballed into a huge one.
Egyptian calendar (Wikipedia)
List of calendars (Wikipedia)