Excel YEARFRAC Function

Summary

The Excel YEARFRAC function returns a decimal value that represents fractional years between two dates. You can use YEARFRAC for formulas that do things like like calculating age in years using a birthdate.

Purpose

Get the fraction of a year between two dates

Return value

A decimal number

Syntax

=YEARFRAC (start_date, end_date, [basis])

Arguments

Usage notes

YEARFRAC calculates a decimal number representing the fraction of a year between two dates. Excel uses whole days between two dates to work out the fraction of a year as a decimal value.


Basis - (optional) - the type of day count basis to use:

Basis 0: US (NASD) 30/360 - default
Basis 1: Actual/actual
Basis 2: Actual/360
Basis 3: Actual/365
Basis 4: European 30/360

 

Excel YEARFRAC Function

Summary

The Excel YEARFRAC function returns a decimal value that represents fractional years between two dates. You can use YEARFRAC for formulas that do things like like calculating age in years using a birthdate.

Purpose

Get the fraction of a year between two dates

Return value

A decimal number

Syntax

=YEARFRAC (start_date, end_date, [basis])

Arguments

Usage notes

YEARFRAC calculates a decimal number representing the fraction of a year between two dates. Excel uses whole days between two dates to work out the fraction of a year as a decimal value.


Basis - (optional) - the type of day count basis to use:

Basis 0: US (NASD) 30/360 - default
Basis 1: Actual/actual
Basis 2: Actual/360
Basis 3: Actual/365
Basis 4: European 30/360