Leap Year Calculator

Check if any year is a leap year and find all leap years in a date range.

Check Year

Find Leap Years in Range

Leap Year Rules

  • 1. Divisible by 4 = leap year
  • 2. EXCEPT if divisible by 100 = not leap year
  • 3. EXCEPT if divisible by 400 = leap year

2026

is NOT a Leap Year

Year Details

Days in February28
Total Days in Year365
Previous Leap Year2024
Next Leap Year2028

Nearby Leap Years

Leap Years 2000-2100 (25 total)

2000200420082012201620202024202820322036204020442048205220562060206420682072207620802084208820922096

What Is a Leap Year?

A leap year is a calendar year that contains an extra day — February 29 — making it 366 days long instead of the usual 365. Leap years exist to keep the calendar aligned with Earth's actual orbital period around the Sun, which is approximately 365.2422 days (the tropical year). Without leap years, the calendar would drift approximately 1 day every 4 years, causing the seasons to gradually shift — summer in December, winter in June — over several centuries.

The Gregorian calendar, which is the most widely used civil calendar in the world, uses the following rule to determine whether a year is a leap year:

  • A year is a leap year if it is divisible by 4 (e.g., 2024, 2028)
  • Except: Years divisible by 100 are not leap years (e.g., 1800, 1900)
  • Except the exception: Years divisible by 400 are leap years (e.g., 1600, 2000, 2400)

This three-part rule gives the Gregorian calendar an average year length of exactly 365.2425 days — extremely close to the actual tropical year of 365.2422 days. The error accumulates to only 1 day in approximately 3,030 years.

The Leap Year Rule

The Gregorian leap year rule can be expressed compactly as a logical formula:

Gregorian Leap Year

