Calculating years of service in Excel is a crucial task for various purposes, including employee anniversaries, retirement planning, and performance evaluations. This calculation can be done with ease using Excel's powerful functions and formulas.
Understanding the Concept
Years of service, also known as tenure or length of service, is the amount of time an employee has been working for an organization. This calculation involves determining the difference between the employee's start date and the current date or a specific date in the future.

Using Excel Formulas
To calculate years of service in Excel, you can use the following formulas:
=DATEDIF(A2, B2, "y")
: This formula calculates the number of years between two dates, where A2 is the start date and B2 is the end date.=INT((B2-A2)/365.25)
: This formula calculates the number of years between two dates, considering leap years.
Example 1: Using the DATEDIF Function
Suppose you have a table with employee data, including start dates and end dates (if applicable).
Employee ID | Start Date | End Date |
---|---|---|
101 | 2015-01-01 | 2022-01-01 |
102 | 2018-06-01 | |
103 | 2020-03-01 | 2022-06-01 |
To calculate the years of service for each employee, follow these steps:
- Create a new column, e.g., "Years of Service."
- Enter the formula
=DATEDIF(A2, B2, "y")
in the first row of the new column. - Copy the formula down to the other rows.

Example 2: Using the INT and Date Difference Functions
Alternatively, you can use the INT and date difference functions to calculate years of service.
Employee ID | Start Date | End Date |
---|---|---|
101 | 2015-01-01 | 2022-01-01 |
102 | 2018-06-01 | |
103 | 2020-03-01 | 2022-06-01 |
To calculate the years of service for each employee, follow these steps:
- Create a new column, e.g., "Years of Service."
- Enter the formula
=INT((B2-A2)/365.25)
in the first row of the new column. - Copy the formula down to the other rows.

Using Excel Functions with TODAY()
If you want to calculate years of service as of the current date, you can use the TODAY() function in combination with the DATEDIF or INT and date difference functions.
Example 3: Using TODAY() with DATEDIF
Employee ID | Start Date |
---|---|
101 | 2015-01-01 |
102 | 2018-06-01 |
103 | 2020-03-01 |
To calculate the years of service for each employee as of the current date, follow these steps:
- Create a new column, e.g., "Years of Service."
- Enter the formula
=DATEDIF(A2, TODAY(), "y")
in the first row of the new column. - Copy the formula down to the other rows.

Gallery of Excel Formulas for Years of Service
Excel Formulas for Years of Service









We hope this comprehensive guide has helped you understand how to calculate years of service in Excel with ease. Whether you use the DATEDIF function or the INT and date difference functions, you can quickly and accurately determine the years of service for your employees. Don't forget to explore the gallery section for more examples and inspiration!
Share your thoughts and experiences with calculating years of service in Excel in the comments section below.