A year is a leap year when it is divisible by 4, with the single exception that century years (ending in 00) must also be divisible by 400 to qualify, and a year that meets these rules has 366 days instead of 365, with February 29 inserted at the end of February. Under the Gregorian calendar used worldwide today, the rule is: divide the year by 4, then check whether the result is a whole number; if it is, the year is a candidate leap year. Any candidate that also ends in 00 must additionally be divisible by 400, which is why 1900 was not a leap year but 2000 was. Years that fail the rule are common years with 365 days. This three-part check is the standard algorithm used by nearly every digital calendar, programming language date library, and government timekeeping agency, and it is the same algorithm the Leap Year Calculator runs the moment you load the page.

The reason the rule looks slightly complicated is rooted in astronomy. One trip around the Sun takes about 365.2422 days, not a clean 365. To keep the calendar aligned with the seasons, an extra day is added most years that are divisible by 4, which gets us close to 365.25. The remaining error of about 0.0078 days per year is corrected by skipping three leap days every 400 years, and that is exactly what the century exception and the 400-year exception accomplish together. The math works out so cleanly that the Gregorian calendar drifts by only about one day every 3,236 years, according to the Gregorian calendar entry on Wikipedia, which traces the rule back to its introduction by Pope Gregory XIII in 1582.

how to calculate leap year
how to calculate leap year

The Three-Part Leap Year Rule

Before reaching for any tool, it helps to memorize the rule in its exact form, because every leap-year check on Earth reduces to these three lines evaluated in order:

  1. If the year is evenly divisible by 400, it is a leap year.
  2. Otherwise, if the year is evenly divisible by 100, it is not a leap year.
  3. Otherwise, if the year is evenly divisible by 4, it is a leap year.
  4. If none of those conditions is true, the year is a common year.

Notice that the 400-rule outranks the 100-rule, and the 100-rule outranks the 4-rule. That hierarchy is what makes 2000 a leap year (divisible by 400) while 1900 is not (divisible by 100 but not 400), and it is also why a typical year like 2024 qualifies (divisible by 4, not a century year). You can run this same logic mentally or on paper for any year, which is what makes manual leap-year checks possible in school math classes and programming tutorials alike.

How to Check a Year With the Leap Year Calculator

The fastest way to apply the rule without doing division in your head is to use the free online tool. Here is the exact workflow:

  1. Open the Leap Year Calculator in your browser. The field is pre-filled with the current year so you get an immediate answer to use as a sanity check.
  2. Type any year you want to test into the input field, replacing the default value.
  3. Read the result line, which tells you whether the year is a leap year, names the specific rule that decided it, and reports the number of days that year has (365 or 366).
  4. Look at the previous-leap-year and next-leap-year values just below the result to see the closest qualifying years on either side of your input.
  5. Scroll further to view the list of nearby leap years, which is useful when you are scheduling events, counting days, or filling in a calendar by hand.

Because the tool does the modulo arithmetic for you, you do not need to remember whether 2100 will be a leap year or not; you can simply type it in and read the answer. This is especially handy for century years and years far in the future where memorization fails.

Worked Example: Checking the Year 2024

To make the rule concrete, walk through 2024 by hand once and you will see why the calculator's answer is trustworthy:

  1. Divide 2024 by 4: 2024 / 4 = 506, with no remainder. The 4-rule passes.
  2. Check whether 2024 ends in 00. It ends in 24, so it is not a century year and the 100-rule does not apply.
  3. The 400-rule also does not need to be checked because the 100-rule has already been bypassed.
  4. Result: 2024 is a leap year with 366 days, and February has 29 days.

Now compare with 1900: 1900 / 4 = 475 exactly, so the 4-rule passes, but 1900 ends in 00, so the 100-rule fires and rejects the year. The 400-rule does not save it because 1900 / 400 = 4.75, not a whole number. Result: 1900 is a common year with 365 days even though it is divisible by 4. The Leap Year Calculator returns these same verdicts instantly.

Common Scenarios Where You Need a Leap Year Answer

Leap-year checks come up in more everyday situations than people expect. Knowing the rule and having a tool ready saves time in each of these:

