When you’re working with dates in Excel, you may often need to find out how many years have passed from a given date to the current date. That’s especially true when you need to calculate age, service duration, tenure, time since an event, and so on.
Excel has built-in formulas that make this task very easy. Speaking of which, in today’s article, we’ll learn how to calculate years in Excel from today using four Excel functions: DATEDIF, YEARFRAC, YEARFRAC+INT, and YEAR functions.
➤ Excel has built-in formulas to count how many years have passed from a past date to today.
➤ TODAY Function: It keeps your calculations automatically updated to the current date
➤ DATEDIF Function: It calculates the number of full years between a past date and today. The function ignores the months and days.
➤ YEARFRAC Function: It returns the exact number of years, including decimal parts.
➤ YEARFRAC + INT: The function returns only the whole number of years.
➤ YEAR Function: The function simply subtracts the past year from the current year.
Calculate Years in Excel from Today Using the DATEDIF Function
In the following dataset, we have a list of people with their birthdates. We’ll use the Excel formulas with the TODAY function to calculate years from today.
The DATEDIF function calculates the number of complete years between a given date and today’s date. It is the easiest way to find out a full-year count. The formula always ignores the remaining months or days. So, the result is always a whole number.
Steps:
➤ Insert the below formula in the D2 cell
=DATEDIF(C2,TODAY(),”Y”)
➤ Press Enter. The formula returns the number of full years between the date in C2 and the current date.
Given data was 2-15-1990, and the result is 35. This means 35 full years have passed between 2-15-1990 to 6-5-2025.
➤ Use the Autofill options to see all the results at once.
Here is a quick explanation of the formula.
=DATEDIF(C2,TODAY(),"Y")
➥ C2: The start date
➥ TODAY(): Always returns the current date.
➥ "Y": It tells DATEDIF to calculate years only.
Calculate Years in Excel From Today Using the YEARFRAC Function
The YEARFRAC function helps you calculate the total number of years between a given date and today. But the function also includes partial years in decimal form.
That means if 7 years and 3 months have passed between the past date and the current date, the YEARFRAC function will return 7.25 [7 years + (3/12) years = 7.25]. You can use the formula to identify the proportion of a year’s benefits or obligations for a specific period.
Steps:
➤ Insert the below formula in the D2 cell.
=YEARFRAC(C2, TODAY(), 1)
➤ Press Enter. The formula will return the total number of years that have passed, including the partial years.
Calculate Years in Excel from Today Using the YEARFRAC & INT Functions
In Excel, while the YEARFRAC function calculates the fraction of a year between two dates, the INT function rounds down the number to the nearest integer.
That means if 7 years and 3 months have passed, INT and YEARFRAC functions will return to just 7 instead of 7.25. The method is useful when you want to get the whole number part of a calculation. For instance, calculations for age or period.
Steps:
➤ Insert the below formula in the D2 cell
=INT(YEARFRAC(C2, TODAY(), 1))
➤ Press Enter. The formula will return the full number of years between the date in C2 and today’s date.
Calculate Years in Excel from Today Using the YEAR Function
This example uses the YEAR and NOW functions. The YEAR function extracts the year from a given date. The NOW function returns the current date and time. It is a useful method for various calculations and manipulation tasks.
Steps:
➤ Insert the below formula in the D2 cell.
=(YEAR(NOW())-YEAR(A2))
➤ Press Enter. The formula will subtract the year of a past date from the current year.
Frequently Asked Questions
How to calculate years of service in Excel today?
You should use the DATEDIF and TODAY() functions to calculate years of service in Excel. The DATEDIF function:
=DATEDIF(start_date, TODAY(), “Y”)
The formula will directly return the whole number of years from the start date to the current date.
How to calculate the year from a date in Excel?
Use the YEAR formula to calculate the year from a date in Excel. If your data is in cell A2, insert the formula: =YEAR(A2). You should use =YEAR(“specific date”) to get the year from a specific date. Use =YEAR(TODAY()) to get the current year.
How do I calculate tenure from today in Excel?
You can use the DATEDIF function with TODAY() to calculate tenure in Excel. Here, you can calculate years, months, or a combination of both using the formula below.
=DATEDIF(B2,C2,”y”) & ” years , “& DATEDIF(B2,C2,”ym”) & ” months”
Here,
- DATEDIF(B2, C2, “y”): It calculates complete years between the start date in B2 and the end date in C2.
- & ” years , “: It connects the number of years with the text “years ,”.
- DATEDIF(B2, C2, “ym”): It calculates the remaining number of months after counting the full years.
- & ” months”: It connects the months value with the text “months”
Wrapping Up
In today’s guide, we’ve covered several easy ways to calculate years in Excel using formulas like DATEDIF, YEARFRAC, YEARFRAC & INT, and YEAR functions. These methods help you find out how many years have passed since the current date. You can try out the sample Excel sheets and see how these techniques simplify your data-based calculations.