Log in  \/ 
x
or
x
x
Register  \/ 
x

or

Kutools for Excel 22.00 HOT

300+ Powerful Features You Must Have in Excel

Kutools-for-Excel

Kutools for Excel is a powerful add-in that frees you from performing time-consuming operations in Excel, such as combine sheets quickly, merge cells without losing data, paste to only visible cells, count cells by color and so on. 300+ powerful features / functions for Excel 2019, 2016, 2013, 2010, 2007 or Office 365!

Read More Download Buy now

Office Tab 14.00HOT

Adding Tabbed Interface for Office

Office Tab

It enables tabbed browsing, editing, and managing of Microsoft Office applications. You can open multiple documents / files in a single tabbed window, such as using the browser IE 8/9/10, Firefox, and Google Chrome. It's compatible with Office 2019, 2016, 2013, 2010, 2007, 2003 or Office 365. Demo

Read More Download Buy now

Kutools for Outlook 13.00NEW

100+ Powerful Features for Outlook

Kutools-for-Outlook

Kutools for Outlook is a powerful add-in that frees you from time-consuming operations which majority of Outlook users has to perform daily! It can save your time from using Microsoft Outlook 2019, 2016, 2013, 2010 or Office 365!

Read More Download Buy now

Kutools for Word  9.00NEW

100+ Powerful Features for Word

Kutools-for-Word

Kutools for Word is a powerful add-in that frees you from time-consuming operations which majority of Word users have to perform daily! It can save your time from using Microsoft Word / Office 2019, 2016, 2013, 2010, 2007, 2003 or Office 365!

Read More Download Buy now

Classic Menu for Office

Bringing Back Your Familiar Menus

Restores the old look and menus of Office 2003 to Microsoft Office 2019, 2016, 2013, 2010, 2007 or Office 365. Don’t lose time in finding commands on the new Ribbon. Easy to deploy to all computers in enterprises and organizations.

Read More Download Buy now

How To 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 between two dates with formulas

To count the number of days between two given dates, please use below formulas:

1. Enter any one of the below formulas into a blank cell where you want to get the result:

=DATEDIF(A2,B2,"D")
=B2-A2

Note: In the above formula, A2 is the start date cell and B2 is the end date cell.

2. Then, drag the fill handle down to the cells that you want to apply this formula, and the number of days have been calculated, see screenshot:


Count the number of weeks between two dates with formulas

To count how many weeks between two dates, you can use the below handy formula, just subtract start date from the end date and divide by 7.

1. Enter any one of the below formulas into a blank cell:

=(DATEDIF(A2,B2,"D")/7)
=(B2-A2)/7

Note: In the above formula, A2 is the start date cell and B2 is the end date cell.

2. Then, drag the fill handle down to fill this formula, and you will get the weeks in decimal numbers, see screenshot:

  • TipsIf you want to get the number of full weeks between two dates, please apply this formula:
  • =ROUNDDOWN((DATEDIF(A2, B2, "d") / 7), 0)
    =INT((B2-A2)/7)


Calculate Various Difference Between Two Dates In Days, Weeks, Months, Years etc.

Too many formulas to remember, with Kutools for Excel's Date & Time Helper feature, you can quickly get the various difference results between two dates based on your need without remembering any formulas, such as weeks + days,months + weeks and so on. Click to download Kutools for Excel!

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!


Count the number of months between two dates with formula

If you want to determine the number of months between two dates, you can use this DATEDIF function.

1. Please enter the following formula into a blank cell where you want to output the result:

=DATEDIF(A2,B2,"m")

Note: In the above formula, A2 is the start date cell and B2 is the end date cell.

2. Then, drag the fill handle down to fill this formula, and you will get the number of completed months between the given two dates, see screenshot:

  • TipsIf you want to get the number of full weeks between two dates, please apply this formula:
  • =DATEDIF(A2,B2,"m")&"months "&DATEDIF(A2,B2,"md")&"days"


