Note: The other languages of the website are Google-translated. Back to English

Excel Formula: Count Days of Month

doc convert date to julia 1

In this tutorial, it provides formulas to count the total days of a specific month or the current month.

If you want to follow along with this tutorial, please download the example spreadsheet.
doc convert date to julia 1

Generic formula:


Syntaxt and Arguments

Date: the date that you want to count days of month. The date argument can be a number or date (since the date is stored as number in Excel).

Return Value

The formula returns to a numeric value.


If the date argument is a text value, the formula returns the #VALUE! error.

How this formula works

To count the total days of the specific month in each cell of B3:B6, please use below formula in cell C3:


Press Enter key and then drag autofill handle down to cell C6.
doc convert date to julia 1
doc convert date to julia 1


EMONTH function: gets the last day of the month in future or past. EOMONTH(B3,0) gets the last day of month in cell B3, 2/29/2020.

DAY function: gets the days as number from a date.



1) If you want to automatic return the total days of the current month when the date changes, you can change the generic formula to this:


TODAY function is used to get the current date of today.

2) If you want to get the days from a month name, you can change the generic formula to this:


Example: supposing to get the days from the month name in cell B9, please use the formula as this:


Press Enter key to get the result.
doc convert date to julia 1

YEAR function: returns the year based on the given date.

DATEVALUE function: converts a date stored as text format to a valid date.


Relative Formulas

Relative Functions

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations