Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Leap Year Checker

Is it a leap year? With the rule, next and previous leap years.

Leap years in a range

Use via API

Check whether a year is a leap year under Gregorian rules (with the rule that applies and the previous/next leap years), or list the leap years in a range. Send JSON, get JSON back.

POST https://pithlab.com/api/v1/tools/leap-year-checker

curl https://pithlab.com/api/v1/tools/leap-year-checker \
  -H "Authorization: Bearer $PITHLAB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"year":2100}'

Fields and responseOpenAPI documentGet an API key

About the Leap Year Checker

Check whether any year is a leap year, see which Gregorian rule decides it, find the next and previous leap years, and list every leap year in a range.

How to use the Leap Year Checker

  1. Enter a year to see straight away whether it's a leap year and which rule applies.
  2. Read the number of days in the year and in February, and the previous and next leap years.
  3. To list leap years, enter a start and end year in the range section.

Examples

2024

Input

2024

Output

2024 is a leap year: divisible by 4 and not by 100. 366 days; February has 29 days.
1900, a century year

Input

1900

Output

1900 is not a leap year: divisible by 100 but not by 400, so it skips the leap day. 365 days; February has 28 days.
2000, divisible by 400

Input

2000

Output

2000 is a leap year: divisible by 400, so the century exception is cancelled. 366 days; February has 29 days.
Leap years from 2025 to 2050

Input

2025–2050

Output

6 leap years from 2025 to 2050: 2028, 2032, 2036, 2040, 2044, 2048

Frequently asked questions

What are the leap year rules?

In the Gregorian calendar a year is a leap year if it's divisible by 4, except century years (divisible by 100), which are leap years only if they're also divisible by 400. So 2024 and 2000 are leap years, but 1900 and 2100 are not.

Why do we have leap years?

A solar year is about 365.2422 days. Adding a day every 4 years gives 365.25, which is slightly too long, so three century leap days are dropped every 400 years. That averages 365.2425 days and keeps the seasons in step with the calendar.

What about years before 1582?

The Gregorian calendar was introduced in 1582 (later in many countries; Britain switched in 1752). For earlier years this tool applies the Gregorian rules backwards and also tells you what the Julian calendar, used at the time, would say.

How many leap years are there in 400 years?

Exactly 97: 100 years divisible by 4, minus the three century years that aren't divisible by 400.