Spreadsheets

Running total of expenses in Excel (cumulative sum)

Add a running total of expenses in Excel with =SUM($E$2:E2), the =E2+F1 alternative and a table formula that extends itself when you add rows.

Editorial illustration for Running total of expenses in Excel (cumulative sum)

A running total in Excel is a column where each row shows the sum of all amounts up to that row. The standard formula, in the first result row, is =SUM($E$2:E2), where the dollar signs lock the starting cell. Copy it down and each row's range grows by one. An Excel table extends the formula automatically when you add new rows.

The anchored-range formula

Suppose amounts are in column E, with headers in row 1, and you want the running total in column F. In F2:

=SUM($E$2:E2)

Copy it down. In F3 it becomes =SUM($E$2:E3), in F4 =SUM($E$2:E4), and so on. The first cell reference is anchored with dollar signs, so it always starts at E2; the second moves with the row. Each row therefore adds everything from the top to itself. This formula is hard to break, because every result is recalculated from the amounts and does not depend on the cell above.

Is there a simpler formula, =E2+F1?

Yes, and it adds the current amount to the previous running total. The catch is the first row. If F1 is a header such as Running total, E2+F1 returns a #VALUE! error, because you cannot add text. Use =E2 in F2, then =E3+F2 in F3 and copy that down. Alternatively, write =E2+N(F1) in every row: N returns 0 for text, so the same formula works from the first row. The weakness of this method is the chain: delete or overwrite one cell in the column and every row below it inherits the error.

How do I keep the column filled as I add rows?

Convert the range to an Excel table with Insert, then Table, and tick that your table has headers. In a table, type the formula once in the first data row. Excel fills the whole column and extends it automatically for new rows. In a table, a common form of the running total is:

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

INDEX([Amount],1) is the first amount in the column, and [@Amount] is the amount in this row; the colon joins them into a range that grows by one row at a time. If you prefer ordinary cell references inside a table, the =SUM($E$2:E2) version still works.

What about blank rows and running totals by category?

To hide the running total on rows with no amount, use:

=IF(E2="","",SUM($E$2:E2))

For a running total within each category, say categories in column B, use SUMIFS with an anchored first row:

=SUMIFS($E$2:E2,$B$2:B2,B2)

It adds only the amounts so far in the same category as this row. Hypothetical example of five rows:

RowCategoryAmountRunning totalCategory running total
2Groceries₹1,250₹1,250₹1,250
3Fuel₹640₹1,890₹640
4Groceries₹2,100₹3,990₹3,350
5Fuel₹380₹4,370₹1,020

Check by hand: 1,250 + 640 = 1,890; plus 2,100 = 3,990; plus 380 = 4,370. Groceries so far is 1,250 + 2,100 = 3,350, and fuel is 640 + 380 = 1,020.

What can go wrong?

  • Numbers stored as text, shown with a green corner or left-aligned, are ignored by SUM, so the running total stalls.
  • Refunds typed as positive numbers add to the total; enter them as negatives.
  • Filtering hides rows but SUM still includes them. Use SUBTOTAL(9,$E$2:E2) if you want a running total of visible rows only.

Before you finish

  1. Check that the last running total equals =SUM(E2:E500).
  2. Format the column with a number format that suits rupees.
  3. Freeze the header row so it stays in view.

When the sheet gets long enough that you are mostly copying statement lines into it, SpendixAI can import those statements and keep the transactions together, with CSV download for a sheet like this.

SPENDIXAI JOURNAL

Useful ideas start with a clearer picture of your own spending.

Explore your reports