# YEARFRAC Function

> Calculate the fraction of a year between two dates with YEARFRAC in TX Sheet Control: the five day count bases, negative results, #NUM! errors and an example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > YEARFRAC Function
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/yearfrac/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/yearfrac/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/yearfrac/llms-full.txt

---

## On This Page

- [Syntax](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/yearfrac/#syntax)
- [Examples](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/yearfrac/#examples)
- [See Also](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/yearfrac/#see-also)

---

## Nearby

- **Previous:** [YEAR Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/year/llms.txt)
- **Next:** [YIELD Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/yield/llms.txt)
