# DAYS function in Excel

> DAYS returns the number of days between two dates.

Source: https://spreadsheetpractice.com/functions/days · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

## Quick answer

- **What it does:** DAYS returns the number of days between two dates.
- **Syntax:** `=DAYS(end_date, start_date)`
- **Most common use:** `=DAYS(C2,B2)` returns 30 (Thirty days from sent to paid)
- **Available in:** Excel 2013 and later
- **Category:** [Date functions](https://spreadsheetpractice.com/functions/category/date)
- **Returns:** A whole number of days, negative if start_date is later than end_date.
- **Google Sheets:** Works the same in Google Sheets.

## What it does

DAYS returns the number of days between two dates. It gives the same answer as subtracting one date from the other, but the argument order (end date first) makes the intent clear, and it accepts dates written as text. Use it for invoice ages, lead times and time between events.

## Syntax

`=DAYS(end_date, start_date)`

| Argument | Required? | What it is |
|---|---|---|
| `end_date` | Required | The later date. |
| `start_date` | Required | The earlier date. If it is after end_date, the result is negative. |

## Examples

Each result was calculated by running the formula on the sample sheet.

| Cell | Formula | Result | What it shows |
|---|---|---|---|
| E2 | `=DAYS(C2,B2)` | 30 | Thirty days from sent to paid |
| E3 | `=DAYS(B3,C3)` | -11 | Arguments swapped: the result is negative |
| E4 | `=C2-B2` | 30 | Plain subtraction gives the same 30 days |

### The sample sheet

Every formula above runs on this data:

|  | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Invoice | Sent | Paid |  | Result |
| 2 | INV-201 | 2/2/2026 | 3/4/2026 |  | 30 |
| 3 | INV-202 | 2/16/2026 | 2/27/2026 |  | -11 |
| 4 |  |  |  |  | 30 |

## Common mistakes

| What you see | Why, and how to fix it |
|---|---|
| A negative number | The arguments are in start, end order. DAYS takes the end date first: DAYS(end_date, start_date). |
| #NAME? | DAYS arrived in Excel 2013. In older versions, subtract the dates instead: =C2-B2. |
| Counting weekends you meant to skip | DAYS counts every calendar day. Use NETWORKDAYS for working days. |

## Tips

- Add 1 when both the start and end day should count, such as for a hotel stay or a leave request.

## Related functions

- [DATEDIF](https://spreadsheetpractice.com/functions/datedif): DATEDIF counts the complete years, months or days between two dates.
- [NETWORKDAYS](https://spreadsheetpractice.com/functions/networkdays): NETWORKDAYS counts the working days between two dates, Monday to Friday, including both the start and end date.
- [TODAY](https://spreadsheetpractice.com/functions/today): TODAY returns the current date, with no time attached, and updates every time the workbook recalculates.

## Questions

### How do I count the days between two dates in Excel?

Use =DAYS(end_date, start_date), or simply subtract: =B2-A2. Both return the number of calendar days.

### Does DAYS include both the start and end date?

No. DAYS("2026-03-02","2026-03-01") returns 1. Add 1 if you want to count both days.

### What is the difference between DAYS and NETWORKDAYS?

DAYS counts every calendar day. NETWORKDAYS counts weekdays only, and can also skip a list of holidays.

## Practice

A graded DAYS exercise ("Days to pay") is on [the DAYS page](https://spreadsheetpractice.com/functions/days). It is checked instantly, then re-checked on changed data.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
