Days in Month Calculator
Enter a year to see the number of days in each month, the total days in the year, and whether it is a leap year.
Days and Months Calculator
Days in Month Formula
Where:
- \(y\) — the entered year.
- \(m\) — the month number, from 1 for January to 12 for December.
- \(L(y)\) — 1 if the year is a leap year; otherwise, 0.
- \(D(m,y)\) — the number of days in a month; \(T(y)\) — the total days in the year.
The calculator uses Gregorian leap-year rules to determine February’s length. Adding the days in all 12 months gives 365 days in a common year or 366 in a leap year.
Days in Month – Calculation Example
Example: enter 2026 to find February’s length and the total days in that year.
\[2026\bmod 4=2\quad\Rightarrow\quad L(2026)=0\]
\[D(2,2026)=28,\qquad T(2026)=7(31)+4(30)+28=365\]
Result: February 2026 has 28 days, the full year has 365 days, and “Is a Leap Year?” shows “No.”
How to use the calculator
- Find the Enter the year field. It is initially filled with the current year; replace it if you want to check another year.
- Enter a whole-number year, such as 2026 or 2028. There is no month selector: one entry produces results for the entire year.
- Read the result beside the month you need, from January through December. For example, use the February result to check whether it has 28 or 29 days.
- Check Total days in the year for the annual total and Is a Leap Year? for a Yes or No answer.
How many days are in a month?
In the Gregorian calendar, seven months have 31 days: January, March, May, July, August, October, and December. Four months have 30 days: April, June, September, and November. February is the only month whose length changes with the year. It has 28 days in a common year and 29 days in a leap year.
A leap year adds one day to February, bringing the annual total from 365 to 366. The extra day is February 29. This matters when checking whether a date exists, counting the available days in a month, or planning work that crosses the end of February. The calculator lists every month separately so you can find the month you need without calculating the annual total yourself.
The leap-year rule has an important exception: a year divisible by 4 is usually a leap year, but a year divisible by 100 is not unless it is also divisible by 400. For example, 1900 was not a leap year, while 2000 was. The calculator applies this rule to both the February result and its Yes or No leap-year result.
The annual total is a count of calendar days in the entered year, not the number of days between two particular dates. To measure an interval with specific start and end dates, use the Days Between Dates calculator. If you need to move a date forward or backward by a number of days, use the Date Addition calculator.
Assumptions and practical tips
The results follow the Gregorian calendar’s month lengths and leap-year rules. For older historical dates, the calendar actually used in a particular place may have been different. A Gregorian result for an early year therefore should not automatically be treated as a description of a local historical calendar.
Enter a complete, whole-number year rather than a month, a date, or a decimal value. For reliable results, use a year from 100 through 9999. The calculator’s underlying date function treats years 0 through 99 as years in the 1900s when finding month lengths, which can make the displayed month lengths disagree with the leap-year answer for those entries.
When planning around month-end, remember that a month’s length does not identify the weekday of its last day. The Monthly Calendar Generator can show how the dates fall across a month. For a particular date’s weekday, use the Day of the Week calculator.
Frequently Asked Questions
How can I remember which months have 30 or 31 days?
Use your knuckles. Starting with January on the first knuckle, count alternating knuckles and gaps; each knuckle is a 31-day month, and each gap is a shorter month. After July, start again on the first knuckle for August. February is the exception among the shorter months, with 28 or 29 days.
How many weeks are in a month?
Every month has at least four complete weeks. A 28-day February has exactly four weeks; a 29-day February has four weeks and one day. A 30-day month has four weeks and two days, while a 31-day month has four weeks and three days. The number of calendar rows a month occupies can differ.
What is the average number of days in a month?
A simple average is 365 divided by 12, or about 30.42 days in a common year. In a leap year, 366 divided by 12 gives 30.5 days. These averages are useful for rough estimates, but use the actual month lengths when a deadline, payment period, or date depends on an exact day count.
Does a month always contain its number of days times 24 hours?
Not necessarily in local time. Daylight saving time can make a day when clocks change 23 or 25 hours long, so the elapsed time between two local dates may differ from the number of calendar days times 24 hours. If you need an exact duration in hours, account for the time zone and clock changes.
Is one calendar month the same as 30 days?
No. Adding one calendar month usually means moving to the corresponding date in the next month, whereas adding 30 days counts a fixed number of days. For example, one month after January 15 is February 15, but 30 days after January 15 is February 14 in a common year. Month-end dates may need a separate rule.
What happens to a February 29 birthday in a non-leap year?
February 29 does not occur in a common year. People may celebrate on February 28 or March 1, but the date used for a legal age threshold or official deadline can depend on local law and the specific rule involved. Check the applicable requirements rather than assuming either date is universal.
Why does the same date fall on a different weekday in another month?
Weekdays repeat every seven days, while most months are not an exact number of weeks long. Moving from the first of a 30-day month to the first of the next shifts the weekday forward by two days; a 31-day month shifts it by three. A 28-day February causes no shift, while a 29-day February shifts it by one.
7 thoughts on “Days in Month Calculator”