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

or
0
0
0
s2smodern

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 300 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.
    Vijay Hudda · 4 years ago
    Formula can't working in Excel sheet
  • To post as a guest, your comment is unpublished.
    GT · 4 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 · 4 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 · 4 years ago
    Thank you extend office
    This is very very usefull function
  • To post as a guest, your comment is unpublished.
    Deen · 4 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?