How to Sum Only Positive Numbers in Excel (5 Formulas)

To sum only positive numbers in Excel, use SUMIF with a greater-than-zero condition: =SUMIF(B2:B9,">0"). Replace B2:B9 with your range. Excel adds every value above zero and skips negatives, zeros, blank cells and text. The >0 part must be inside double quotation marks, or the formula won’t work.

This guide walks through a worked example with real results, then covers summing negatives, adding a second condition with SUMIFS, the SUMPRODUCT and FILTER alternatives, filtered lists, and the errors you’re most likely to hit.

The example data

Every formula below uses this small table. Column B holds a monthly change that can be positive or negative, and column C holds units sold.

RowA: MonthB: ChangeC: Units
2Jan12040
3Feb-4525
4Mar30060
5Apr010
6May-8030
7Jun7535
8Jul-1520
9Aug21050

A plain =SUM(B2:B9) returns 565, because the negatives cancel out part of the positives. The positives on their own (120 + 300 + 75 + 210) add up to 705, and that’s the number we want.

Method 1: SUMIF (works in every version)

  1. Click the cell where you want the total.
  2. Type =SUMIF(
  3. Select the range with your numbers, in this case B2:B9, then type a comma.
  4. Type ">0" including the quotation marks, then a closing bracket.
  5. Press Enter.
Excel SUMIF formula adding only positive numbers
SUMIF with ">0" adds only the values above zero.

The finished formula is =SUMIF(B2:B9,">0") and the result is 705.

Microsoft’s SUMIF function reference gives the syntax as SUMIF(range, criteria, [sum_range]). The third argument is optional. When you leave it out, Excel adds the cells in the range you tested. Blank and text values in the range are ignored. Microsoft also says any criteria that include logical or mathematical symbols, such as > or <, must be in double quotation marks. A plain number like 5 doesn’t need them.

Variations on the same formula

You want to addFormulaResult
Only positive numbers=SUMIF(B2:B9,">0")705
Zero and positive numbers=SUMIF(B2:B9,">=0")705
Only negative numbers=SUMIF(B2:B9,"<0")-140
Negatives shown as a positive number=ABS(SUMIF(B2:B9,"<0"))140
Values over 100=SUMIF(B2:B9,">100")630
Values over the number in E1 (E1 = 100)=SUMIF(B2:B9,">"&E1)630

A few notes on these:

  • Zero makes no difference to the total. Adding 0 doesn’t change a sum, so ">0" and ">=0" give the same answer. The difference only shows up if you count cells instead. To learn more about that operator, see how to use greater than or equal to in Excel.
  • Don’t use ">=-1" to include zero. Some guides suggest it, but it also picks up small negatives such as -0.5.
  • Cell-based limits need the ampersand. Put the operator in quotes and join it to the cell with &, as in ">"&E1. Microsoft’s own example uses the same pattern. Change E1 and the total updates.

Method 2: Sum one column where another column is positive

Sometimes the condition and the numbers you want to add are in different columns. Add the sum range as the third argument:

=SUMIF(B2:B9,">0",C2:C9)

This adds the units in column C for every month where the change in column B is above zero (Jan, Mar, Jun and Aug): 40 + 60 + 35 + 50 = 185.

Make the two ranges the same size and shape. Microsoft says that if they differ, Excel builds a block starting at the first cell of the sum range, sized to match the criteria range, and performance may suffer. Matching ranges avoid surprises.

Method 3: SUMIFS for positives plus another condition

To add positives that also meet a second rule, use SUMIFS. Here’s the total of positive changes in months with at least 50 units sold:

=SUMIFS(B2:B9,B2:B9,">0",C2:C9,">=50")

Only Mar (300) and Aug (210) pass both tests, so the result is 510. Jun has a positive change but only 35 units.

Watch the argument order. In Microsoft’s SUMIFS reference, the sum range comes first, then pairs of criteria ranges and criteria. In SUMIF the sum range comes last. Microsoft calls this difference a common source of problems. Each criteria range must have the same number of rows and columns as the sum range, and you can use up to 127 range and criteria pairs.

Method 4: SUMPRODUCT

SUMPRODUCT does the same job without a criteria string, which some people find easier to extend:

=SUMPRODUCT((B2:B9>0)*B2:B9)

The part in brackets returns TRUE or FALSE for each cell. Multiplying by the values turns TRUE into the number and FALSE into zero, so the result is 705. For two conditions, multiply both tests: =SUMPRODUCT((B2:B9>0)*(C2:C9>=50)*B2:B9) returns 510.

If the range might contain text, use the comma form instead: =SUMPRODUCT(--(B2:B9>0),B2:B9). Microsoft’s SUMPRODUCT reference says the function treats non-numeric array entries as zeros. Multiplying the ranges with * is different: if a cell holds text, that multiplication can return #VALUE!. All arrays must be the same size, or you get #VALUE!. Microsoft also advises against whole-column references like A:A, which slow the calculation down.

Method 5: FILTER in Microsoft 365, Excel 2021 and 2024

Newer versions of Excel can pull out the positive numbers first and then add them:

=SUM(FILTER(B2:B9,B2:B9>0,0))

The result is 705. If you want to see which values are being added, use =FILTER(B2:B9,B2:B9>0) on its own in an empty cell. It spills the list 120, 300, 75 and 210 into the cells below. For the two-condition version, join the tests with *: =SUM(FILTER(B2:B9,(B2:B9>0)*(C2:C9>=50),0)) returns 510.

Why the last 0 matters: the #CALC! error

The third argument of FILTER is what to return when nothing matches. Microsoft’s FILTER function reference says an empty result without that argument gives a #CALC! error. So if every number in the range is negative, =SUM(FILTER(B2:B9,B2:B9>0)) shows #CALC! instead of 0. Adding ,0 as the last FILTER argument makes it return 0.

FILTER works in Excel for Microsoft 365 on Windows and Mac, Excel 2024, Excel 2021, and the iPad, iPhone and Android apps. It isn’t available in Excel 2019 or earlier. If you share the file with someone on an older version, use SUMIF.

Excel SUM and FILTER formula adding positive values
FILTER needs a fallback when nothing matches. The all-negative comparison uses G2:G9: no fallback gives #CALC!, while a final 0 returns 0.

Which method should you use?

SituationBest choice
Just add the positive numbersSUMIF
Condition in one column, numbers in anotherSUMIF with a sum range
Positive and one or more other conditionsSUMIFS
Older Excel and you want flexible logicSUMPRODUCT
Microsoft 365, 2021 or 2024 and you want to see the valuesFILTER
File shared with Excel 2019 or olderSUMIF, SUMIFS or SUMPRODUCT

SUMIF, SUMIFS and SUMPRODUCT also work in Excel for the web and Excel for Mac.

Sum only visible positive numbers

SUMIF adds matching cells whether they’re hidden or not. If you’ve filtered a list and only want the visible rows, filter the column to show values greater than zero (in the column’s filter menu, look under Number Filters; the exact labels can vary by version). Then use =SUBTOTAL(109,B2:B9), which adds only visible cells. Microsoft’s SUM function page recommends SUBTOTAL for summing visible cells.

Troubleshooting

  • The formula returns 0. Your numbers may be stored as text. SUMIF ignores text, and so does SUM. Look for numbers aligned to the left or a small green triangle in the cell corner, then convert them to numbers.
  • Excel says there’s a problem with the formula. Check the quotation marks around ">0". Without them, Excel can’t read the operator.
  • The total includes values it shouldn’t. Check that the range covers only the numbers you meant, and that the sum range lines up row for row with the criteria range.
  • SUMIFS returns #VALUE!. The ranges are different sizes. Make each criteria range match the sum range.
  • FILTER returns #CALC!. Nothing matched. Add 0 as the third FILTER argument.
  • The range contains errors such as #N/A. Fixing the source errors is the cleanest answer. In Microsoft 365, =SUM(FILTER(B2:B9,IFERROR(B2:B9>0,FALSE),0)) treats error cells as not matching and adds only the positive numbers. AGGREGATE with =AGGREGATE(9,6,B2:B9) sums while ignoring errors, but it adds negatives too, because it can’t apply a greater-than-zero test on its own.

For totals by group rather than by condition, Data > Subtotal adds a total for each group, and you can collapse the outline to show only the subtotals.

If your cells are marked by color rather than by value, see how to sum cells by color in Excel.

Need to flip the signs instead? See how to make a column negative in Excel.

Questions

How do I sum only negative numbers in Excel?

Flip the operator: =SUMIF(B2:B9,"<0"). In the example it returns -140. Wrap it in ABS, as in =ABS(SUMIF(B2:B9,"<0")), if you want the total shown as 140.

Does SUMIF count zero as a positive number?

No. ">0" skips zeros, and ">=0" includes them. Because zero adds nothing, both give the same total.

Can I sum positive numbers across a whole column?

Yes. =SUMIF(B:B,">0") works, and SUMIF ignores the blank cells and the text header. Avoid whole-column references in SUMPRODUCT, though, because Microsoft says they slow it down.

About the author

Matt Williams is the writer and editor behind TechInfoHome. He holds a degree in computer science and has more than 10 years of experience working in IT. More about TechInfoHome.