Leap Year Calculator
Check whether a Gregorian year is a leap year and whether it has 365 or 366 days.
Result for the values shown.
Calculations run in your browser.
What to enter
| Input | Meaning and units |
|---|---|
| Year | integer 1..9999 |
Understanding your result
Calendar results use the stated counting and anniversary convention. Complete months and years differ from fixed day counts.
Common mistakes
- Counting both end dates when the method excludes a boundary, or assuming all months have equal length.
Check your calculation
- Test a short known interval and a leap-day boundary; for working days, verify your holiday list.
Calculation checks, sources and review limits
Is this year a leap year, and how many days does it have?
Check whether a Gregorian year is a leap year and whether it has 365 or 366 days.
Common uses
- Check whether a Gregorian year is a leap year and whether it has 365 or 366 days.
How it works
leap=(year%4==0) and ((year%100!=0) or (year%400==0)) Calendar arithmetic uses the proleptic Gregorian calendar. Explicit calendar dates are independent of local daylight-saving changes. Month/year additions clamp to the last valid day of the destination month. Timestamp arithmetic requires a stated UTC offset and excludes leap seconds.
Worked example
Enter Year: 2000. The result is Leap: true; Days: 366.
FAQ
Is this year a leap year, and how many days does it have?
leap=(year%4==0) and ((year%100!=0) or (year%400==0)) Calendar arithmetic uses the proleptic Gregorian calendar. Explicit calendar dates are independent of local daylight-saving changes. Month/year additions clamp to the last valid day of the destination month. Timestamp arithmetic requires a stated UTC offset and excludes leap seconds.
What assumptions and limits apply?
Proleptic Gregorian rule; historical local calendar reforms excluded.