Spreadsheet Practice

How to count dates after a certain date in Excel

Formula (Excel and Google Sheets)

=COUNTIF(B2:B11,">"&E1)

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

Result on the example
4 in E2
Works in
Every current version
Google Sheets
Same formula

See it work

The formula is already in E2. Change any input and the result updates, or edit the formula to experiment.

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.

=COUNTIF(B2:B11,">"&E1)

Result4

  1. B2:B1110 rows × 1 col: 1/15/2026, 2/28/2026, 3/31/2026, 4/1/2026, …

    A range: 10 cells in one column.

  2. E16/30/2026

    The value in E1.

  3. ">"&E1">46203"

    The & operator joins as text.

  4. COUNTIF(B2:B11,">"&E1)4

    COUNTIF: Counts cells that meet one condition.

    • rangeB2:B1110 rows × 1 col: 1/15/2026, 2/28/2026, 3/31/2026, 4/1/2026, …
    • criteria">"&E1">46203"

In Google Sheets

The same formula works in Google Sheets: =COUNTIF(B2:B11,">"&E1). We ran it in Google Sheets mode on the same data and it returns 4.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=COUNTIF(B2:B11,">="&E1)5Different resultOn or after: use it when the date itself should count. Also counts C-106, which ends on June 30.
=SUMPRODUCT(--(B2:B11>E1))4The 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.

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Count dates after a certain date

In E2, count the contracts that end after the date in E1.

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()).

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.