
You can calculate years of service in Excel accurately using the DATEDIF function, which handles date differences precisely. For full years, the formula is =DATEDIF(start_date, end_date, "Y"). If you want a detailed output like “X years, Y months,” use =DATEDIF(start_date, end_date, "Y") & " years, " & DATEDIF(start_date, end_date, "YM") & " months" to capture both years and leftover months.


