# DAYS Function

> Calculate the number of days between two dates with the DAYS formula function of TX Sheet Control: argument order, negative results and #VALUE! errors.

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

---

Return the number of days between two dates. `end_date` and `start_date` are date serial numbers or dates in text form; the end date comes first. The result is negative when the end date is before the start date. Text that is not a date returns `#VALUE!`.

### Syntax

```text
DAYS(end_date, start_date)
```

Category: Date & Time. Minimum arguments: 2. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=DAYS(DATE(2026,1,3),DATE(2026,1,1))
```

The formula returns 2.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [DAY Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/day/llms-full.txt)
- **Next:** [DAYS360 Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/days360/llms-full.txt)