isLeapYear = (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0

Where:

  • year % 4 === 0= Divisible by 4 — the basic 4-year rule; true for most leap years
  • year % 100 !== 0= NOT divisible by 100 — excludes century years from the 4-year rule
  • year % 400 === 0= Divisible by 400 — overrides the century exclusion; makes every 400th year a leap year
  • daysInFeb= 29 if isLeapYear is true, 28 otherwise
  • totalDays= 366 if isLeapYear is true, 365 otherwise

Why Three Rules? The Calendar Math

The three-part rule results from an attempt to approximate 365.2422 days as precisely as possible using simple integer arithmetic:

Rule Effect Average Year Length Error vs. Tropical Year
Every 4 yearsAdd 1 day each 4 years365.25 days+0.0078 days/year (too long)
Minus centuriesRemove 1 day each 100 years365.24 days−0.0022 days/year (too short)
Plus 400-yearAdd 1 day each 400 years365.2425 days+0.0003 days/year (very close)

How to Use This Calculator

  1. Enter a Year: Type any year in the Year field to immediately see whether it is a leap year.
  2. Read the Results: The result shows whether the year is a leap year, how many days it has (365 or 366), and how many days February has (28 or 29).
  3. Nearby Leap Years: A list of surrounding leap years is displayed to provide context.
  4. Leap Year Range: Enter a Start Year and End Year to generate a complete list of all leap years in that span.

Real-World Applications

Software developers frequently need to check for leap years when implementing date arithmetic, billing systems that charge monthly fees, age calculators, anniversary reminder applications, and any system where exact day counts matter. The February 28/29 boundary is a classic source of off-by-one errors in code that handles date ranges.

People born on February 29 (called leaplings or leap day babies) celebrate their exact birthday only once every four years. Legal systems and computer systems handle these birthdays differently — some consider the birthday to fall on February 28 in non-leap years, others on March 1. Software handling birth dates must explicitly account for this edge case.

Financial systems that calculate daily interest, bond yields, or lease payments need to correctly handle the extra day in leap years. The difference between 365 and 366 days can materially affect the present value of long-duration instruments — especially those using actual/365 or actual/366 day count conventions.

Worked Examples

Is 2024 a Leap Year?

Problem:

Determine whether 2024 is a leap year.

Solution Steps:

  1. 12024 % 4 = 0 ✓ (divisible by 4)
  2. 22024 % 100 = 24 ≠ 0 (NOT a century year)
  3. 3Result: (true && true) || false = true

Result:

2024 IS a leap year. February has 29 days; the year has 366 days.

Is 1900 a Leap Year?

Problem:

Was 1900 a leap year in the Gregorian calendar?

Solution Steps:

  1. 11900 % 4 = 0 ✓ (divisible by 4)
  2. 21900 % 100 = 0 → (year % 100 !== 0) = FALSE (IS a century year)
  3. 31900 % 400 = 300 ≠ 0 (not divisible by 400)
  4. 4Result: (true && false) || false = false

Result:

1900 is NOT a leap year. Many old software systems (including Excel) got this wrong, treating 1900 as a leap year.

Is 2000 a Leap Year?

Problem:

Was 2000 a leap year?

Solution Steps:

  1. 12000 % 4 = 0 ✓
  2. 22000 % 100 = 0 → century year, first condition fails
  3. 32000 % 400 = 0 ✓ → overrides the century exclusion
  4. 4Result: (true && false) || true = true

Result:

2000 IS a leap year (divisible by 400). This is often a source of confusion since 1900 was not a leap year but 2000 was.

Tips & Best Practices

  • Quick check: a year ending in '00' is a leap year ONLY if it's also divisible by 400 (so 2000=yes, 2100=no, 2400=yes).
  • For most years, just check divisible by 4 — the century-year exception only applies every 100 years.
  • In code: isLeapYear = (y % 4 === 0 && y % 100 !== 0) || y % 400 === 0 — memorize this pattern.
  • February 29 is the rarest calendar date, occurring only ~24.25% of years vs. 100% for most other dates.
  • Excel treats 1900 as a leap year (a known bug inherited from Lotus 1-2-3) — be careful when working with dates near February 1900 in spreadsheets.
  • Next 3 leap years from 2024: 2028, 2032, 2036 — none of these are century years, so the simple 'divisible by 4' rule applies.

Frequently Asked Questions

People born on February 29 are called 'leaplings' or 'leap day babies.' In non-leap years, different jurisdictions handle their legal birthday differently. In the UK and Hong Kong, the legal birthday is considered March 1 in non-leap years. In New Zealand and Taiwan, it is February 28. In the US, there is no federal law on this — it varies by state and context. Practically, most leaplings celebrate on February 28 or March 1 depending on personal preference.
Both 1900 and 2000 are divisible by 100, making them century years excluded from the basic 4-year rule. However, 2000 is also divisible by 400, which overrides the exclusion and makes it a leap year. 1900 is divisible by 100 but not by 400 (1900 / 400 = 4.75), so it is not a leap year. This distinction caught many software developers and systems (including Excel) off guard when the year 2000 arrived.
Yes, but with a simpler rule: every year divisible by 4 is a leap year, without the century-year exception. The Julian calendar averages 365.25 days per year — longer than the actual tropical year of 365.2422. This cumulative error caused the Julian calendar to drift ~13 days behind the seasons by the 16th century, motivating the Gregorian reform in 1582.
In any 100-year period from a century year to the next (e.g., 1901–2000, 2001–2100), there are exactly 24 or 25 leap years. There are 24 leap years in a century that starts on a non-400-year (e.g., 1901–2000 has 24: the century year 1900 was not a leap year, and 2000 was counted in the next range). In a 400-year cycle, there are exactly 97 leap years — giving the 365.2425 days/year average.
No — 2100 is divisible by 100 but not by 400, making it a common year with 365 days. After 2000, the next century year that IS a leap year is 2400. Many current software systems may incorrectly treat 2100 as a leap year if they only check 'divisible by 4' — it is worth testing your code's behavior around February 28–29, 2100.

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Leap Year Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Standard Mathematical References

by Various

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.

Privacy choices

MyCalcBuddy uses necessary storage for the site to work. Optional analytics, notifications, and future advertising features stay off unless you allow them.