How to calculate number of days in a month or a year in Excel?
As we all know, there are leap years and common years where leap year has 366 days and common year has 365 days. To calculate the number of days in a month or a year based on a date as below screenshot shown, this article will help you.
If you have a list of date in a column, to calculate the days in a month, please apply the following formulas:
Enter any of the below formulas into a blank cell beside your date, and then drag the fill handle down to the cells that you want to calculate the days in the specific month, see screenshot:
Note: In the above formulas, A2 is the date cell that you want to get the number of days in a month based on.
To get the number of days in a year, please do as this:
Enter the following formula into a blank cell beside your date cell, then drag the fill handle down to the cells that you want to calculate the days in the specific year, see screenshot:
Note: If you just have year numbers in the column, the below formula can help you to calculate the days in the given years as following screenshot shown:
If you have Kutools for Excel, with its Calculate days in year / Calculate days in month features, you can get the the number of days in a specific month or year without remembering any formulas.
After installing Kutools for Excel, please do as follows:
1. Click to select a cell where you want to output the result, see screenshot:
2. And then click Kutools > Formula Helper > Formula Helper, see screenshot:
3. In the Formulas Helper dialog box, please do the following operations:
- Select Math from the Formula Type drop down list;
- In the Choose a formula list box, click to select Calculate days in year or Calculate days in month option as you need;
- Then, in the Arguments input section, select the cell containing the date that you want to get the days of month or year from the date .
Tips: In the Date textbox, you should change the default absolute cell reference to relative cell reference for dragging the formula correctly.
4. And then, click Ok button, the first result will be calculated, then select the first formula cell, and drag the fill handle down to the cells for applying this formula, and you will get the number of days in a year as below screenshot shown:
Selecting the Calculate days in month option to get the number of days in specific months, see screenshot:
More relative articles:
- Count The Number Of Days, Weeks, Months Or Years Between Two Dates
- Have you ever considered calculating how many days, weeks, months or years between two given dates in Excel? This tutorial can help you to finish the following operations as soon as possible.
- 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.
- Calculate The Difference Between Two Dates In Days, Weeks, Months And Years
- When dealing with the dates in a worksheet, you may need to calculate the difference between two given dates for getting the number of days, weeks, months or years. This article, I will talk about how to solve this task in Excel.
Best Office Productivity Tools
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!