What Is a Leap Year?

A leap year has 366 days instead of 365. The extra day, 29 February, keeps the calendar from drifting too far away from the seasons.

Leap Years: Divisible by 4, Usually leap; Century years, Usually not leap; Divisible by 400, Leap year.

Why add an extra day?

The Gregorian calendar normally gives February 28 days. But Earth takes a little more than 365 days to travel around the Sun and return to the same seasonal position. If the calendar used exactly 365 days every year, dates for the seasons would gradually shift. Adding a day from time to time corrects most of that difference.

The actual year is not exactly 365 days plus one quarter. It is about 365.2422 days. A simple leap day every four years would assume an average year of 365.25 days, adding slightly too much correction over long periods. The Gregorian calendar therefore uses a rule with century exceptions.

The Gregorian rule

A year is a leap year when it is divisible by 4, except that years divisible by 100 are not leap years unless they are also divisible by 400. In practical terms:

The U.S. Naval Observatory leap-year explanation gives the rule and describes how it approximates the seasonal year.

  • 2024 is a leap year because it is divisible by 4 and is not a century year.
  • 1900 was not a leap year because it is divisible by 100 but not by 400.
  • 2000 was a leap year because it is divisible by 400.

Across a 400-year cycle, this rule includes 97 leap years. The average calendar year is then 365.2425 days, close to the seasonal year. The small remaining difference is gradual and does not mean every calendar's relationship to seasons is identical.

What happens to 29 February birthdays?

Someone born on 29 February has that exact calendar birthday only in leap years. In other years, people and organizations may observe it on 28 February or 1 March. There is no single answer for every legal or administrative purpose. If a birthday affects a contract, age limit or official form, follow the applicable local rule rather than assuming how software should treat it.

Leap years in software

Calendar libraries usually apply the Gregorian leap-year rule for modern dates. Avoid checking leap years with only “divisible by four,” because that gives the wrong result for years such as 1900. Also avoid assuming that adding 365 days always means “same date next year.” If a year later lands on 29 February and that date does not exist, the application needs a deliberate policy.

Leap years affect day-of-year numbers, annual schedules and the length of date ranges. They do not add an extra hour to every day or change the definition of a second. To check a year with the site's live clock, visit the date and time tools. For the very different one-second adjustment to UTC, read What Is a Leap Second?

Why the rule uses centuries

The seasons return on a cycle that is close to, but not exactly, 365.25 days. The Julian calendar's simple four-year pattern treats the average year as 365.25 days. That is a little longer than the seasonal year, so the calendar slowly moves relative to the seasons. The Gregorian reform refined the rule by leaving out most century leap days and keeping the years divisible by 400.

The Gregorian average is 365.2425 days over a 400-year cycle. This is a close practical approximation, not a claim that the calendar perfectly tracks every astronomical measurement. For civil purposes, the rule offers a predictable way to keep seasons and calendar dates aligned over long spans.

Leap year, leap day and date arithmetic

A leap year is a whole calendar year with 366 dates; a leap day is the added date, 29 February. A leap year does not make every day longer, and it is separate from the occasional leap-second adjustment to a time scale. The similar names describe corrections to different systems.

Date arithmetic needs a policy for dates that do not exist in a target year. If an annual subscription begins on 29 February, adding one calendar year could mean moving to 28 February or 1 March, depending on the product's rules and local law. A general-purpose library may pick a default, but an application should make the intended behavior clear to users. Try the date add and subtract calculator to see its month-end convention.

Leap years and recurring dates

Some events occur on a fixed month and day, while others are defined by a weekday pattern such as “the last Monday of February.” Those are different recurrence rules. A fixed date may be absent in a common year; a weekday rule is recalculated from the calendar each year. Represent the rule itself instead of repeatedly adding 365 days to the previous occurrence.

Testing should include a century year that is not a leap year, a year divisible by 400, and the transition from late February to early March. These examples catch the common mistake of treating every year divisible by four as a leap year.

Calendar adoption is a separate issue

The Gregorian rule is used widely for modern civil dates, but countries adopted it at different times. Historical documents may use a Julian date, a Gregorian date or another local calendar. Applying the modern leap-year rule to an old date is a computational convention, not proof that people in that place used the Gregorian calendar at the time.

When historical accuracy matters, identify the calendar named by the source and the jurisdiction's adoption history. For software that extends Gregorian rules backward uniformly, see What Is the Proleptic Gregorian Calendar?