Days in Month Calculator

Return the number of days in a specific month and year, accounting for leap years.

Assumes the Gregorian calendar; historical calendars may differ.

Examples

  • February 2024 ⇒ 29 days
  • April 2025 ⇒ 30 days

FAQ

How are leap years handled?

JavaScript's Date object automatically adjusts for leap years.

What range of years is valid?

You can use any Gregorian calendar year.

Do I enter month numbers or names?

Enter month numbers 1 through 12.

Why use day 0 in the formula?

Setting day 0 returns the last day of the previous month.

Additional Information

No additional information available.