How To Use YEARFRAC()

Description

Returns the number of years, including fractional years, between two dates using a specified day count convention.

Common questions about the YEARFRAC formula include:

What does the YEARFRAC formula do?
How does the YEARFRAC formula calculate a fractional year?
What are the arguments (inputs) for the YEARFRAC formula?

The YEARFRAC formula can be used appropriately for various financial calculations, such as calculating loan repayment schedules, bond duration, and other transactions that involve interest rate or time-driven calculations.

Common ways the YEARFRAC formula is commonly mistyped include:

YEARFACT – this looks like the expected YEARFRAC, but the formula is non-existent and will produce an error.
FRAGEAR – this is an incorrect spelling of the expected YEARFRAC, which will produce an error.
YEARFCAT – this is an incorrect abbreviation of the expected YEARFRAC, which will produce an error.

Some common ways the YEARFRAC formula is used inappropriately include using the incorrect arguments, entering invalid data into the arguments, or using an incorrect date format.

Common pitfalls when using the YEARFRAC formula include misinterpreting the output or confusing the arguments, which can lead to incorrect calculations.

Common mistakes when using the YEARFRAC formula include using incorrect arguments, entering invalid data, and mistyping the formula.

Common misconceptions people might have with the YEARFRAC formula include assuming that the calculations will always return an exact numerical value, that the formula works for all dates, and that the formula can be used without taking time into consideration.

How To Actually Use YEARFRAC() in Sheets

YEARFRAC(start_date, end_date, [day_count_convention])

0Better Sheets Tutorials

Looking for a video tutorial? Members can email me anytime! Check out the blogs below for more info on this formula. Find more formulas here at Better Sheets.

Learn more about the YEARFRAC() formula:

Age Calculation, Years of Service Formula in Excel & Google Sheets

In this tutorial first we'll cover how to calculate age from date of birth as of today using various formulas in Excel & Google Sheets, then we'll calculate years of service from hire date or simply between two dates, then we'll expand the formula by adding months or days in addition to years. Functions used: DATEDIF, YEARFRAC, TODAY, IF, SWITCH, TRIM