
In Excel, the most accurate way to calculate years of service is by using the DATEDIF function. To get only the total full years, you can use =DATEDIF(start_date, end_date, "Y"). If you need a more detailed result, such as showing both years and months, you can apply =DATEDIF(start_date, end_date, "Y") & " years, " & DATEDIF(start_date, end_date, "YM") & " months".


