# How to count dates after a certain date in Excel

Join the "greater than" operator to the date cell: `=COUNTIF(B2:B11,">"&E1)`.

**Excel:** `=COUNTIF(B2:B11,">"&E1)` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Contract | Ends |  | After | 2026-06-30 |
| C-101 | 2026-01-15 |  | Contracts |  |
| C-102 | 2026-02-28 |  |  |  |
| C-103 | 2026-03-31 |  |  |  |
| C-104 | 2026-04-01 |  |  |  |
| C-105 | 2026-05-15 |  |  |  |
| C-106 | 2026-06-30 |  |  |  |
| C-107 | 2026-07-01 |  |  |  |
| C-108 | 2026-09-30 |  |  |  |
| C-109 | 2026-12-31 |  |  |  |
| C-110 | 2027-01-31 |  |  |  |

Formula in E2: `=COUNTIF(B2:B11,">"&E1)`

Result: 4

## How it works

COUNTIF needs its condition as text, so `">"&E1` joins the operator to the date. Dates are numbers underneath, which is why "greater than" means "later than".

C-106 ends on June 30 itself, so it is not after it; four contracts end later.

## Other ways

- `=COUNTIF(B2:B11,">="&E1)`: On or after: use it when the date itself should count. (Also counts C-106, which ends on June 30.)
- `=SUMPRODUCT(--(B2:B11>E1))`: The same count as a comparison.

## Common mistakes

- Writing the date inside the quotes, like `">6/30/2026"`, depends on your regional date format. Keep the date in a cell.
- Dates stored as text are not counted. See the page on COUNTIFS with dates returning the wrong count.

## Questions

**How do I count dates before a date?**

Swap the operator: `=COUNTIF(B2:B11,"<"&E1)`.

**How do I count dates after today?**

Use TODAY(): `=COUNTIF(B2:B11,">"&TODAY())`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/count-dates-after-a-date
