Formula Fixer

Running Total in Excel and Google Sheets: Cumulative Sum, by Category and by Month

Updated 2026-11-27

TL;DR: For a running total, put =SUM($B$2:B2) in C2 and fill down: the locked first cell keeps the start fixed while the end moves. For a running total by category use =SUMIFS($B$2:B2,$A$2:A2,A2). In Excel 365 and Google Sheets, =SCAN(0,B2:B100,LAMBDA(a,v,a+v)) returns the whole column from one formula.

A running total (or cumulative sum) shows the total so far on each row. It's what turns a list of expenses into a running balance, or monthly sales into year-to-date figures.

The classic formula

Amounts in B2:B13. In C2:

=SUM($B$2:B2)

Fill down. In C3 it becomes =SUM($B$2:B3), in C4 =SUM($B$2:B4), and so on. The dollar signs lock the first cell; the second reference moves with each row.

An alternative many people use is “previous total plus this row”: put =B2 in C2 and =C2+B3 in C3, then fill down. It's simple, but it breaks if you delete a row, so the SUM version is safer.

Running balance (opening balance, money in and out)

Opening balance in F1, money in column B and money out in column C:

D2:  =$F$1+SUM($B$2:B2)-SUM($C$2:C2)

This is the layout most bank exports use. If your export has one Amount column with negatives for spending, it's just =$F$1+SUM($B$2:B2).

Running total by category

Category in column A, amount in B. To show the running total for each category separately:

=SUMIFS($B$2:B2,$A$2:A2,A2)

Each row only adds earlier rows with the same category. Handy for gift spend per person or budget lines; see the Christmas budget tracker.

Running total that resets each month

Dates in A (sorted oldest first), amounts in B:

=SUMIFS($B$2:B2,$A$2:A2,">="&EOMONTH(A2,-1)+1)

EOMONTH(A2,-1)+1 is the first day of that row's month, so the total starts again on the 1st. For a year-to-date figure, swap in DATE(YEAR(A2),1,1).

One formula for the whole column (Excel 365 and Google Sheets)

=SCAN(0,B2:B100,LAMBDA(total,value,total+value))

SCAN walks down the range, carrying the total. It spills into the cells below, so leave them empty. Blank rows at the end just repeat the last total; trim the range or wrap it in IF(B2:B100="","",...).

In an Excel table

If your data is a formatted Table (Ctrl+T) with a column named Amount:

=SUM(INDEX([Amount],1):[@Amount])

This stays correct when new rows are added to the table.

With a pivot table

Right-click a value in the pivot → Show Values As → Running Total In, and choose the date field. Google Sheets doesn't offer that option in pivots, so use SUMIFS or SCAN next to the pivot instead. New to pivots? See pivot tables for beginners.

Common problems

Quick FAQ

What is the formula for a running total in Excel? =SUM($B$2:B2) in the first row, filled down.

Does Google Sheets have a running total function? There's no RUNNINGTOTAL function, but SCAN does it in one formula, and =SUM($B$2:B2) works the same as in Excel.

How do I make a running total by group? Use =SUMIFS($B$2:B2,$A$2:A2,A2), where A holds the group name.

How do I show a running percentage of the total? Divide the running total by the grand total: =SUM($B$2:B2)/SUM($B$2:$B$13), formatted as a percentage. See percentage formulas.

Not sure what the $ signs do? Read absolute references ($A$1) explained.

Track spending against a plan with our 2027 budget spreadsheet.

Totals a cent out? Read why formatting is not rounding.

Put it to work: a 52-week savings challenge tracker is a running total with dates.

Sources: Microsoft Support: SCAN function; Microsoft Support: SUMIFS.

Prefer a ready-made file?

Templates we sell: see all downloads and prices.

← More guides