Utility July 13, 2026 · 8 Min Read

Days in Month Calculator – Guide & Formulas

Find the exact number of days in any month of any year, fully accounting for leap years and century rules.

While we all know the general length of months, February varies and leap year rules can be tricky. This calculator quickly tells you how many days are in any specified month of any year, detailing whether that year is a leap year.

Key Takeaway

Use the free Days in Month Calculator to find the exact number of days in any month of any year, fully accounting for leap years and century rules. Get instant results with step-by-step explanations.

How to Use the Days in Month Calculator

  1. Select a month and enter any calendar year.
  2. Review the total number of days, weeks, and weekend days in that specific month.

The Formula

Days in Month = Date(year, month + 1, 0).getDate() (returns last day of current month)

Variable Definitions

  • Month: The calendar month of interest (January to December)
  • Year: Any calendar year (including past and future years)

Checking February Length in 2028

A scheduler wants to confirm the exact days of February in the year 2028.

  1. Step 1: Set Month = February, Year = 2028.
  2. Step 2: Check leap year rules: 2028 is divisible by 4, so it is a leap year.
  3. Step 3: February 2028 has 29 days instead of the normal 28.

Frequently Asked Questions

What is the leap year rule for century years?

A century year (ending in 00) is only a leap year if it is divisible by 400. For example, 2000 was a leap year, but 1900 and 2100 are not.