Definition of year (Gregorian) unit: = 365.2425 d average. As the common year has 365 days, the Gregorian calendar with leap years compensate the deviation from the real, astronomical year. According to this calendar, every 4th year is a leap year, except for every 100th. But every 400th is a leap year. This means that there are 97 leap years in 400 year period. So according to Gregorian's calendar, one year has 365 + 97/400 days (average). This is not a perfect approach, but in 1000 year period, the defiation is only 0.3 days compared to the astronomical year. In the year 1582 Gregorian replaced the Julian calendar.