Staaarter

Check If a Year Is a Leap Year

Checks whether a single year is a leap year under the Gregorian calendar and explains exactly which part of the rule (divisible by 4, 100, or 400) determined the answer. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-08-05
By Staaarter Team
calendarleap-year

Overview

Introduction

The leap year rule has a well-known exception (century years) and a lesser-known exception to that exception (years divisible by 400), which makes a quick manual check unreliable.

This tool checks a single year and states plainly which part of the rule made the difference.

What Is Check If a Year Is a Leap Year?

A single-year leap year checker that applies the full Gregorian rule and returns a sentence explaining the result, not just a bare yes or no.

It's built on the same divisibility test used by Leap Year Finder, just applied to one year and phrased as an explanation.

How Check If a Year Is a Leap Year Works

The year is tested for divisibility by 400 first; if it passes, it's a leap year for that reason alone.

If not, it's tested for divisibility by 100 (a non-leap century year if so), then for divisibility by 4 (a leap year if so), and otherwise it's reported as not a leap year because it fails the divisible-by-4 test.

When To Use Check If a Year Is a Leap Year

Use it whenever you need a quick, explainable answer for a single year, like verifying a specific birth year or historical date.

It also works well as a teaching tool since the explanation walks through the exact rule that applied.

Features

Advantages

  • States the specific rule applied, not just a yes or no.
  • Correctly handles the century exception and the every-400-years exception to that exception.
  • Instant result for any whole-number year.

Limitations

  • Only checks one year per run, use Leap Year Finder for a range.
  • Applies the modern Gregorian rule uniformly, it doesn't model historical calendar transitions for very old years.

Examples

A century year divisible by 400

Input

2000

Output

2000 is a leap year: it's divisible by 400.

A century year not divisible by 400

Input

1900

Output

1900 is not a leap year: it's divisible by 100 but not by 400.

A regular leap year

Input

2024

Output

2024 is a leap year: it's divisible by 4 and not by 100.

Best Practices & Notes

Best Practices

  • When testing century years, always confirm using this tool rather than the simplified "divisible by 4" rule, since century years are exactly where that shortcut fails.
  • Use the explanation text directly in documentation or test comments to justify why a given year was treated as a leap year.

Developer Notes

The logic branches in order of specificity: divisible by 400 (leap), else divisible by 100 (common), else divisible by 4 (leap), else common, which mirrors the standard `(year % 4 === 0 && year % 100 !== 0) || year % 400 === 0` boolean check but produces a distinct message for each branch instead of collapsing to a single boolean.

Check If a Year Is a Leap Year Use Cases

  • Verifying whether a specific birth year, contract year, or historical year was a leap year
  • Explaining the leap year rule with a concrete worked example
  • Sanity-checking leap year logic in your own date-handling code

Common Mistakes

  • Assuming any year divisible by 4 is automatically a leap year, missing the century exception.
  • Entering a non-integer or decimal year, which the tool rejects since calendar years are whole numbers.

Tips

  • Use Common Year Checker to get the same explanation framed around why a year is not a leap year.
  • For a whole range of years at once, switch to Leap Year Finder.

References

Frequently Asked Questions