The calendar was not very accurate, but could be set back into alignment every New Years day. However, while this was sufficient to manage the planting of crops and time the preparations for the inundation, it was not accurate enough to support a complex administration and easy calculation and collection of taxation. As a result, a new civic calendar was developed during the Early Dynastic Period based around three seasons of four thirty day months each divided into three "decades" (sets of ten days). The two calendars ran concurrently and were used for different functions.
Yet, this only amounted to a three hundred and sixty day year, so five epagomenal days (known as "heriu renpet") were added to the end of each year and dedicated to the five children of Nut (Osiris, Horus the Elder, Set, Isis and Nephthys). Yet this system still missed a quarter of a day each year, causing the calendar to slip slowly out of position. Ptolemy III tried to introduce an extra day every four years to correct this, but the Egyptians were resistant to this idea and it was not fully implemented until Augustus introduced the "leap year" in 30BC.
Despite their use of this apparently confusing system, the Ancient Egyptians were such acomplished astronomers and mathematicians that they constructed Abu Simbel so precisely that a ray of sunshine extended down an internal corridor to illuminated a statue of the pharaoh on his birthday!