How many days are in each month?
A complete guide to 28-, 29-, 30- and 31-day months.
Month lengths
January, March, May, July, August, October and December have 31 days. April, June, September and November have 30. February has 28 or 29.
The pattern is part of the Gregorian civil calendar and should be handled with date functions rather than a fixed 30-day estimate.
February changes
February gains a twenty-ninth day in Gregorian leap years. Years divisible by 100 are not leap years unless also divisible by 400.
Remembering the pattern
The knuckle mnemonic or the phrase about September, April, June and November can help. Software should still rely on calendar-aware libraries.
Related month guides
- Why is February the shortest month? — How Roman calendar history shaped February's unusual length.
- How many weeks are in a month? — Why calendar months do not equal exactly four weeks.
- How to add or subtract calendar months — Handle month-end dates without overflowing into the wrong month.