NOTE: Other languages are Google-Translated. You can go to the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2sdefault

How to count / calculate weeks / months / years between two dates in Excel?

Have you ever considered calculating how many 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 / calculate weeks between two dates

Count / calculate months between two dates

Count / calculate years between two dates

Count / calculate years months and days between two dates


Add a number of years / months / days / weeks to date:

Kutools for Excel’s Formulas utility contains some commonly-used formulas, such as add years to date, calculate age based on birthday and so on. With these usual formulas, you can quickly get the result that you want without remembering any formulas.

doc-count-weeks-two-dates3

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


arrow blue right bubble Count / calculate weeks between two dates


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 this formula =(B2-B1)/7 into a blank cell, (B2 indicates the end date and B1 is the start date), and then press Enter key, you will get the specific result which has 18 weeks and more 4 days between the two dates, see screenshot:

doc count weeks two dates 1

Note: If you just want to get the whole weeks, please apply this INT function: =INT((B2-B1)/7).

doc count weeks two dates 2


arrow blue right bubble Count / calculate months between two dates

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

1. Please enter this formula =DATEDIF(B1,B2,"m") into a blank cell (B1 stands for the start date and B2 indicates the end date), then press Enter key and you will get the number of months between the two given dates, see screenshot:

doc count weeks two dates 3


arrow blue right bubble Count / calculate years between two dates

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

1. Apply this formula =DATEDIF(B1,B2,"y") (B1 stands for the start date and B2 indicates the end date), and then press Enter key, you will get the total number of years between the two dates. See screenshot:

doc count weeks two dates 4


arrow blue right bubble Count / calculate years months and days between two dates

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 this long formula =DATEDIF(B1,B2,"Y") & " Years, " & DATEDIF(B1,B2,"YM") & " Months, " & DATEDIF(B1,B2,"MD") & " Days".And then tap the Enter key, the specific number of years, months and days between the dates are calculated at once, see screenshot:

doc count weeks two dates 5

Note: In the above formula, B1 indicates the start date and B2 stands for the end date, you can modify them as you need.


Convert time to Hours / Minutes / Seconds:

If you need to convert time to hours, minutes or seconds in a worksheet, the Kutools for Excel’s Convert Time feature may help you quickly deal with this task.

doc convert time 1 1

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


Related articles:

How to add / subtract days / months / years to date in Excel?

How to count the number of specific weekdays between two dates in Excel?

How to count / calculate the number of days between two dates in Excel?


Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
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.
    corn · 24 days 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 · 3 months 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 · 8 months 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 · 1 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 · 1 years ago
    Thank You so much for your way.

    2017 calendar printable