All functions / Date & Time

YEARFRAC

The fraction of a year between two dates, using a day-count basis.

Syntax

=YEARFRAC(start_date, end_date, [basis])

Arguments

Example

=YEARFRAC(DATE(2024,1,1), DATE(2024,7,1)) → 0.5