Calculates the fraction of the year represented by the number of whole days between two dates.
Deze functie werkt in Google Spreadsheets hetzelfde als in Excel — dezelfde syntaxis en argumenten.
YEARFRAC(start_date, end_date, [basis])The YEARFRAC function is used to identify the proportion of a year between a start date and an end date. It is commonly used to calculate accrued interest or other financial metrics that rely on time periods.
=YEARFRAC("2023-01-01", "2023-07-01", 1)Resultaat: 0.49589
Calculates the fraction of the year for the first half of 2023 using the actual/actual basis.
It determines how the number of days in a year is calculated, which affects the final fraction.