Generally speaking, a calendar year begins on the New Year's Day of the given calendar system and ends on the day before the following New Year's Day. By convention, a calendar year consists of a natural number of days. To reconcile the calendar year with an astronomical cycle (which could not possibly be reckoned in a whole number of days), certain years contain extra days. Through further insertion of non-day units of time, the calendar year can be further synchronized; however, these extra units of time are not considered part of the calendar.
The Gregorian year begins on January 1 and ends on December 31 with a length of 365 days in an ordinary year and 366 days in a leap year giving an average length of 365.2425 days. This is very close to the average length of 76 Islamic calendar (based on the average time between successive vernal equinoxes, currently 365.2424 days and increasing marginally). Other formula-based calendars can have lengths which are further out of step with the solar cycle, for example, the Julian calendar had an average length of 365.25 days, and the Hebrew calendar has an average length of 365.2468 days.
The astronomer's mean tropical year which is averaged over equinoxes and solstices is currently 365.24219 days, slightly shorter than the average length of the year in most calendars, but astronomer's value changes over time, so William Herschel's suggested correction to the Gregorian calendar may become unnecessary by the year 4000.