For a single employee, take the date of hire (or adjusted service date if applicable due to rehire, etc.) and determine how many months and years have passed since then to today. Free and easy to use date calculators are available online to make this easier.
To calculate the average tenure for your company or a department, it will be best to use a spreadsheet. If the years of service are not readily available data, take the hire date (or adjusted service date if applicable due to rehire, etc.) and use a formula to calculate the years of service. In Excel there are a number of ways to accomplish this such as using DatedIf and Today to calculate the difference between the date in a cell and today’s date. This will give you the years of service for each employee. Then simply take the average, which again Excel can do for you in a jiffy by using the Average formula for up to 255 employees. If you have more than that, just do an AutoSum and then divide by the number of employees.