Skip to main content

Leap Year Calculator + Month Lengths

Check if a year is a leap year and get calendar facts like day of week, week number, day of year, and more. Supports ISO-8601 and US week numbering rules.

Loading calculator...

A developer hardcodes February as 28 days, deploys on January 30, and watches the app crash on March 1 of a leap year because the date picker skipped February 29 entirely. A payroll clerk counts “one month from January 31” and lands on March 3 instead of February 28. Both mistakes trace back to the same blind spot: months are not all the same length, and February changes size every four years — except when it does not. A leap year calculator that also shows month lengths and flags calendar edge cases saves you from the kind of off-by-one bug that only shows up once every 1,461 days.

Enter any year to check whether it is a leap year, see month-by-month day counts, and spot the edge cases that trip up date logic in spreadsheets and code.

The Three-Rule Test That Decides Leap Years

The Gregorian rule is a chain of three checks, applied in order:

  • Divisible by 4? If no, it is a common year (365 days). Example: 2023 is not divisible by 4 → common year.
  • Divisible by 100? If yes and not by 400, still a common year. Example: 1900 is divisible by 100 but not by 400 → common year (no February 29).
  • Divisible by 400? If yes, it is a leap year. Example: 2000 passes all three checks → leap year.

Most people remember only the first rule. The century exception (rule 2) and its override (rule 3) trip up quiz answers, spreadsheet formulas, and firmware that assumed 2100 would be a leap year. It will not be.

Month Lengths and the Traps They Set

Seven months have 31 days, four have 30, and February has 28 or 29. That irregularity creates two recurring problems:

  • “One month from January 31” cannot land on February 31 because the date does not exist. Most date libraries roll it forward to March 3 (or March 2 in a leap year), silently producing a span that is 31 days — not one calendar month. If a contract says “one month,” confirm whether it means “the same date next month” or “the last day of the next month.”
  • February 29 birthdays. People born on leap day do not have a birthday in common years. Some systems treat March 1 as the anniversary; others use February 28. The choice matters for age-gating, insurance renewals, and any rule that fires on an exact date.

The calculator lists every month’s day count for the entered year so you can eyeball these edge cases without looking them up.

Quick Checks That Catch Common Calendar Bugs

  • If your date validation rejects February 29 in a leap year, the leap-year check is missing or wrong.
  • If “add one month” from January 31 returns March 3, the library is adding 31 days, not one calendar month.
  • If a yearly loop counts 365 days every year, totals will drift by one day per leap year. Over a decade that is two or three days off.
  • If year-end reports assume December always follows a 365-day year, any leap-year row will be off by one in cumulative columns.

Related tools: Days Between Dates Calculator for spans that cross leap-year boundaries, Age Calculator for leap-day birthday breakdowns, How Long Since / Until for elapsed time with months and days, and Business Days Calculator for working-day counts that handle February correctly.

Calculations follow the Gregorian calendar. Pre-Gregorian dates (before October 1582 in most countries) used different leap-year rules and are not covered here.

Frequently Asked Questions

Why does 1900 not count as a leap year?

1900 is divisible by 4 (which would normally make it a leap year), but it's also divisible by 100 (1900 divisible by 4 and 100). Years divisible by 100 are NOT leap years, UNLESS they're also divisible by 400 (century year rule: divisible by 100 = not leap, unless divisible by 400). Since 1900 is not divisible by 400, it's not a leap year (1900 not divisible by 400 = not leap year). This rule corrects for the slight overcorrection that would occur if we simply added a leap day every 4 years (rule corrects overcorrection from simple 4-year rule). Understanding century year rules helps you see why 1900 is not a leap year.

Why is 2000 a leap year?

2000 is a leap year because while it's divisible by 100 (which would normally disqualify it), it's also divisible by 400 (2000 divisible by 100 and 400). The 400-year exception ensures that years like 2000 are leap years (400-year exception = century years divisible by 400 are leap years). This makes 2000 somewhat special - it's one of those rare years that was a leap year despite being a century year (2000 = special leap year, century year divisible by 400). Understanding 400-year exception helps you see why 2000 is a leap year.

Why can ISO week-year differ from the calendar year?

ISO-8601 defines week 1 as the week containing the first Thursday of the year (or equivalently, the week containing January 4th) (ISO week 1 = week containing first Thursday or January 4th). This means that days in late December might belong to week 1 of the following year, and days in early January might belong to week 52 or 53 of the previous year (late December = week 1 of next year, early January = week 52/53 of previous year). For example, December 31, 2024 is in ISO week 1 of 2025 (example: Dec 31, 2024 = ISO week 1 of 2025). Understanding ISO week year boundaries helps you see why week year may differ from calendar year.

