Last Day of Month Calculator
Enter a year and month to get the month's last date and weekday.
Result
How it is calculated
You enter a year (1 to 9999) and a month number (1 to 12), both whole numbers. The tool builds the first day of that month and moves to the last day of the same month using the Gregorian calendar. The length of each month comes from the fixed table of 31, 30 or 28 days, with February getting 29 when year mod 4 = 0 unless year mod 100 = 0 and year mod 400 ≠ 0. It returns the date as year-month-day, the number of days in the month, and the weekday of that last day in the page language. A month outside 1 to 12, a decimal such as 2.5 or a year of 0 gives no result. Years before the calendar's adoption are counted by the same Gregorian rule, which is a simple extension of it.
Worked example
Year 2024, month 2 (February). 2024 divides by 4 and not by 100, so it is a leap year and February has 29 days. The last day is therefore 29 February 2024. That date falls on a Thursday. Result: 2024-02-29, a month of 29 days, ending on a Thursday. For comparison, February 1900 divides by 100 but not by 400, so it ends on 1900-02-28 after 28 days.
Common mistakes
- Typing the month name or a number above 12. The month field takes 1 to 12, so 13 or 0 returns nothing.
- Assuming every year divisible by 100 is a leap year. 1900 and 2100 are not, while 2000 and 2400 are, because they also divide by 400.
- Treating the result as the last working day. The tool gives the last calendar day, which may be a Saturday or Sunday, so check the weekday before using it as a deadline.
- Entering a two-digit year such as 24. The tool reads it as the year 24, not 2024, and gives the weekday for that ancient year.
- Entering the date format of another locale and swapping year and month. The date result is always year-month-day, as in 2024-02-29.
About this calculator
This calculator returns the final calendar date of any month you enter — the 28th, 29th, 30th or 31st — along with the day of the week it falls on. Most months have a fixed length, but February's length depends on the Gregorian leap year rule: a year is a leap year if it is divisible by 4, except years divisible by 100 unless they are also divisible by 400 (so 2000 was a leap year, but 1900 was not).
Knowing the exact last day of a month, and which weekday it lands on, matters for billing cycles that run to end-of-month, payroll runs, rent due dates, accounting close dates, subscription renewals, and any deadline defined as “the last business day of the month,” where you also need to check whether that date falls on a weekend.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments