Date & Time
YEARFRAC function: calculate exact fractional years and pro-rata accruals
Convert two dates into a decimal fraction of a year with YEARFRAC using Actual/Actual, Actual/360, Actual/365, or 30/360 day-count conventions.
Pro-rata billing and accrual fractions with explicit basis codes
YEARFRAC(start_date, end_date, [basis]) computes the fraction of a year between two dates under basis 0 (US 30/360), 1 (Actual/Actual), 2 (Actual/360), 3 (Actual/365), or 4 (European 30/360).
For 90 actual days from 2026-01-01 to 2026-04-01, basis 3 returns 90 / 365 = 0.246575, while basis 2 returns 90 / 360 = 0.25.
=ROUND(YEARFRAC(A2, B2, C2), 6)Try the example
Use the original values or change them to test your understanding.