Instantly check if any year is a leap year. Find out: Is 2024 a leap year? Is 2025 a leap year? Uses official Gregorian calendar rules. Perfect for planning, coding, and date validation.
A leap year adds an extra day—February 29th—to our calendar, stretching the year to 366 days instead of the usual 365. Here's why this matters: Earth takes roughly 365.25 days to orbit the Sun, not exactly 365. That quarter-day difference adds up. Without leap years, our calendar would drift by nearly 24 days every century, eventually putting summer in December.
The math is elegant. Every four years, we collect those quarter-days (0.25 Ă— 4 = 1) and add a full day to February. This keeps our calendar aligned with Earth's actual orbit and ensures the seasons stay where they belong.
Quick verification makes a real difference when you're scheduling events years ahead, validating historical dates, or debugging date-handling code. Enter any 4-digit year, and you'll get an instant answer based on the precise rules defined in the Gregorian calendar standard.
Using this tool takes seconds:
Testing multiple years is fast—no page refresh needed. The tool works on any device: desktop, tablet, or phone.
The checker validates your input to ensure accurate results:
When something's wrong, you'll see a specific error message like "Please enter a valid 4-digit year" or "Year must be a positive number." This prevents calculation errors and guides you to correct input format.
The Gregorian calendar rules follow a three-tier system. Here's how it works:
Rule 1: Divisible by 4? It's a leap year.
Rule 2: But wait—divisible by 100? Not a leap year.
Rule 3: Hold on—divisible by 400? It IS a leap year after all.
In practice, this means:
year mod 400 = 0 → Leap Year (example: 2000)year mod 100 = 0 → Not a Leap Year (example: 1900)year mod 4 = 0 → Leap Year (example: 2024)Why the exception for century years? Without it, we'd overcorrect. Earth's orbit is 365.2422 days, not 365.25, so the simple "every 4 years" rule adds too much time. The 400-year adjustment fine-tunes the calendar, keeping it accurate within 26 seconds per year. That precision means we won't need to adjust the calendar for thousands of years.
The algorithm uses a decision tree that checks divisibility in a specific order. Here's what happens behind the scenes:
Step 1: Check divisibility by 400 first.
Step 2: Check divisibility by 100.
Step 3: Check divisibility by 4.
The order matters. If you checked divisibility by 100 before 400, you'd incorrectly exclude years like 2000. Starting with the 400-check catches those special century leap years early, which is both more accurate and computationally efficient.
Most programming languages use the modulo operator (%) for divisibility checks. When year % n = 0, the year divides evenly by n with no remainder. This simple operator makes leap year checking straightforward to implement in any language, as you'll see in the code examples below.
Results appear in plain language:
The year is repeated in the message so you always know which year you just checked—helpful when testing multiple years in a row. No ambiguity, no technical jargon. Just a clear yes or no answer that appears instantly.
Here's where leap year checking becomes essential in real-world scenarios:
When building calendar applications, date pickers, or scheduling systems, accurate leap year handling prevents data corruption. A common bug: hardcoding February to 28 days causes crashes when users try to select February 29th in a leap year. During testing, developers often check edge cases like 2000 (leap year despite being divisible by 100) and 1900 (not a leap year despite being divisible by 4).
Wedding planners and conference organizers booking venues years in advance need to verify if February 29th exists for their target year. Booking a venue for "February 29, 2025" would be an expensive mistake—2025 isn't a leap year. This tool prevents those errors before contracts are signed.
Financial systems use day-count conventions for interest calculations, bond pricing, and fiscal reporting. These calculations must account for 366-day years versus 365-day years. Getting it wrong affects accrued interest, loan amortization schedules, and regulatory compliance.
Genealogists and historians verifying birth records, historical events, or archival dates need to confirm if a claimed February 29th date is even possible. Before spending hours tracking down records from "February 29, 1900," you'd want to know that date never existed—1900 wasn't a leap year.
Teachers explaining divisibility rules, calendar systems, or the astronomy behind timekeeping can use this tool for live demonstrations. Students see immediately why 2000 is a leap year but 1900 isn't, making the exception rule concrete rather than abstract.
People born on February 29th only experience their actual birthday every four years. Calculating their age accurately—especially for legal purposes like voting eligibility or retirement benefits—requires knowing exactly which years included February 29th since their birth.
If you're working with dates and calendars, these complementary tools might help:
Getting our calendar to match Earth's orbit has taken over 2,000 years of refinement.
Julius Caesar, advised by the Egyptian astronomer Sosigenes, introduced the first systematic leap year system. Every fourth year would get an extra day, averaging 365.25 days per year. This was revolutionary—the previous Roman calendar had become so misaligned with the seasons that it routinely needed manual corrections.
The Julian system worked well enough for centuries. But there was a problem: Earth's orbit isn't exactly 365.25 days. It's 365.2422 days—about 11 minutes shorter. That small error adds up. Over 128 years, the calendar drifts a full day ahead of the solar year.
By the 16th century, the Julian calendar had drifted 10 days ahead. Easter, calculated based on the spring equinox, was occurring on the wrong dates. This bothered Pope Gregory XIII enough to commission a complete calendar reform.
The solution, devised by astronomers Aloysius Lilius and Christopher Clavius, was elegant:
The Gregorian reform was mathematically precise. Under the Julian system, there were 100 leap years every 400 years. The Gregorian system drops that to 97 (removing three century years divisible by 100 but not 400).
This creates an average year of 365.2425 days (365 + 97/400). Compare that to Earth's actual orbital period of 365.2422 days—a difference of only 26 seconds per year. At that rate, the calendar will only drift one day every 3,300 years.
Catholic countries adopted the new calendar immediately in 1582. Protestant and Orthodox countries refused, viewing it as papal overreach. Great Britain and its American colonies didn't switch until 1752, by which time they had to skip 11 days (September 2 was followed by September 14). People rioted in the streets, convinced the government had "stolen" 11 days of their lives.
Russia didn't adopt the Gregorian calendar until 1918, after the Bolshevik Revolution. This is why the "October Revolution" occurred in November by Gregorian reckoning. Greece waited until 1923, and Turkey became the last major country to switch in 1926.
Today, the Gregorian calendar is the international civil standard. The leap year rules are codified in ISO 8601, the international date and time standard. Every major programming language includes leap year logic in its date-handling libraries, ensuring consistent calculations worldwide.
If you're implementing leap year logic in your own application, here's how to do it correctly in several languages. Each example follows the same algorithm—check divisibility by 400 first, then 100, then 4—to ensure edge cases like 2000 are handled properly.
1def is_leap_year(year):
2 """
3 Check if a year is a leap year using the Gregorian calendar rules.
4 Returns True if leap year, False otherwise.
5 """
6 if year % 400 == 0:
7 return True
8 elif year % 100 == 0:
9 return False
10 elif year % 4 == 0:
11 return True
12 else:
13 return False
14
15# Example usage:
16year = 2024
17if is_leap_year(year):
18 print(f"Yes, {year} is a leap year")
19else:
20 print(f"No, {year} is not a leap year")
21
22# Test with multiple years
23test_years = [2000, 1900, 2024, 2023, 1600, 2100]
24for year in test_years:
25 result = "is" if is_leap_year(year) else "is not"
26 print(f"{year} {result} a leap year")
271function isLeapYear(year) {
2 /**
3 * Check if a year is a leap year using the Gregorian calendar rules.
4 * Returns true if leap year, false otherwise.
5 */
6 if (year % 400 === 0) {
7 return true;
8 } else if (year % 100 === 0) {
9 return false;
10 } else if (year % 4 === 0) {
11 return true;
12 } else {
13 return false;
14 }
15}
16
17// Alternative compact version
18function isLeapYearCompact(year) {
19 return (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0);
20}
21
22// Example usage:
23const year = 2024;
24if (isLeapYear(year)) {
25 console.log(`Yes, ${year} is a leap year`);
26} else {
27 console.log(`No, ${year} is not a leap year`);
28}
29
30// Test with multiple years
31const testYears = [2000, 1900, 2024, 2023, 1600, 2100];
32testYears.forEach(year => {
33 const result = isLeapYear(year) ? "is" : "is not";
34 console.log(`${year} ${result} a leap year`);
35});
361public class LeapYearChecker {
2 /**
3 * Check if a year is a leap year using the Gregorian calendar rules.
4 * @param year The year to check
5 * @return true if leap year, false otherwise
6 */
7 public static boolean isLeapYear(int year) {
8 if (year % 400 == 0) {
9 return true;
10 } else if (year % 100 == 0) {
11 return false;
12 } else if (year % 4 == 0) {
13 return true;
14 } else {
15 return false;
16 }
17 }
18
19 public static void main(String[] args) {
20 int year = 2024;
21 if (isLeapYear(year)) {
22 System.out.println("Yes, " + year + " is a leap year");
23 } else {
24 System.out.println("No, " + year + " is not a leap year");
25 }
26
27 // Test with multiple years
28 int[] testYears = {2000, 1900, 2024, 2023, 1600, 2100};
29 for (int testYear : testYears) {
30 String result = isLeapYear(testYear) ? "is" : "is not";
31 System.out.println(testYear + " " + result + " a leap year");
32 }
33 }
34}
351' Excel VBA Function for Leap Year Checking
2Function IsLeapYear(year As Integer) As Boolean
3 ' Check if a year is a leap year using the Gregorian calendar rules
4 ' Returns True if leap year, False otherwise
5
6 If year Mod 400 = 0 Then
7 IsLeapYear = True
8 ElseIf year Mod 100 = 0 Then
9 IsLeapYear = False
10 ElseIf year Mod 4 = 0 Then
11 IsLeapYear = True
12 Else
13 IsLeapYear = False
14 End If
15End Function
16
17' Usage in Excel cell:
18' =IF(IsLeapYear(A1), "Yes, " & A1 & " is a leap year", "No, " & A1 & " is not a leap year")
191#include <stdio.h>
2#include <stdbool.h>
3
4/**
5 * Check if a year is a leap year using the Gregorian calendar rules.
6 * Returns true if leap year, false otherwise.
7 */
8bool is_leap_year(int year) {
9 if (year % 400 == 0) {
10 return true;
11 } else if (year % 100 == 0) {
12 return false;
13 } else if (year % 4 == 0) {
14 return true;
15 } else {
16 return false;
17 }
18}
19
20int main() {
21 int year = 2024;
22
23 if (is_leap_year(year)) {
24 printf("Yes, %d is a leap year\n", year);
25 } else {
26 printf("No, %d is not a leap year\n", year);
27 }
28
29 // Test with multiple years
30 int test_years[] = {2000, 1900, 2024, 2023, 1600, 2100};
31 int num_years = sizeof(test_years) / sizeof(test_years[0]);
32
33 for (int i = 0; i < num_years; i++) {
34 const char *result = is_leap_year(test_years[i]) ? "is" : "is not";
35 printf("%d %s a leap year\n", test_years[i], result);
36 }
37
38 return 0;
39}
40The compact JavaScript version shows how you can express the entire rule as a single boolean expression: (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0). While concise, the if-else structure is often clearer for maintenance and debugging.
Let's walk through specific examples to see how the rules apply:
2024 (typical leap year)
2000 (the tricky century year)
1900 (the century year that wasn't)
2023 (regular non-leap year)
2100 (future century year)
1600 (historical century leap year)
In any 400-year period, there are exactly 97 leap years:
This pattern repeats forever, making calendar calculations predictable across centuries.
Q: Is 2024 a leap year?
Yes. 2024 is divisible by 4 and isn't a century year, so it qualifies as a leap year. February 2024 had 29 days.
Q: Is 2025 a leap year?
No. 2025 isn't divisible by 4 (2025 Ă· 4 = 506.25), so it's a regular 365-day year. February 2025 will have only 28 days.
Q: Will 2028 be a leap year?
Yes. 2028 follows the standard pattern—divisible by 4, not a century year—making it a leap year with 366 days.
Q: Why was 2000 a leap year but 1900 wasn't?
Century years follow a stricter rule. They must be divisible by 400 to qualify as leap years. Since 2000 Ă· 400 = 5 (whole number), it was a leap year. But 1900 Ă· 400 = 4.75 (not whole), so 1900 wasn't a leap year. This catches many people by surprise.
Q: What is the leap year rule?
Divisible by 4? Leap year. Divisible by 100? Not a leap year. Divisible by 400? Leap year anyway. The rules apply in that exact order to handle edge cases correctly.
Q: Why do we need leap years?
Earth orbits the Sun in 365.2422 days, not exactly 365. Without leap years, our calendar would drift 24 days every century. Summer would eventually occur in winter. Leap years keep the calendar synchronized with Earth's actual orbit and preserve the seasons.
Q: How often do leap years occur?
Generally every 4 years, but with exceptions. Over any 400-year period, there are exactly 97 leap years (not 100), thanks to the century-year rule.
Q: Will 2100 be a leap year?
No. As a century year, 2100 must be divisible by 400 to qualify, and it isn't (2100 Ă· 400 = 5.25). The next century leap year after 2000 will be 2400.
Q: What if you're born on February 29?
People born on leap day (February 29) only have their actual birthday every four years. In non-leap years, they typically celebrate on February 28 or March 1. Legally, most jurisdictions consider February 28 as their birthday for age-related purposes.
Q: How accurate is the Gregorian calendar?
Extremely accurate. It drifts by only 26 seconds per year—about one day every 3,300 years. Compare that to the Julian calendar, which drifted one day every 128 years.
Discover more tools that might be useful for your workflow