Skip to content
Toolcroft

Leap Year & Days-in-Month Checker

Date & Time

Check if any year is a leap year, see the number of days in each month, find the next and previous leap years, and explore why 1900 was not a leap year.

2026

Not a Leap Year

365 days

Previous Leap Year

2024

Next Leap Year

2028

Month ▲▼Days ▲▼
January31
February28
March31
April30
May31
June30
July31
August31
September30
October31
November30
December31

How to use this tool

  1. Enter any year (e.g. 2024, 1900, 2100).
  2. Instantly see whether it is a leap year and how many days each month has.
  3. View the nearest previous and next leap years.

Gregorian leap year rules

A year is a leap year if it is divisible by 4, except century years must also be divisible by 400.

  • 2024 = leap year (divisible by 4, not a century year)
  • 2000 = leap year (divisible by 400)
  • 1900 = NOT a leap year (divisible by 100, but not 400)

Why we need leap years

Earth takes ~365.2422 days to orbit the Sun. Without leap years, the calendar would drift by about 1 day every 4 years. After a century, seasons would shift by 25 days. The Gregorian calendar (introduced 1582) corrects the drift of the older Julian calendar.

Julian vs. Gregorian calendar

The Julian calendar (introduced by Julius Caesar in 46 BC) adds a leap year every 4 years without exception - a year length of exactly 365.25 days. Because the true solar year is ~365.2422 days, the Julian calendar gained about 11 minutes per year. By 1582 this had accumulated a ~13-day drift, causing the spring equinox to fall on March 10 instead of March 21. Pope Gregory XIII introduced the Gregorian reform to drop 10 days and install the century-year exception (divisible by 100 but not 400 = no leap year), which reduces the annual error to ~26 seconds.

Leap systems in other calendars

  • Hebrew calendar: a lunisolar calendar that adds an entire 13th month (Adar I) seven times in every 19-year Metonic cycle, keeping the calendar aligned with both the lunar months and the solar year.
  • Islamic (Hijri) calendar: a purely lunar calendar of 354 days with no intercalation - months rotate through all seasons over a ~33-year cycle, so Ramadan can fall in any season.
  • Ethiopian calendar: 12 months of 30 days plus a 13th month (Pagume) of 5 days (6 days in a leap year), keeping it roughly aligned with the Coptic calendar.

Programming note

JavaScript's Date object handles Gregorian leap years correctly. A reliable idiom is to test whether February 29 exists in a given year:

function isLeapYear(year) {
  return new Date(year, 1, 29).getDate() === 29;
}

When a non-leap year is passed, new Date(year, 1, 29) automatically rolls over to March 1 (day 1 of month 2 in zero-indexed terms), so getDate() returns 1, not 29.

Frequently asked questions

What is a leap year?

A leap year has 366 days instead of 365, with February 29 added. It occurs when a year is divisible by 4, except for century years - which must be divisible by 400. So 2000 was a leap year, but 1900 was not.

Why do we have leap years?

A solar year (Earth orbiting the Sun) is approximately 365.2422 days. Without leap years, our calendar would drift by about 6 hours per year, causing seasons to shift over centuries.

What is a leap day?

February 29 is called a leap day. It is added every four years (with the century exception) to keep the calendar synchronized with Earth's orbit.

Browse all date & time