Days in Month Calculator
Every month has a fixed number of days — 31, 30, or 28/29 — determined by the Gregorian calendar rules. January, March, May, July, August, October, and December have 31 days; April, June, September, and November have 30 days; and February has 28 days in a common year or 29 days in a leap year.
A leap year occurs when the year is divisible by 4, except for century years (divisible by 100), which must also be divisible by 400 to qualify. This calculator instantly tells you how many days are in any given month and year, and displays a handy overview table of all 12 months for that year with February correctly adjusted for leap years.
How it works
Days in February = 29 if (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0, else 28. All other months follow fixed values: Jan/Mar/May/Jul/Aug/Oct/Dec = 31 days; Apr/Jun/Sep/Nov = 30 days.
Use cases
- Planning project deadlines and sprint durations for a specific month
- Calculating payroll, billing cycles, or subscription lengths accurately
- Verifying whether February has 28 or 29 days for a given year
- Building calendar applications or date-range features
- Settling date-related disputes or trivia questions quickly
Frequently asked questions
How many days does February have in a leap year?
February has 29 days in a leap year and 28 days in a common year. A leap year occurs when the year is divisible by 4, except century years, which must be divisible by 400. That is why 2000 was a leap year but 1900 was not.
Which months have 31 days and which have 30?
January, March, May, July, August, October, and December have 31 days, while April, June, September, and November have 30 days. February is the only exception, with 28 or 29 days depending on the year. A classic way to remember is the knuckle trick: months landing on a knuckle have 31 days.
How do I know if a year is a leap year?
Check three rules in order: if the year is divisible by 400, it is a leap year; if it is divisible by 100 but not 400, it is not; if it is divisible by 4, it is. For example, 2024 is a leap year because it is divisible by 4 and is not a century year.
Why do months have different numbers of days?
The lengths come from the Roman calendar as reformed by Julius Caesar and later adjusted into the Gregorian calendar we use today. A solar year lasts roughly 365.25 days, which does not divide evenly into 12 equal months. The mix of 31-, 30-, and 28/29-day months, plus the leap day, keeps the calendar aligned with the seasons.
How many days are in a full year?
A common year has 365 days and a leap year has 366, with the extra day added to February. This calculator shows all 12 months of any year you enter, so you can also verify totals for billing cycles, payroll, or project planning.