Spreadsheet Practice

How to calculate a running total in Excel

Formula (Excel and Google Sheets)

=SUM($B$2:B2)

Sum from a locked first cell to the current row, =SUM($B$2:B2), and fill it down. The range grows by one row each time.

Result on the example
one result per row in C2, filled down to C7
Works in
Every current version
Google Sheets
Same formula

See it work

The formula is already in C2, filled down to C7. Change any input and the result updates, or edit the formula to experiment.

How it works

The dollar signs lock the start of the range at $B$2, while the end, B2, moves when you fill down. Row 3 becomes =SUM($B$2:B3), row 4 =SUM($B$2:B4), and so on, so each row adds everything up to itself.

=SUM($B$2:B2)

Result18400

  1. $B$2:B2$18,400

    A range: one cell.

  2. SUM($B$2:B2)18400

    SUM: Adds numbers and ranges. Skips text and blanks.

    • number1$B$2:B2$18,400

In Google Sheets

The same formula works in Google Sheets: =SUM($B$2:B2). We ran it in Google Sheets mode on the same data and it returns the same results.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=SUM(B$2:B2)$18,400, $40,350, $60,150…Locking only the row is enough when you fill down a single column.

Common mistakes

  • =SUM(B2:B2) without $ shifts both ends when filled, so every row shows only its own value.
  • The pattern =C1+B2 also works but breaks if row 1 holds a header; start it as =B2 in the first row.

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.

Calculate a running total

In C2, write a running total of revenue and fill it down to C7.

Questions

How do I make a running total that resets each month or category?

Use SUMIFS with the growing range: =SUMIFS($B$2:B2,$A$2:A2,A2) adds only earlier rows with the same category.

How do I do a running count instead?

Use =COUNTA($A$2:A2) or =COUNTIF($A$2:A2,A2) for a count per value.

Checked by running on 2026-10-29: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.