YEARFRAC

Returns a proportion of years for a given range of dates in Excel
Returns the year fraction between two given days

Rational

Return a proportion of years for a given range of dates.

Description

The Excel YEARFRAC function calculates the fraction of years that has elapsed within a given range of dates. Like, to find a number of years in proportion between two dates like 01-01-2017 and 30-09-2017, use =YEARFRAC(startdate,enddate,2), that returns ‘0.755’.

The function is helpful in finding Interest Expense of the given period, the age of the person.

Syntax

=YEARFRAC (start_date, end_date, [basis])

Parameters

start_date – The start date
end_date – The end date
basis [optional] – The type of day count basis (see below).

Return Value

A decimal number representing the proportion of year.

Key Notes

  • The YEARFRAC calculate the fragment of a year depicted by the number of days between two given dates.
  • Use YEAR function to find the Year component of a given date.
  • The cell format of result should have decimal places for precise display of result.
  • The formula calculates the difference between two dates and divides the number of days in the year (Default is US (NASD) 30/360). Example: Difference between 01-01-2017 and 30-09-2017 = 272, proportion is 272/360 = 0.755 (2nd basis).

The type of day count of [basis] and their meanings are:

BasisDay count basis
0 or omittedUS (NASD) 30/360
1Actual/actual
2Actual/360
3Actual/365
4European 30/360

From YEARFRAC Function you can calculate years between  two dates like we have dates 10-06-2007 and 10-06-2018 it return 11.

Keep Reading Similar Functions:

Determine the difference between two dates in Excel

DATEDIF

The DATEDIF is an unknown compatibility function that can be used to calculate the difference between two dates. To find years diff.,=DATEDIF(start_date, end_date,”y”).

Read More »
Returns the Year component of a given date in Excel

YEAR

The YEAR function extracts the Year component of a given date. Example; to get or find Year from a date (11/08/2017- cell B5), use =YEAR(B5), returns ‘2017’.

Read More »
Get a date by entering the year, month, and day in Excel

DATE

The DATE function returns a date value using year, month and date, sequentially. I.e.; to merge all 3 date component, =DATE(2012,12,4) returns “04-12-2012”.

Read More »