How to calculate the number of days in Excel

Why does taking days count make users headaches? If only calculating a short period of time is quite simple but a 7-day, a month with an irregular number of days and irregular leap years is indeed a problem.

How many days from January 9, 2015 to June 12, 2017? If you can find results within 5 seconds, you are truly a genius. However, this is no longer a problem when you know how to use Excel.

Calculate the number of days and months between any time

On the Excel spreadsheet, set any 2 days you want to calculate on 2 separate cells.

Here are a few sample equations. Check the box where you want to display the answer and enter one of the following commands (remember to replace the cell addresses that match your Excel table):

Calculate the number of days: = DATEDIF (D2, E2, 'd')

Calculate the number of weeks: = DATEDIF (D2, E2, 'd') / 7

Calculate the number of months: = DATEDIF (D2, E2, 'm')

Calculate the number of years: = DATEDIF (D2, E2, 'y')

Enter the command you need to enter into the answer box. For example, if we want to calculate the date, we enter the command = DATEDIF (D2, E2, 'd')

How to calculate the number of days in Excel Picture 1

Calculate the cumulative time between any 2 days

We already know how to calculate the total number of days, months and years but what if we want to calculate the total cumulative time in the form of "day, month, year"?

We need to combine the equations above. Put the calculation function below in the box to enter the answer and press Enter:

= DATEDIF (D2, E2, 'y') & 'years,'
& DATEDIF (D2, E2, 'ym') & 'months,'
& DATEDIF (D2, E2, 'md') & 'days'

How to calculate the number of days in Excel Picture 2

Note: Press Alt + Enter to add a new line and Ctrl + Shift + U to expand the cell and see the whole calculation function.

  1. How to combine 2 columns Full name in Excel does not lose content
  2. How to arrange incremental dates in Excel
  3. How to delete data, duplicate content in Excel

Have you ever used Excel to calculate dates? Do you know any other calculation method? Please share with us by commenting below!

4.5 ★ | 2 Vote

May be interested

  • Extract images from PDF filesPhoto of Extract images from PDF files
    extracting images from pdf files for use for different purposes is the need of many people. in this article will have all the way to get photos from pdf files quickly, easily, please consult.
  • How to convert Excel files to PDF online using Google DrivePhoto of How to convert Excel files to PDF online using Google Drive
    if you often use microsoft office excel to share with colleagues, friends, there will probably be cases where you want to send excel files in pdf format.
  • Beautiful free PowerPoint slides for teachersPhoto of Beautiful free PowerPoint slides for teachers
    whether you are teaching a class, teaching lectures, running an instructional program or training students, the following powerpoint slides are perfect choices. some templates provide you with tables, charts and diagrams, while others provide you with simple educational theme themes that match your presentation.
  • 7 pages of PowerPoint slide templates help your presentations 'sublimate'Photo of 7 pages of PowerPoint slide templates help your presentations 'sublimate'
    a good presentation should be invested in time and effort. you need to create attractive slide pages as content to attract audiences, not to make them boring. and a nice slide template will make your presentation sublimated.
  • Set AutoSave feature in Office 2016Photo of Set AutoSave feature in Office 2016
    surely you will be very frustrated when you are manipulating word or excel, the power is out and all effort is gone because you have not saved anything yet. now you don't need to worry anymore when microsoft office 2016 has autosave mode. this feature was updated last july for office 365 users.
  • How to align spreadsheets before printing on Google SheetsPhoto of How to align spreadsheets before printing on Google Sheets
    before printing spreadsheet data on google sheets, users should adjust the data sheet before printing to get a better layout.