Home / Tools / Sum a column in Google Sheets
Formula generator Google Sheets + Excel

Sum a column in Google Sheets

Three formulas answer “total this column”, and the right one depends on how your sheet grows and whether a filter is on. Try each one on the sample column below, copy the one that matches your sheet, and see the result update live.

Interactive sum generator

The column is already populated and overflowing. Adjust the end row, toggle the filter, and watch the three totals disagree — then copy the formula that matches your sheet.

The three formulas

1. Fixed range

The classic. Exact range, nothing surprising — best when the data is done growing.

2. Whole column, growing

Open-ended: rows added later join the total automatically. Starts at B2 so a header never sneaks in.

3. Visible rows only

For filtered sheets: 109 makes SUBTOTAL skip the rows the filter hides.

The three ways to total a column

Your situationFormulaWhy this one
Fixed list, you know the last row=SUM(B2:B100)The one everybody learns first — exact range, nothing surprises you
Data keeps growing=SUM(B2:B)Open-ended range: new rows are added to the total automatically
The sheet is filtered=SUBTOTAL(109,B2:B)Adds only the rows your filter leaves visible

All three ignore text cells, so a text header never breaks them. The difference is what happens when rows are added or hidden — pick the row that matches your sheet and copy the formula.

Why B2:B beats B:B (the header-row trap)

=SUM(B:B) includes row 1, and text headers are usually just ignored. The trap fires when the header is numeric — a column headed 2026, or a report pasted under a numeric label — and suddenly your total is off by exactly one cell. =SUM(B2:B) starts below the header, so the header can never join the sum.

SUBTOTAL 9 vs 109 — the hidden-row difference

CodeHidden by filterHidden manually
9excludedincluded
109excludedexcluded

Both codes skip rows hidden by a filter. The 100-series (109) also skips rows you hid by hand (right-click → Hide row). If your subtotal should ignore everything you cannot see, use 109.

SUM returns 0: numbers stored as text

Numbers pasted from a PDF, a bank export, or another locale often arrive as text, and =SUM silently skips them. The cell usually shows a green triangle. Convert with =VALUE(B2), or select the column and use Data → Split text to columns to force the conversion. The same trap hits a column of formulas you pasted back as values from another sheet.

Go further: conditions and practice

Related guides & practice

FAQ

How do I SUM an entire column in Google Sheets?

Type =SUM(B2:B) in the cell under your data — it totals from B2 down to the last row and automatically includes every row you add later. =SUM(B:B) also works, but starting at B2 is safer when row 1 is a text header like “Amount”.

Why is my SUM returning 0 in Google Sheets?

The “numbers” are stored as text. =SUM ignores text values, so it returns 0. Fix it with =VALUE(B2) in a helper column (then paste the values back) or multiply the range by 1. A green triangle in the cell corner is the tell.

How do I sum only the visible rows after filtering?

Use =SUBTOTAL(109, B2:B) instead of SUM. Function code 109 adds only the rows your filter leaves visible; =SUM keeps counting the hidden rows, which is why a filtered report still shows the full-column total.

What is the difference between =SUM(B:B) and =SUM(B2:B)?

=SUM(B:B) includes row 1. If your header is text, Google Sheets usually ignores it — but if the header is a number (like a year), it gets added to the total. Starting the range at B2 skips the header row entirely.

How do I add a column in Google Sheets?

Right-click the column letter and choose “Insert 1 column left” (or “right”). That inserts an empty column — to total it, put =SUM(B2:B) in a cell under the new data.