How to calculate the length of service from hire date in Excel?

If you have a range of data including employee names and their date of joining your company in a worksheet, now, you may want to calculate their length of service, it means to get how many years and months an employee has worked for your company. This article, I will talk about quick method to solving this job for you.

Calculate the length of service from the hire date with YEARFRAC function

Calculate the length of service from the hire date with DATEDIF function

Calculate the length of service from the hire date to today with DATEDIF function

Calculate the length of service from the hire date with an amazing feature


Calculate the length of service from the hire date with YEARFRAC function

To calculate the length of service from the hire date and a specific date, the YEARFRAC function can help you.

Please enter or copy the following formula into a blank cell:

=INT(YEARFRAC(B2,C2))

Note: In the above formula, B2 is the hire date cell and C2 is the end date cell.

Then drag the fill handle to copy the fromula to other cells you need, and you will get the person's lenght of service in years.


Calculate the length of service from the hire date with DATEDIF function

If you need to calculate the length of service in exact years months and days, the DATEDIF function in Excel can do you a favor.

Calculate the length of service in years:

Please enter or copy the following formula into a blank cell:

=DATEDIF(B2, C2, "y")& " Years"


Calculate the length of service in years and months:

Please apply the following formula:

=DATEDIF(B2,C2,"y")&" Years, "&DATEDIF(B2,C2,"ym")&" Months"


Calculate the length of service in years, months and days:

Apply the following formula:

=DATEDIF(B2,C2,"y") & " Years, " & DATEDIF(B2,C2,"ym") & " Months, " & DATEDIF(B2,C2,"md") & " Days"

Note: In the above formula, B2 is the hire date cell and C2 is the end date cell.


Calculate the length of service from the hire date to today with DATEDIF function

Someitmes, you may want to calculate the length of service from hire date to today, so, every day you open the worksheet the length of service will be updated automatically. In this case, you should combine the TODAY function within the DATEDIF function.

Please apply any one below formulas to your need:

=DATEDIF(B4, TODAY(), "y")& " Years"
=DATEDIF(B4,TODAY(),"y")&" Years, "&DATEDIF(B4,TODAY(),"ym")&" Months"
=DATEDIF(B6,TODAY(),"y") & " Years, " & DATEDIF(B4,TODAY(),"ym") & " Months, " & DATEDIF(B4,TODAY(),"md") & " Days"


Calculate the length of service from the hire date with an amazing feature

It is somewhat difficult for you to remember so many formulas, but, if you have Kutools for Excel, with its Date & Time Helper feature, you can quickly calculate the length of service in years, months, days, years + months + days or other formats as you need.

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 hire date and end date separately;
  • Then, choose the output result type as you need. For example, you can get the length of service in years, months, years + months + days, years + months and so on.

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

Click to Download Kutools for Excel and free trial Now!


More relative articles:

  • 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?
  • Calculate Days Hours And Minutes Between Two Dates
  • Supposing, you have two columns of date time cells, and now, you want to calculate the difference in days, hours and minutes between these two date time cells as following screenshot shown. This article, I will talk about some methods to solve this task for you.

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 ( 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.
    sam · 1 months ago
    Hi, i would like to know how i can add two different experience which i found through datedif for a single staff
    eg : 3 yrs, 11 months, 4 days and 4 yrs, 3 months, 18 days,

    i am looking a formula for to get the following result

    8 yrs, 2 months, 22 days.

    thank you
  • To post as a guest, your comment is unpublished.
    Eve · 1 years ago
    Ive tried this formula and it comes up with #value!


    Please help
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      Hello, Eve,
      The above formula works well in my worksheet, which Excel version do you use?
      Or you can insert your error screenshot here.
      Thank you!
  • To post as a guest, your comment is unpublished.
    AB · 1 years ago
    How can I calculate years of service from the date or hire to today?
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      Hello, AB,
      To calculate years of service from the hire date to today, you just need to apply the following formula: (Note: A2 is the hire date, change it to your need)
      =DATEDIF(A2,TODAY(),"y") & " years " & DATEDIF(A2,TODAY(),"ym") & " months "

      Please try it, hope it can help you!