Scenario Why the leap-year rule matters Quick reminder
Scheduling an annual event on February 29 The date only exists in leap years, so you must know which years qualify before booking venues or sending invitations. People born on Feb 29 legally observe their birthday on Feb 28 or Mar 1 in common years.
Counting days between two dates for payroll, contracts, or interest Including or excluding Feb 29 changes totals by one day, which can shift a deadline or a daily-rate charge. A year spanning a February in a leap year has 366 days.
Validating dates in spreadsheets or code Some systems reject Feb 29 in non-leap years, so a quick rule check prevents bad data entry. Most date libraries implement the same 400/100/4 rule.
Planning around century years (2000, 2100, 2200) Most century years are skipped, but 2000 was kept because it is divisible by 400. Out of every 400 years, exactly 97 are leap years.

For projects that need precise day counts spanning multiple months or years, our Date Difference Calculator pairs well with the leap-year tool: use the leap-year check to confirm whether an extra February day is in play, then plug the dates into the difference calculator for the exact total. For long date ranges or scheduling work that also depends on the day of the week, the day-of-year guide explains how the extra day shifts numbering in leap years.

Why the Rule Beats Mental Shortcuts

Many people remember only "every four years" and are caught off guard by century-year exceptions. A handy second short-cut is to look at the last two digits: if the year is divisible by 4, the 4-rule passes, but if those two digits are 00 you still need the 400-rule. Another reliable trick for recent and near-future years is to remember the four-century pattern: in any block of 400 years there are exactly 97 leap years, the century years 1300, 1400, 1500, 1700, 1800, 1900, 2100, 2200, and 2300 are skipped, and only 1200, 1600, 2000, and 2400 qualify among century years within that span. These patterns confirm what the calculator shows and help when you need to sanity-check a result without a computer.

Tips for Accurate Manual Checks

When you are doing the arithmetic by hand or in your head, two habits prevent mistakes. First, always check the 400-rule before the 100-rule, because it takes priority and a year like 2000 will be misclassified if you stop at "divisible by 100." Second, remember that the modulo operation is just the remainder after division, so a year is divisible by 4 only if its last two digits form a number divisible by 4; for 400, the year must end in a number divisible by 400, which in practice means the last two digits must be 00 and the hundreds digits must form a multiple of 4. If you are working through several years at once, typing them into the Leap Year Calculator is faster than running the checks by hand and eliminates the risk of skipping a step.

When You Might Need More Than a Yes-or-No Answer

Sometimes a leap-year verdict is only the first piece of a larger calculation. For example, if you are counting the number of business days between two dates, the leap-year status of any February in the range changes the total. Rather than attempt that arithmetic by hand, feed the two endpoints into the Business Days Calculator for a result that already accounts for weekends, holidays, and the 29th of February when relevant. Similarly, if you need to add or subtract time across a leap-year boundary, the Date Add Subtract Calculator handles the calendar math correctly without you having to decide whether February should be treated as 28 or 29 days.

Quick Reference: Leap Years Around Today

For anyone planning events or doing quick reference work, here is a compact summary of how the rule applies to the years people most often ask about. The exact figures are produced by the calculator; the table is just a qualitative guide to the pattern.

Year Divisible by 4? Century year? Divisible by 400? Leap year?
2024 Yes No Yes
2025 No No No
2100 Yes Yes No No
2000 Yes Yes Yes Yes

These four rows illustrate exactly why the rule exists: 2024 shows the common-case leap year, 2025 shows a typical non-leap year, 2100 is the trap that catches anyone who only remembers "every four years," and 2000 is the famous exception that rewards knowing the full 400/100/4 hierarchy. The pattern holds for every year from 1 AD onward under the proleptic Gregorian calendar, which is the convention most modern calculators, including the Leap Year Calculator, follow by default.

For a deeper history of why the rule was introduced and how it replaced the older Julian leap-year pattern, the Gregorian calendar article on Wikipedia is a good starting point. With the rule memorized and the calculator bookmarked, you can answer "is this year a leap year?" for any year in a couple of seconds, no division required.

Related reading: How to Calculate Logarithms in Any Base Instantly.

Related reading: How to Calculate a Fun Love Score From Two Names.