Sums and Counts

Why SUM Returns Zero When Numbers Look Right

SUM returning 0 often means numbers are stored as text, or calculation is set to manual, or the formula is shown as text. Here is how to check each one.

On this page
  1. Check whether the numbers are stored as text
  2. Fix numbers stored as text
  3. Remove hidden spaces
  4. Check calculation mode and formula display
  5. Check the range
  6. Find the hidden cause step by step

Check whether the numbers are stored as text

The most common cause is numbers that Excel reads as text. Text can’t be added, so SUM skips it, and if every value in the range is text, the total is 0. Signs of text numbers include:

  • numbers aligned to the left of the cell, not the right
  • a small green triangle in the corner of the cell
  • a cell that looks like a number but adds up to nothing

To test one cell, use =ISNUMBER(A2). It returns TRUE for a real number and FALSE for text.

To test a whole column, compare =COUNT(A2:A20) with =COUNTA(A2:A20). COUNT counts only real numbers, and COUNTA counts everything that isn’t empty. If COUNTA is higher, some of the cells hold text.

Fix numbers stored as text

  • Select the cells, click the warning icon, and choose Convert to Number.
  • Go to Data, then Text to Columns, and click Finish. This re-reads the cells, and it often converts text numbers without any other change.
  • Multiply by 1 with Paste Special. Copy a cell containing 1, select the text cells, choose Paste Special, then choose Multiply.
  • In a helper column, use =VALUE(A2) and copy the results across.

Remove hidden spaces

Numbers exported from other systems often carry trailing spaces or non-breaking spaces. TRIM removes ordinary spaces but not the non-breaking kind. This formula removes the non-breaking spaces, and the result can then be converted to a number:

=SUBSTITUTE(A2, UNICHAR(160), "")

How to remove non printing characters in excel covers other hidden characters you may run into.

Check calculation mode and formula display

  • Manual calculation. If formulas stop updating, go to Formulas, then Calculation Options, and choose Automatic. In manual mode, press F9 to recalculate.
  • Formula shown as text. A formula typed into a cell formatted as Text appears as text and doesn’t calculate. Change the format to General, then press F2 and Enter.
  • Show Formulas switched on. The sheet displays formulas instead of results. Turn it off on the Formulas tab, or press Ctrl plus the grave accent key, which sits above Tab.

Check the range

SUM adds only the cells in its range. If the data runs to row 25 and the formula stops at row 20, the rest doesn’t count. Click into the formula and check the highlighted range. A reference to an empty area also returns 0, so confirm the range points to the sheet and column you meant.

If a range contains an error such as #N/A, SUM returns that error rather than 0, so look for one if the result is an error instead of a number.

Find the hidden cause step by step

When none of the checks above explain the result, Evaluate Formula on the Formulas tab steps through the calculation one part at a time. How to use evaluate formula in excel shows how to read each step.

The complete guide to sums and counts

How to Sum and Count in Excel
Read the guide

Keep exploring

Guides from other topics

All topics →

How to Look Up Data in Excel

How lookups work in Excel, with VLOOKUP, XLOOKUP and INDEX with MATCH, how to set up your data, and how to choose the right function for the job.

Lookups 3 min read