# YEARFRAC

## Content

This function returns the fraction of the year represented by the number of whole days between the start and end dates.

## Syntax

`YEARFRAC(start_date, end_date, [basis])`

## Arguments

This function has these arguments:

| Argument | Description |
| -------- | ----------- |
| *start\_date* | [Required] Starting date (DateTime object) |
| *end\_date* | [Required] Ending date (DateTime object) |
| *basis* | [Optional] Integer representing the basis for day count |

## Remarks

This function returns an error when the start, end, or basis is invalid.

## Examples

`YEARFRAC(A1,A2,A3)`