Quick answer
A year is a leap year if it is divisible by 4 and not by 100, or if it is divisible by 400. 2024 is a leap year with 366 days; the next leap year is 2028.
Enter a year. The calculator says whether it is a leap year, the next leap year and the number of days.
Related tools: Day of the Year Calculator: Which day of the year a date falls on. Day of the Week Calculator: Find the weekday of any date. Week Number Calculator: ISO 8601 week number of a date.
How to use the Leap Year Calculator
- Enter year (a whole number, between 1 and 9999).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Year | A whole number | ≥ 1, ≤ 9999 |
Formula and method
Formula
leap if (year ÷ 4 and not ÷ 100) or year ÷ 400
Exact.
Gregorian leap-year rule.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Year = 2024.
| Result | Value |
|---|---|
| Result | Leap year |
| Next leap year | 2028 |
| Days in year | 366 |
Example 2
Inputs: Year = 1900.
| Result | Value |
|---|---|
| Result | Not a leap year |
| Next leap year | 1904 |
| Days in year | 365 |
The first line is the headline result (result). Below it the leap Year Calculator lists next leap year and days in year, which describe the same case from other angles. Exact.
The Gregorian rule
Years divisible by 4 are leap years, except century years, which must also be divisible by 400. So 1900 and 2100 are not leap years, but 2000 and 2400 are. The rule keeps the calendar aligned with the solar year (365.2425 days average).
Consequences
Leap years add 29 February. People born that day are called leaplings. A leap year also shifts the weekday of dates after February by one extra day.
How the result changes with year
Holding every other input at the first worked example, this table changes only year. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Year | Result | Next leap year | Days in year |
|---|---|---|---|
| 1012 | Leap year | 1016 | 366 |
| 2024 | Leap year | 2028 | 366 |
| 4048 | Leap year | 4052 | 366 |
| 8096 | Leap year | 8104 | 366 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Year: entering "0" shows "Year must be at least 1." beside that field and no result.
Choosing between the Leap Year Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Day of the Year Calculator](/date-calendar/day-of-the-year-calculator/) | date | Day of the week |
| [Day of the Week Calculator](/date-calendar/day-of-the-week-calculator/) | date | Day of the week |
| [Week Number Calculator](/date-calendar/week-number-calculator/) | date | ISO week number |
| [Birth Year Calculator](/date-calendar/birth-year/) | age | Birth year |
| [Graduation Year Calculator](/date-calendar/graduation-year/) | start year and program length | Graduation year |
Background: dates and times
Date and time results depend on the conventions a tool uses: whether the end date counts, whether weekends and holidays are skipped, how months of different lengths are handled and whether time zones are applied. This page states its convention, and the worked examples show it.
Dates use the Gregorian calendar and calendar days unless the page says otherwise; check deadlines against the rule in your contract or regulation.
Assumptions and limitations
- Century years are leap only if divisible by 400
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for year to confirm this.
Frequently asked questions
Is 2100 a leap year?
No, it is divisible by 100 but not by 400.
How many leap years in a century?
Usually 24 or 25: 24 in centuries not divisible by 400, 25 otherwise.
Why do we need leap years?
The Earth takes about 365.2422 days to orbit the Sun.
What does the Leap Year Calculator calculate?
Check whether a year is a leap year. It returns Result, Next leap year and Days in year.
What formula does the Leap Year Calculator use?
leap if (year ÷ 4 and not ÷ 100) or year ÷ 400. Gregorian leap-year rule.
What do I need to enter in the leap Year Calculator?
You enter Year.
How is the result rounded or limited?
Exact. Century years are leap only if divisible by 400.
What is an example of a leap Year result?
With year 2024, the result is Leap year.
Where does the method come from?
The method follows: Gregorian calendar reform, Inter gravissimas (1582).
Related calculators
- Day of the Year Calculator — Which day of the year a date falls on.
- Day of the Week Calculator — Find the weekday of any date.
- Week Number Calculator — ISO 8601 week number of a date.
- Birth Year Calculator — Year of birth from a person's age.
- Graduation Year Calculator — Expected graduation year from the start year and program length.
- New Year's Countdown — Countdown to New Year's Day: the days remaining until 1 January from any date.
Sources
- Gregorian calendar reform, Inter gravissimas (1582)
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.