# SUM in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/sum/

SUM adds every number in the values and ranges you give it. Text and blank cells inside a range are skipped, so one stray word does not break the total. Text typed directly as an argument is different and can return an error.

## Syntax

```
SUM(value1, [value2, ...])
```

## Arguments

- `value1` (any, required: yes): The first number, cell or range to add.
- `value2` (any, required: no): More numbers, cells or ranges. You can repeat this argument.

## Examples

The examples use this table, starting in A1:

| Product | Q1 | Q2 | Q3 |
|---|---|---|---|
| Pen | 10 | 20 | 5 |
| Pad | 4 | n/a | 8 |
| Ink | 2 | 7 |  |
| Tape | 6 | 3 | 9 |

```
=SUM(B2:B5)
```

Result: `22`

A column total. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SUM(B2:D2, 100)
```

Result: `135`

A row range plus a fixed number in the same call. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SUM(C2:C5)
```

Result: `30`

The text "n/a" inside the range is skipped. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SUM(B2:D5)
```

Result: `74`

A two-dimensional block. Blank cells count as nothing. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ROUND(SUM(B2:B5)/SUM(B2:D5), 3)
```

Result: `0.297`

Share of Q1 in the whole block, rounded to three decimals. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SUM(ARRAYFORMULA(IF(B2:B5>3, B2:B5, 0)))
```

Result: `20`

Sum only the values above 3. ARRAYFORMULA lets IF test every cell. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- Text inside a range is skipped silently. A column of numbers stored as text sums to 0, so check the result against COUNT.
- Text typed directly as an argument returns #VALUE!: =SUM(B2:B5, "n/a") fails, while the same word inside a range would be ignored.
- A number written in quotes is converted: =SUM("5", 1) returns 6. The same string inside a cell range is skipped, which makes the two cases easy to mix up.

## Compared with Excel

Same syntax and the same handling of text in ranges as Excel SUM.

## Questions and answers

### Why does SUM return 0 on a column that clearly has numbers?

The cells hold text, not numbers, so SUM skips them. Convert them with VALUE, or multiply the range by 1 inside ARRAYFORMULA.

## Related functions

- [SUMIF](https://goingstellar.ro/reference/sheets/sumif/)
- [SUMIFS](https://goingstellar.ro/reference/sheets/sumifs/)
- [SUMPRODUCT](https://goingstellar.ro/reference/sheets/sumproduct/)
- [SUBTOTAL](https://goingstellar.ro/reference/sheets/subtotal/)
- [AVERAGE](https://goingstellar.ro/reference/sheets/average/)
- [COUNT](https://goingstellar.ro/reference/sheets/count/)

## Sources

- [SUM (Docs Editors Help)](https://support.google.com/docs/answer/3093669)