Count the number of years between two dates with formula

With the above DATEDIF function, you can also calculate the number of years between two dates.

1. Apply the below formula into a blank cell:

=DATEDIF(A2,B2,"y")

Note: In the above formula, A2 is the start date cell and B2 is the end date cell.

2. Then, drag the fill handle down to the cells that you want to apply this formula, and all the number of years have been calculated as below screenshot shown:


Count the number of years months and days between two dates with formulas

Sometimes, you need to know exactly how many years, months and days between two dates, in this situation, the following long formula may help you.

1. In a blank cell, enter or copy the following formula:

=DATEDIF(A2, B2, "y") &" years "&DATEDIF(A2, B2, "ym") &" months " &DATEDIF(A2, B2, "md") &" days"

Note: In the above formula, A2 is the start date cell and B2 is the end date cell.

2. And then, drag the fill handle to fill this formula, and the specific number of years, months and days between the dates are calculated at once, see screenshot:


Calculate various difference between two dates in days, weeks, months, years with a powerful feature

May be, you are annoying with the above formulas, if you have Kutools for Excel, with its Date & Time Helper feature, you can quickly get the various difference results between two dates based on your need, such as weeks + days,months + weeks and so on.

Note:To apply this Date & Time Helper, firstly, you should download the Kutools for Excel, and then apply the feature quickly and easily.

After installing Kutools for Excel, please do as this:

1. Click a cell where you want to locate the result, and then click KutoolsFormula Helper > Date & Time helper, see screenshot:

2. In the Date & Time Helper dialog box, do the following operations:

  • Check Difference option from the Type section;
  • In the Arguments input textboxes, select the cells which contain the start date and end date separately;
  • Then, choose the output result type as you need. For example, if you want to get the number of years, months, weeks and days between two dates, you just select Year + Month + Week + Day.

3. After finishing the settings, please click OK button, and you will get the first calculated result, then, you just need to drag the fill handle down to the cells that you want to apply this formula, and you will get the following result as you need:

Click to Download Kutools for Excel and free trial Now!


