Skip to main content

How to calculate number of days in a month or a year in Excel?

Author: Xiaoyang Last Modified: 2025-04-03

Understanding the number of days in a given month or year is essential for precise time management and planning in Excel. Whether dealing with leap years (366 days) or common years (365 days), Excel can simplify these calculations through straightforward formulas and advanced tools like Kutools for Excel.

calculate number of days in a month or a year


Calculate number of days in a month or year with formulas

Suppose you have a list of dates in the range A2:A9, to find out the number of days in each month or year, use the following formulas.

Calculate the number of days in a month

Enter either of the following formulas in a cell such as C2 and press "Enter". Then drag the "Fill Handle" of this formula cell down to get the rest of the results.

=DAY(EOMONTH(A2, 0))

Calculate number of days in a given month with formulas

Calculate the number of days in a year

To calculate the days in a year, considering leap years, input this formula:

=DATE(YEAR(A2), 12, 31) - DATE(YEAR(A2), 1, 1) + 1

Calculate number of days by date with formula

Alternatively, for a column of only year numbers, use this formula: =365 + IF(MOD(A2, 4) = 0, 1, 0)


Simplified day calcution with Kutools for Excel

For those who prefer not to remember or input formulas, "Kutools for Excel" provides a user-friendly feature that automates these calculations:

  1. After installing Kutools for Excel, select the cell where you want the result to appear. And then select "Kutools" > "Formula Helper" > "Formula Helper".
  2. Configure the "Formula Helper" dialog box as follows:
    1. Choose "Math" from the "Formula Type" drop-down list.
    2. Select "Calculate days in year" or "Calculate days in month", depending on your need.
    3. In the "Arguments" section, choose the cell with the date for which you need the day count.
    4. Click "OK".
      specify options in the dialog box
  3. Then drag the fill handle down to apply the formula to other cells.

Result

get the number of days in specific months

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now

Whether you're scheduling projects, analyzing financial periods, or planning events, the methodology in this article provides an understanding of how to calculate the number of days in a month or year, thus ensuring accuracy and efficiency in date-related calculations.


More relative articles:

  • Count The Number Of Days, Workdays, Weekends Between Two Dates
  • Have you ever needed to count the number of days between two dates in Excel? May be, sometimes, you just only want to calculate the workdays between two dates, and sometime, you need to count the weekend days only between the two dates. How could you count the number of days between two dates in a certain condition?
  • Calculate Days Left In Month Or Year In Excel
  • For certain case, you may want to know the number of remaining days in a month or a year. Supposing, the date of today is 2014/10/12, and you want to calculate the days left in this month (October) or this year (2014), that is to say, there is remaining 19 days of this month and 80 days of this year. Please know more details from the below article.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!