Skip to main content
Calcimator

Leap Year Calculator

Check if a year is a leap year, find the next and previous leap years, and see how many leap years are in the century.

A year qualifies as a leap year under the Gregorian rule this calculator applies (line 16) when it's divisible by 4 -- unless it's also divisible by 100, in which case it only still counts if it's divisible by 400 too. That third clause is what makes most people's mental shortcut wrong: 1900 is divisible by 4 and by 100 but not by 400, so it was not a leap year, while 2000 cleared all three tests and was. Days in Year follows directly from that single check -- 366 when it passes, 365 when it doesn't (line 18). Next Leap Year and Previous Leap Year are found by stepping one year at a time, forward or backward from the year you entered, until the rule passes again (lines 20-24); Previous Leap Year additionally stops at year zero rather than searching indefinitely into negative years. Leap Years in Century counts every qualifying year across the run of 100 years starting at your entered year's own century floor -- entering 2024 counts leap years across 2000-2099, not just "this century" in the ordinary sense of 2001-2100. A century that itself contains its own divisible-by-400 year, like 2000-2099, holds 25 leap years; an ordinary century that doesn't, like 1900-1999, holds only 24, because the century-boundary year loses its leap status under the divisible-by-100-but-not-400 exception. This calculator only implements the Gregorian rule -- it doesn't account for the Julian calendar or any pre-1582 calendar reform, so results for historical years before the Gregorian switch describe what the rule would say, not what calendar was actually in use at the time.

Inputs

Results

Is Leap Year?

Yes

Days in Year366
Next Leap Year2,028
Previous Leap Year2,020
Leap Years in Century25
How to Use This Calculator
  1. Enter the Year you want to check.
  2. Review whether it Is a Leap Year, the Days in Year (365 or 366), Next Leap Year, and Previous Leap Year.
  3. Check how many Leap Years fall in the same century for historical reference.

What each input means

Year
The year to check.

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    Year = 2024 = 1 input(s) provided
  2. Calculate Is Leap Year?
    Yes = Yes
  3. Calculate Days in Year
    Days in Year = 366
    366 = 366
  4. Calculate Next Leap Year
    Next Leap Year
    2028 = 2028

Engine last updated . Checked against 2 independently-derived tests how we verify calculators.

Frequently Asked Questions

Why was 1900 not a leap year but 2000 was, even though both are divisible by 100?

Because the rule has a second exception layered on the first: a year divisible by 100 is a leap year only if it's also divisible by 400 (line 16). 1900 divided by 400 leaves a remainder, so it lost its leap status despite being divisible by 4 and by 100. 2000 divides evenly by 400, so it kept its leap status and had 366 days.

How many leap years are typically in a century?

It depends on whether the century's own boundary year is divisible by 400. A century like 2000-2099, whose boundary year (2000) passes all three tests, holds 25 leap years. A century like 1900-1999, whose boundary year (1900) fails the divisible-by-400 test, holds only 24, since that one year is excluded despite being divisible by 4.

Does "Leap Years in Century" mean the same 100 years people usually call a century?

Not quite. It's the run of 100 years starting at the century floor of the year you typed in -- entering 2024 counts across 2000 through 2099 (line 27) -- rather than the 1-through-100 range some people use when talking about "the 21st century." The two conventions differ only at the edges, but the count itself is the same either way.

How does the calculator find the next or previous leap year?

It checks one year at a time, moving forward from the year you entered until a year passes the leap-year rule, or backward the same way for the previous one (lines 20-24) -- there's no shortcut formula, just a direct year-by-year search in both directions from your input.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Time & Date.