Spreadsheet Practice

How to count negative numbers in Excel

Formula (Excel and Google Sheets)

=COUNTIF(B2:B13,"<0")

Use =COUNTIF(B2:B13,"<0"). Zero is not negative, so it is left out.

Result on the example
5 in E1
Works in
Every current version
Google Sheets
Same formula

See it work

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

How it works

The criteria "<0" keeps values below zero. Five months had negative cash flow; May's zero is neither positive nor negative.

=COUNTIF(B2:B13,"<0")

Result5

  1. B2:B1312 rows × 1 col: $12,400, -$3,150, $8,720, -$560, …

    A range: 12 cells in one column.

  2. COUNTIF(B2:B13,"<0")5

    COUNTIF: Counts cells that meet one condition.

    • rangeB2:B1312 rows × 1 col: $12,400, -$3,150, $8,720, -$560, …
    • criteria"<0"

In Google Sheets

The same formula works in Google Sheets: =COUNTIF(B2:B13,"<0"). We ran it in Google Sheets mode on the same data and it returns 5.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=SUMPRODUCT(--(B2:B13<0))5The same count as a comparison, for combining with other tests.
=COUNTIF(B2:B13,"<=0")6Different resultUse when break-even months should count as bad months too. Also counts May's 0.

Common mistakes

  • Negatives shown in brackets, like (3,150), are still negative numbers. But if they were imported as text with brackets, COUNTIF ignores them; convert them first.
  • A minus sign typed as an en dash (–3150) makes the value text.

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 negative numbers

In E1, count the months in B2:B13 with a negative cash flow.

Questions

How do I count positive numbers?

Use =COUNTIF(B2:B13,">0").

How do I add up only the negatives?

Use SUMIF with the same criteria: =SUMIF(B2:B13,"<0").

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.