Gregorian Leap Year Cycle Calculator
Apply the Gregorian leap-year rule to a year, including century exceptions and the distance to the next leap year.
Description
Gregorian leap years follow a four-year rule with century exceptions and a 400-year reset.
Gregorian leap years follow a four-year rule with century exceptions and a 400-year reset. There are 97 leap years in each 400-year cycle.1
Apply the Gregorian leap-year rule to a year, including century exceptions and the distance to the next leap year.
When to use Gregorian Leap Year Cycle Calculator
Use this tool to apply the Gregorian leap-year rule to a year, including century exceptions and the distance to the next leap year.
Choose a supported reference focus or prepare the watch measurements, evidence and explicit limits requested. Confirm units and date conventions before running.
How to use Gregorian Leap Year Cycle Calculator and understand its results
- Choose a supported reference focus or prepare the watch measurements, evidence and explicit limits requested. Confirm units and date conventions before running.
- Enter year using the field table and calculation rules, then run the tool.
- Read centuryException, isLeapYear, leapYearPositionIn400YearCycle, yearsUntilNextLeapYear. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| year | Gregorian year | integer; minimum: 1; maximum: 9999 | Required |
Enter integer year 1–9999. Return leap status, century-exception flag, one-based leap position within the cycle or zero for nonleap years, and years to the next leap year, including zero when already leap.
leap=divisible by4 AND (not divisible by100 OR divisible by400) Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| centuryException | Non-400 century year | boolean |
| isLeapYear | Gregorian leap year | boolean |
| leapYearPositionIn400YearCycle | Leap-year position in 400-year cycle | integer; minimum: 0; maximum: 97 |
| yearsUntilNextLeapYear | Years until next leap year | integer; minimum: 0; maximum: 8 |
{
"input": {
"year": 2100
},
"output": {
"centuryException": true,
"isLeapYear": false,
"leapYearPositionIn400YearCycle": 0,
"yearsUntilNextLeapYear": 4
}
} Limitations and assumptions
Uses the proleptic Gregorian rule, without historical adoption or alternate-calendar handling.
Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.
Alternative or Complementary methods
Use Annual Calendar Month Transition Corrector: Map a Gregorian month-end through a conventional annual-calendar model that handles 30-day months and treats February as 30 days. For a complementary task, use IANA Zone Offset at Instant: Resolve an IANA time-zone identifier to its UTC offset and local date-time at an explicit UTC instant, including daylight-saving changes in the runtime time-zone database.
References
-
Gregorian Leap Year Cycle Calculator — tool.io
Similar or alternative tools
- Annual Calendar Month Transition Corrector
Map a Gregorian month-end through a conventional annual-calendar model that handles 30-day months and treats February as 30 days.
- IANA Zone Offset at Instant
Resolve an IANA time-zone identifier to its UTC offset and local date-time at an explicit UTC instant, including daylight-saving changes in the runtime time-zone database.