How to Choose the Correct YEARFRAC Basis in Excel
Question details
The user needs to determine the correct basis argument to use in the YEARFRAC function to accurately calculate the fraction of years between two dates, particularly for long periods where leap years cause unexpected discrepancies.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating exact age, tenure, or financial terms over a long period (e.g., 50 years) using the YEARFRAC function.
- Observed behavior
- Depending on the chosen basis argument, the calculation over long periods produces different results (such as 1 to 13 days off over 50 years) because neither actual-day nor 365-day conventions reliably return an exact integer.
Before applying the formula, verify whether your calculation requires strict calendar accuracy (accounting for leap years) or a standardized financial convention (like 360 or 365 days per year), as this dictates the basis argument you must use.
Use Basis 1 (Actual/Actual) for Precise Calendar Calculations
This method counts the exact number of days between two dates and divides by the actual number of days in the corresponding years, making it the most accurate for everyday calendar purposes.
Basis 1 is highly recommended when calculating age or exact time elapsed because it accounts for leap years accurately by using the actual day count.
Click on the blank cell where you want the resulting year fraction to be displayed.
Type =YEARFRAC(A1, A2, 1) into the formula bar, replacing A1 with your start date and A2 with your end date.
Press the Enter key. Excel will return the exact fraction of the year based on actual calendar days.

Use Basis 3 (Actual/365) for Standardized Annual Terms
Basis 3 calculates the actual number of days between the dates but always divides by a fixed 365 days. It is often used in specific accounting or HR policies.
Combine YEARFRAC with TODAY() for Current Tenure
When calculating the fraction of years from a past date up to the present moment, pairing YEARFRAC with the TODAY() function prevents time-of-day decimal errors.
Calculate Date Fractions Seamlessly with WPS Spreadsheet
WPS Spreadsheet fully supports the YEARFRAC function and all five basis conventions. It seamlessly handles both calendar and financial date calculations with perfect Excel compatibility.
- 1. Open your workbook: Launch WPS Office and open the spreadsheet containing your date records.
- 2. Select the output cell: Click on the cell where you want the fractional year calculation to appear.
- 3. Input the YEARFRAC formula: Type =YEARFRAC(, select your start date, select your end date, and enter your required basis number (e.g., 1 for actual/actual).
- 4. Get instant results: Press Enter. WPS Spreadsheet instantly calculates the accurate fractional difference between the two dates.

Frequently Asked Questions
Why does YEARFRAC not return exactly 50 for a 50-year span?
Over a 50-year period, there are typically 12 or 13 leap years. If you use a 365-day basis (Basis 3), the formula divides the total actual days (including extra leap days) by 365, resulting in a number larger than 50. Even with Basis 1, exact day counting across irregular multi-year spans can occasionally yield fractional offsets depending on the exact start and end leap cycles.
What is the default basis if I leave the argument blank?
If you omit the basis argument, Excel defaults to Basis 0. This uses the US (NASD) 30/360 day count convention, which artificially treats every month as having exactly 30 days and every year as having 360 days.
Should I use NOW() or TODAY() inside the YEARFRAC formula?
You should use TODAY() when calculating date intervals. TODAY() returns the current date represented as a whole number. NOW() returns the date plus the current time as a decimal fraction, which can slightly alter your YEARFRAC calculations unnecessarily.
Which YEARFRAC basis should I use for financial reporting?
Financial reporting often relies on the 30/360 or Actual/360 day count conventions. You should consult your accounting standards, but typically Basis 0 (US 30/360), Basis 4 (European 30/360), or Basis 2 (Actual/360) are used for bonds, interest, and loans.