What week rule should I use?

Use ISO-8601 for international business, European contexts, or technical/software applications (ISO-8601 = international standard, use for international/European/technical contexts). Use US conventions (Sunday or Monday start) for American business contexts, fiscal calendars, or when matching local conventions (US conventions = American standard, use for American/fiscal/local contexts). ISO-8601 is the most widely standardized system (ISO-8601 = most widely standardized). Understanding week rule selection helps you see which to use for different contexts.

Is this based on my locale settings?

No, this tool uses the week number rule you explicitly select, not your device's locale settings (tool uses explicit selection, not locale settings). The calculation uses Gregorian calendar rules and UTC-normalized dates for consistency regardless of your location or timezone (calculations use Gregorian calendar and UTC, consistent across locations). Understanding locale independence helps you see that results are consistent regardless of device settings.

How far back/forward can this calculator go?

This calculator works for any valid Gregorian calendar date (calculator works for any valid Gregorian date). The Gregorian calendar was introduced in 1582, so dates before then might have different historical interpretations (Gregorian calendar introduced 1582, dates before may have different interpretations). The tool uses proleptic Gregorian calendar rules, extending the same rules to dates before 1582 for consistency (proleptic Gregorian = extends rules to dates before 1582). Understanding date range helps you see how far back/forward you can calculate.

What happens to people born on February 29?

People born on February 29 (called 'leaplings') typically celebrate their birthday on February 28 or March 1 in non-leap years (leaplings = people born Feb 29, celebrate Feb 28 or Mar 1 in non-leap years). For legal purposes, different jurisdictions have different rules - some use February 28, others March 1 as the 'equivalent' birthday in non-leap years (legal rules vary by jurisdiction, some use Feb 28, others Mar 1). Understanding leaplings helps you see how February 29 birthdays are handled.

How does the day of week calculation work?

The day of week is calculated using a deterministic algorithm based on counting days from a known reference point (day of week = deterministic algorithm, counts days from reference). We use UTC-normalized dates to avoid timezone issues (UTC-normalized dates = avoids timezone issues). The result maps to: 0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday (day mapping: 0=Sunday, 1=Monday, ..., 6=Saturday). Understanding day of week calculation helps you see how dates map to days of week.

What is the day of year (Julian day number)?

The day of year is a count from 1 to 365 (or 366 in leap years) representing how many days have passed since January 1st of that year (day of year = count from 1 to 365/366, days since Jan 1). January 1 is day 1, December 31 is day 365 (or 366) (Jan 1 = day 1, Dec 31 = day 365/366). This is sometimes called the ordinal date but is different from the astronomical Julian Day number (ordinal date = day of year, different from astronomical Julian Day). Understanding day of year helps you see how ordinal dates are calculated.

Why doesn't the Julian calendar match?

This tool uses only the Gregorian calendar (the modern international standard) (tool uses Gregorian calendar only, modern international standard). The Julian calendar, used before 1582, had simpler leap year rules (every 4 years) which caused it to drift from the solar year (Julian calendar = simpler rules, every 4 years, caused drift). The Gregorian calendar's additional rules (100/400) correct this drift (Gregorian rules 100/400 = correct drift). Understanding calendar systems helps you see why Julian calendar doesn't match.

How accurate are the calendar calculations?

The calendar calculations are mathematically precise for the Gregorian calendar system (calculations = mathematically precise for Gregorian calendar). They use UTC-normalized dates to ensure consistency across timezones (UTC-normalized = consistent across timezones). However, for historical dates before 1582, the tool uses proleptic Gregorian rules which may not match historical calendars used at that time (historical dates before 1582 = proleptic Gregorian, may not match historical calendars). Understanding calculation accuracy helps you see how to interpret results.

What factors affect leap year & calendar calculation that this tool doesn't account for?

This tool does not account for many factors that affect real-world leap year & calendar calculation: historical calendar systems (Julian calendar, other calendars not included, tool doesn't account for historical calendars), timezone considerations (local vs UTC conversions not included, tool uses UTC only), DST transitions (daylight saving time changes not accounted for, tool doesn't account for DST), calendar reforms (historical calendar changes not included, tool doesn't account for calendar reforms), and many other factors. Real leap year & calendar calculation accounts for these factors using detailed calendar services, historical calendar analysis, comprehensive date calculations, and comprehensive analysis. Understanding these factors helps you see why professional services are necessary for comprehensive leap year & calendar calculation systems.

Explore More Time & Date Tools

Calculate ages, business days, countdowns, time zones, and more with our suite of time and date tools.

How helpful was this calculator?

Leap Year Calculator: Rules + Calendar Edge Cases