More relative date and time articles:

  • Calculate Hours Between Times After Midnight In Excel
  • Supposing you have a time table to record your work time, the time in Column A is the start time of today and time in Column B is the end time of the following day. Normally, if you calculate the time difference between the two times by directly minus "=B2-A2", it will not display the correct result as left screenshot shown. How could you calculate the hours between two times after midnight in Excel correctly?
  • 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?

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

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!
officetab bottom
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    338s · 1 years ago
    Avenger vs Marvell
    perhitungan permainan roulette
    perhitungan permainan sicbo
  • To post as a guest, your comment is unpublished.
    corn · 2 years ago
    How can obtain age from two DOB. Eg- i need to calculate the age from DATE of Birth till the Date of Treatment was started
  • To post as a guest, your comment is unpublished.
    vishnu · 2 years ago
    how to obtain matching no of months between two sets of dates ?

  • To post as a guest, your comment is unpublished.
    Rhea Mae Escobal · 3 years ago
    What is the formula for 01/05/2017 13:01:20 minus 01/05/2017 08:59:27 to get the total hours.
  • To post as a guest, your comment is unpublished.
    jo martino · 3 years ago
    I need the following and cannot figure out the formula
    I have been given the date of birth, date of exam. I need a third date, (record purge date) that
    has the following rules;

    IF they are 18 or over by exam date, the purge date will be 7 years from exam date
    IF they are under 18 by exam date, the purge date would be 7 years from when they turn 18
  • To post as a guest, your comment is unpublished.
    ananan · 3 years ago
    Thank You so much for your way.

    2017 calendar printable
  • To post as a guest, your comment is unpublished.
    Manohar Meena · 3 years ago
    Thank You so much for your way of displaying the information pictorially. It was so helpful to me for counting YYMMDD in a single cell.
  • To post as a guest, your comment is unpublished.
    Derek · 3 years ago
    The formula for the number of weeks between two dates is not correct. It just tells us how many seven day periods there were. Weeks start on Sunday and end on Saturday.

    So a ten day period could be 2 or 3 weeks/parts of weeks.

    [u]Example[/u]:
    Start on Saturday. Saturday is last day of week one. Then the next 7 days are week two. Then there are two days left in week three, ending on Monday.

    [u]Question:[/u]
    Is there a formula to calculate how many weeks or parts of weeks there are between two dates?
  • To post as a guest, your comment is unpublished.
    Pravin · 3 years ago
    required to calculate in datedif function i.e 12.05.84 to 15.05.85 + 01.09.01 to 28.08.03 = result. is it possible?
  • To post as a guest, your comment is unpublished.
    Mannu · 3 years ago
    I want to know that how to count week number when start a month like ([u]1-Nov 2016 than week no - 1 or 29-Nov 2016 than week no - 5[/u])

    Thanks
    Mannu
  • To post as a guest, your comment is unpublished.
    Mike · 3 years ago
    Hi there, anyone can show me how to count number of fortnights between two dates?

    And what if the fortnight was not fully divided between the two dates? Will it show as days remaining?

    Thanks.

    Mike
  • To post as a guest, your comment is unpublished.
    alan millar · 4 years ago
    No mention is made of how the cells should be formatted.

    Also this formula calculates 9th May 2016 minus 23rd June 2015 as 36,473 weeks ??
  • To post as a guest, your comment is unpublished.
    NIMFA SALDUA · 4 years ago
    Hello, pls. help me. I have to know the formula for start date and ending date with a revision of the ending date. Example:

    Spreadsheet:

    A(start date) B (end date) C (end date-revision)
    February 1, 2016 February 26, 2016 February 19, 2016

    Pls. help formulate the formula for these 3 columns in the spreadsheet.

    Thank you.

    nimfa
  • To post as a guest, your comment is unpublished.
    Dave · 4 years ago
    Copied formula, used 6/20/1949 and 1/4/2016, it gave me 66 yrs 6 months 128 days. if I use a start day date higher than the end day date I get triple digits, such as 6/5 to 6/30. Is it a formatting issue?
  • To post as a guest, your comment is unpublished.
    Pavan Kumar · 4 years ago
    Datedif is very useful for Years,Months and days.

    Thank you very munch
  • To post as a guest, your comment is unpublished.
    jagdish · 4 years ago
    15/04/1996 and 01/01/2016 how to calculate year by function =datedif
  • To post as a guest, your comment is unpublished.
    yda · 4 years ago
    thanks a lot very usful information
  • To post as a guest, your comment is unpublished.
    James Kong · 4 years ago
    Datedif was very useful for Years,Months and the days.
  • To post as a guest, your comment is unpublished.
    Sopheak · 4 years ago
    I used the formula "Datedif" both for Month and year, it's missed one Month or one Year. Eg. 01/Jan/2014 and 31/Dec/2014 the logical is 12 Months but the answer of the formula is 11 Months (Wrong).
    Please help to check and explain,

    Sopheak
    • To post as a guest, your comment is unpublished.
      Gary · 3 years ago
      Start Date: 1-Jan-2014
      End Date: 31-Dec-2014
      Days: 364.00 or 0 Years, 11 Months, 30 Days
      • To post as a guest, your comment is unpublished.
        SELVAM · 3 years ago
        had a similar problem and I tried this and seems to work.

        =DATEDIF(D10,E10,"y")&" Yr " &DATEDIF(D10,E10,"ym") & " Mth " &DATEDIF(D10,E10, "md")+1 & " Day"
      • To post as a guest, your comment is unpublished.
        Gary · 3 years ago
        Start Date 1/1/2014
        End Date 1/1/2015
        Days 365 Days
        1 Years, 0 Months, 0 Days =DATEDIF(C25,C26,"M") & " Months, " & DATEDIF(C25,C26,"MD") & " Days"
        12 Months, 0 Days =DATEDIF(C25,C26,"M") & " Months, " & DATEDIF(C25,C26,"MD") & " Days"
        • To post as a guest, your comment is unpublished.
          Syed · 3 years ago
          As ur way to we get ans this:
          1 Years, 0 Months, 0 Days
          12 Months, 0 Days

          But
          how can we add those two thing in another column.
          can u explain and share tht formula

          For Example:
          A1:1 Years, 0 Months, 0 Days
          A2:12 Months, 0 Days
          A3:????????????????
          how we get the total?
    • To post as a guest, your comment is unpublished.
      Gary · 3 years ago
      =DATEDIF(C25,C26,"Y") & " Years, " & DATEDIF(C25,C26,"YM") & " Months, " & DATEDIF(C25,C26,"MD") & " Days"

      Start Date: 1/1/2014
      End Date: 31/12/2014
      Days 364.00 or 0 Years, 11 Months, 30 Days
    • To post as a guest, your comment is unpublished.
      Abby · 4 years ago
      I have the same problem also.
  • To post as a guest, your comment is unpublished.
    amit · 5 years ago
    I want to know what will be the year form today after 15 years
  • To post as a guest, your comment is unpublished.
    Mushi Gao · 5 years ago
    I need to write about which less (date).
  • To post as a guest, your comment is unpublished.
    SUDHAKAR · 5 years ago
    is it work in any date format? Ex. dd/mm/yyyy, mm/dd/yyyy, yyyy/mm/dd
    Please reply
    • To post as a guest, your comment is unpublished.
      Kisim · 5 years ago
      [quote name="SUDHAKAR"]is it work in any date format? Ex. dd/mm/yyyy, mm/dd/yyyy, yyyy/mm/dd
      Please reply[/quote]
      [quote name="SUDHAKAR"]is it work in any date format? Ex. dd/mm/yyyy, mm/dd/yyyy, yyyy/mm/dd
      Please reply[/quote]
      Work format is dd/mm/yyy
  • To post as a guest, your comment is unpublished.
    kavi · 5 years ago
    want to calculate months between two dates
  • To post as a guest, your comment is unpublished.
    vipul · 5 years ago
    194 days to be converted in month (how many months)

    please suggest formula for same in excel
  • To post as a guest, your comment is unpublished.
    Kisim · 5 years ago
    Need a formula to return week pacific month such as bellow
    1st week
    2nd week
    3rd week
    4th week
    Then go to next moth automatically changed return same result
    • To post as a guest, your comment is unpublished.
      Prabu · 4 years ago
      =INT((A2-(DATE(YEAR(A2),MONTH(A2)-MOD(MONTH(A2),1),1)-WEEKDAY(DATE(YEAR(A2),MONTH(A2)-MOD(MONTH(A2),1),1),2)+1)+7)/7)
  • To post as a guest, your comment is unpublished.
    Vijay Hudda · 5 years ago
    Formula can't working in Excel sheet
  • To post as a guest, your comment is unpublished.
    GT · 5 years ago
    Further to your =DATEDIF(B1,B2,"Y") & " Years, " & DATEDIF(B1,B2,"YM") & " Months, " & DATEDIF(B1,B2,"MD") & " Days" formula, I have a requirement for Months, Weeks and Days. Is this possible ?
  • To post as a guest, your comment is unpublished.
    Ramchandra · 5 years ago
    A very very thanks to Extend office to help me out of this issue
  • To post as a guest, your comment is unpublished.
    Ayyanar · 5 years ago
    Thank you extend office
    This is very very usefull function
  • To post as a guest, your comment is unpublished.
    Deen · 5 years ago
    That was very easy and helpful. I have a question however. What if in your above example B2 is a constant. Therefore, what if I am trying to find the number of year/months/days between start date and TODAY or a fixed date. Can I add that date in the formulae rather than making a new cell with the date and having the formula read from that?

Feature Tutorials