Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Calculating Months of Tenure.

Calculating Months of Tenure

Written by Allen Wyatt (last updated December 22, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


2

If you are in charge of tracking employees in your department or company, you might want to know if you can use Excel to calculate the months of tenure for those employees, given the date at which the employee started. This can be done very easily.

For the sake of this example, let's assume that column C contains the starting date for a list of employees. You could use the following formula in column D to determine each employee's tenure:

=DATEDIF(C3,NOW(),"M")

The DATEDIF function calculates the difference between a starting date and an ending date. The "M" used in the formula indicates that you want the result in completed months.

To calculate the average tenure for your series of employees, simply include the following formula at the bottom of column C:

=AVERAGE(C3:C174)

Of course, you should replace the range in the function (C3:C174) with the actual range of employee tenures as determined by the DATEDIF formula.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9605) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Calculating Months of Tenure.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Making Revisions

You've turned on Highlight Changes, but how do you know what has been changed? This tip explains how Excel displays those ...

Discover More

Selecting Noncontiguous Ranges with the Keyboard

It's easy to select non-contiguous ranges using the mouse, but may seem more daunting if you are simply using the ...

Discover More

Advanced Filtering

Many people know how to use AutoFilter, but there are times when you need some more filtering muscle. Here's how you can ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Converting UNIX Date/Time Stamps

If you import information generated on a UNIX system, you may need to figure out how to change the date/time stamps to ...

Discover More

Generating a 4 On/4 Off Work Schedule

You can use Excel to work with times and dates. Sometimes, however, figuring out the best way to do that can be tricky. ...

Discover More

Monthly Close-Out Dates

If your company closes out its accounting months at the end of each calendar quarter, figuring out the proper closing ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is one less than 9?

2019-09-10 19:35:46

Peter Atherton

Dave
The DATEDIF function is an old Lotus 123 function that Excel can use but there has never, I think, been any help on this function. However there is a very good page on this site, see:
https://excelribbon.tips.net/T011360_Elapsed_Days_as_Years_Months_and_Days.html The DATEDIF returns a string that is very easy to understand.

Excel's version is the YEARFRACT function. This reurn the difference as a decimal fraction and has the advantage that it is easy to do further calculations on the result. If you want to use it then check the help page as there are five options on calculating the result, so choosing the right basis is crucial to getting the answer you want.


2019-09-09 14:31:49

Dave Bonin

Oddly, there is no Excel Help for the DATEDIF() function. I wonder why. Is the function no longer supported or is it in an add-in?

Personally, if the calculation is not too critical, I tend to subtract the newer date from the older and then divide by 30.4. This gets me close enough for most purposes. It also works nicely for providing results in decimal months when the number of months is not exactly an integer.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.