Days in Month

Enter a year and a month from 1 to 12.

Use this tool

Result

The result appears in this panel after you run the tool.

About this tool

February uses the leap-year rule for that year.

Month 1 is January.

How to use it

  1. Open this page and provide the input it asks for.
  2. Set the options that are visible, then use Count days.
  3. Read the result in the panel. Copy it or download it when a file is offered. The input stays in this browser.

Limitations

28, 29, 30, or 31, from the UTC calendar

Which inputs are allowed

The year is accepted only as an integer, and the month only as an integer from 1 through 12. Month 0, month 13, and a decimal month are errors. The length is the UTC calendar’s length for that month: the date number of the last day, found by asking for the day before the first of the next month. January, March, May, July, August, October, and December return 31. April, June, September, and November return 30. February returns 29 when the year passes the Gregorian leap test and 28 otherwise. 2024 returns 29. 1900 returns 28. 2000 returns 29.

The page does not list the weekday of the 1st, and it does not draw a grid. It returns one sentence with the day count. That count is what the date calculator uses when a day number would fall past the end of a destination month, and it is what an age borrow uses when the previous month is February. Here you can read the length directly without running those other operations.

Leap day is a property of February in that year

Asking for February is the only way the leap rule appears on this page. July never becomes 32, and April never becomes 31, regardless of the year. If you only have a year and you want the yes or no, the leap-year page answers without a month. When the question is where a complete ISO day sits inside its year, the day-of-year page applies these lengths: a 29-day February is why 1 March can be day 61.

A calendar drawing for the same year and month will contain this many numbered cells, plus blank cells to fill the Monday-start weeks. This page does not emit those blanks. It is the right page when a form asks “how many days” and you do not want a picture. Pair it with a real date check when you are about to type day 31. A 31 in a 30-day month is rejected by the date parser. Knowing the length first avoids that error. The year and the month are both required. A month without a year cannot answer February.

Privacy

Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.