Spreadsheets

Compare this month with last month in a spreadsheet

Compare this month with last month by category in a spreadsheet using SUMIFS, EDATE with -1 and IFERROR, showing the change in rupees and in percent.

Editorial illustration for Compare this month with last month in a spreadsheet

To compare this month with last month, make a table with a row per category and columns for this month, last month, the change and the percentage change. Fill the two month columns with SUMIFS, using EDATE to step the start date back by one month, and wrap the percentage in IFERROR so a category with no spend last month does not show an error.

Set up the one input cell

Assume the expense log has dates in column A of a sheet called Log, categories in B and amounts in C, rows 2 to 500. On a new sheet, B1 holds the first day of the month you are looking at: type 01/09/2025, or use =DATE(YEAR(TODAY()),MONTH(TODAY()),1) so it always shows the current month. Categories go down column A from A4. Headers in row 3: Category, This month, Last month, Change, Change %.

What are the formulas?

This month, in B4:

=SUMIFS(Log!$C$2:$C$500,Log!$B$2:$B$500,$A4,Log!$A$2:$A$500,">="&$B$1,Log!$A$2:$A$500,"<"&EDATE($B$1,1))

Last month, in C4:

=SUMIFS(Log!$C$2:$C$500,Log!$B$2:$B$500,$A4,Log!$A$2:$A$500,">="&EDATE($B$1,-1),Log!$A$2:$A$500,"<"&$B$1)

Change, in D4: =B4-C4. Change percentage, in E4:

=IFERROR(D4/C4,"new")

The only difference between the two SUMIFS is the date window: this month runs from the input date to one month later, and last month from one month earlier up to the input date. EDATE with -1 steps back exactly one calendar month, so 1 October becomes 1 September regardless of how many days that month had. Format column E as a percentage. When C4 is 0, D4/C4 is a divide-by-zero error and IFERROR replaces it with the word new, which is more honest than showing 0%.

A worked example with invented numbers

CategoryThis monthLast monthChangeChange %
Groceries₹11,200₹9,800+₹1,40014.3%
Dining out₹3,600₹4,500-₹900-20.0%
Subscriptions₹650₹650₹00.0%
Travel₹4,800₹0+₹4,800new
Total₹20,250₹14,950+₹5,30035.5%

Check the arithmetic: groceries 1,400 divided by 9,800 is 0.143, so 14.3%. Dining out minus 900 over 4,500 is minus 20%. The totals row uses SUM on each column, and its percentage is 5,300 divided by 14,950, which is 35.5%, calculated from the totals rather than by averaging the row percentages.

The story is clear at a glance: the month is up ₹5,300, and ₹4,800 of it is one travel booking. Without the table you might have blamed groceries.

Is a mid-month comparison fair?

Not if you set it against a full previous month. On the 15th, this month has 15 days of spending and last month had 30. For a fair mid-month view, limit last month to the same day: in the last month formula, replace the end condition with "<="&EDATE(TODAY(),-1). Now both columns cover the first 15 days. Remember that the comparison is still rough, because rent and EMIs may fall on one side of the cut-off.

What if I add a new category?

Type its name in the next row of column A and copy the formulas down. If the sum of your category rows does not match the log total for the month, a category is missing from the list or spelled differently in the log. Add a check cell that subtracts the sum of this month's column from a plain SUMIFS for the month without a category.

How do I see the biggest movers first?

Sort the table by the Change column, largest first, after copying the formulas down. Sorting a range that contains formulas pointing to other rows is safe here because every formula refers to its own row and to the fixed input cell. Add a second view sorted by Change % only after you have read the rupee column; a 400 percent jump on a ₹50 item is noise, while a 12 percent rise on groceries may be real money.

Checklist

  • The input cell is a real first-of-month date.
  • Category names match the log exactly, including spaces.
  • Percentages are formatted as percentages and use IFERROR.
  • Mid-month, you are comparing like with like.

If you would rather not maintain this table, SpendixAI has reports and a Report builder you can filter and group; for anything you check with your accountant, download a CSV and verify against the statements.

SPENDIXAI JOURNAL

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

Explore your reports