Days in a Month Calculator
Enter year, month number to find month length. Month length = daysInMonth(Year,Month number).
Month lengths in 2026
2026 is not a leap year, so February has 28 days. The highlighted bar is your selected month. Bars start at zero days.
About this calculation
Month length is a calendar fact determined by the chosen month and whether its year is a leap year. Use this days in a month calculator to find month length from year, month number.
Formula
Month length = daysInMonth(Year,Month number)
Worked example
With Year: 2026, Month number: 10, month length is 31 days.
How to calculate month length
The rule is Month length = daysInMonth(Year,Month number).
Reading month length
Most months have 30 or 31 days. February has 28 in an ordinary year and 29 in a leap year. With year 2026, month number 10, the calculator returns month length 31 days.
Practical use
Use the result to check monthly schedules, billing periods, or date arithmetic. Check the exact month length before planning deadlines, schedules, or daily allocations.
Limits and common mistakes
A leap year is usually divisible by four, except century years must also be divisible by 400. Do not assume every February has the same length. Verify year before interpreting month length.
Read the example and units
For year 2026 and month number 10, the Gregorian calendar gives month length 31 days. The year matters in February because it determines leap status. The output is the count of dates in that particular month, including its last date; it does not depend on a work schedule. Month length is fixed by the month number and Gregorian year. February depends on leap-year status; the result does not count working days or hours.
Compare one changed input
For a second scenario, change only month number 10 to month number 11 and leave the other example entries alone. The result for month length changes from 31 days to 30 days. The alternate month has its own fixed length in the selected year. Check February separately when testing a leap year; moving between other months can change the answer without changing the year.
How to interpret this kind of result
Month length is determined by the selected month and year. January, March, May, July, August, October, and December have 31 days; April, June, September, and November have 30. February has 28 days in a common year and 29 in a leap year. The year field matters to February in particular. For days in a month, the entered year and month number produce month length 31 days. Keep month length and its unit attached to this input scenario.
Scope and practical checks
A leap year is generally divisible by four, except a century year must also be divisible by 400. This calendar rule is about the Gregorian calendar used by the tool. It does not say how many workdays, school days, or scheduled shifts fall within the month; those require separate rules and dates.
Common questions
What does this days in a month result include?
The month length comes from year and month number using the displayed rule Month length = daysInMonth(Year,Month number). Check the stated rule for calendar boundaries, weekends, time zones, or elapsed time before applying a deadline.
Inputs
- Year
- Month number