The YEARFRAC function in Excel returns a decimal value that represents fractional years between two specified dates.

Syntax:

=YEARFRAC(start_date, end_date, [basis]) 

Arguments:

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

YEARFRAC Function Example

As mentioned above, Excel calculates a decimal number that represents the fraction of a year between two dates. Excel also uses whole days when calculating the fractional data. Let’s look at the example below. Pay attention to how the optional argument changes the result.

Leave a Reply

PMT Function

The PMT function in Excel calculates the payment for a loan that has constant payments and a constant interest rate.

Read More »

TRUNC Function

The TRUNC function in Excel returns a truncated number based on a specified number of digits. This specified number of

Read More »
Scroll to Top