How to Track Expenses in Google Sheets (Formulas Included)
To track expenses in Google Sheets, keep one tab as a transaction log (date, description, category, amount, account), add dropdowns so every category is spelled the same way, and total each category by month with SUMIFS. A filter view lets you dig into one category without disturbing the log, and a pivot table builds a month-by-category summary in a few clicks.
This guide shows how to track expenses in Google Sheets from a blank file, with every formula written out in full and notes for Excel where it differs. If you also want monthly targets and budget vs actual columns, how to make a budget spreadsheet covers that layout, and the totals you build here feed straight into it.
How to Track Expenses in Google Sheets: Set Up the Log
Create a new spreadsheet with three tabs named exactly Log, Lists and Summary, so the formulas below work as written. On Log, type these headers in row 1:
| Column | Header | What goes in it |
|---|---|---|
| A | Date | The day you paid |
| B | Description | Store or payee, such as “Grocery store” |
| C | Category | Picked from a dropdown |
| D | Amount | A positive number, no currency sign typed |
| E | Account | Picked from a dropdown |
Then format the tab:
- Freeze the header row with View > Freeze > 1 row.
- Select column A and choose Format > Number > Date.
- Select column D and choose Format > Number > Currency.
On Lists, put your categories in column A starting at A2, and your accounts (checking, credit card, cash) in column B starting at B2. Ten to fifteen categories is plenty to start. Our budget categories guide has a full list to choose from.
Log spending as positive numbers. When you pay a credit card bill, do not log the payment as an expense, because you already logged each purchase. How to budget with credit cards explains the double-counting trap.
Categorize Expenses in Google Sheets With Dropdowns
SUMIFS ignores capital letters but not spelling, so “Dining out”, “Eating out” and “Dinning out” land in three different totals. A dropdown makes that impossible.
- On Log, select C2:C1000.
- Choose Data > Data validation, then Add rule.
- Under Criteria, choose “Dropdown (from a range)” and enter
Lists!$A$2:$A$30. - Open Advanced options, set “If the data is invalid” to “Reject the input” and click Done.
- Repeat for E2:E1000 with
Lists!$B$2:$B$10.
Two more rules keep the numbers clean. For A2:A1000, add a rule with the criteria “Is valid date” and reject invalid input, so a typo like 1/32 cannot slip in. For D2:D1000, use “Greater than” with a value of 0.
To log quickly, press Ctrl+; (Cmd+; on a Mac) in the date column to insert today’s date, and start typing a category in the dropdown cell to narrow the list.
In Excel: choose Data > Data Validation, set Allow to List and Source to =Lists!$A$2:$A$30. Keep the Stop style on the Error Alert tab to reject anything not on the list. Excel shows empty entries at the bottom of the dropdown if the source range is longer than your list, so size the range to fit.
Google Sheets Expense Formulas: SUMIFS by Month and Category
On Summary, build a grid with categories down column A and months across row 1:
- In A2 and below, type your categories, or enter
=Lists!A2and fill down. - In B1, type the first day of your first month, such as 1/1/2026.
- In C1, enter
=EDATE(B1,1)and fill right to M1 for 12 months. - Select B1:M1, choose Format > Number > Custom date and time, and pick a month-and-year format.
Then enter this in B2 and fill it across and down:
=SUMIFS(Log!$D:$D,Log!$C:$C,$A2,Log!$A:$A,">="&B$1,Log!$A:$A,"<"&EDATE(B$1,1))
It adds up column D where the category matches the row and the date falls on or after the first of the month but before the first of the next month. The dollar signs keep the log columns fixed while the category and month shift as you copy. Testing for “before the next month” instead of “on or before the last day” means 28, 30 and 31 day months all work without changes.
A few more formulas worth adding, all identical in Excel:
- Monthly total, with ten categories in rows 2 to 11:
=SUM(B2:B11)in B12 - Year to date for a category, in column N:
=SUM(B2:M2) - Spending so far this month:
=SUMIFS(Log!D:D,Log!A:A,">="&EOMONTH(TODAY(),-1)+1,Log!A:A,"<="&TODAY()) - Rows with no category yet:
=COUNTIFS(Log!A:A,"<>",Log!C:C,"")
Check the last one before any review: anything above 0 means a transaction is not counted in any category.
Google Sheets also has QUERY, which builds a sorted summary of one month in a single formula:
=QUERY(Log!A1:E,"select C, sum(D) where A >= date '2026-01-01' and A < date '2026-02-01' group by C order by sum(D) desc label sum(D) 'Spent'",1)
Excel has no QUERY function. Use the pivot table below instead.
Worked Example: The Log and the Summary
Here are the first ten rows of a log, with example amounts:
| Date | Description | Category | Amount | Account |
|---|---|---|---|---|
| 1/2/2026 | Grocery store | Groceries | $86.40 | Credit card |
| 1/3/2026 | Gas station | Gas | $42.10 | Credit card |
| 1/9/2026 | Pizza night | Dining out | $31.75 | Credit card |
| 1/14/2026 | Grocery store | Groceries | $112.35 | Debit card |
| 1/20/2026 | Pharmacy | Health | $18.99 | Debit card |
| 1/27/2026 | Coffee shop | Dining out | $6.50 | Cash |
| 1/31/2026 | Gas station | Gas | $38.25 | Credit card |
| 2/1/2026 | Grocery store | Groceries | $94.80 | Credit card |
| 2/6/2026 | Gas station | Gas | $39.60 | Credit card |
| 2/13/2026 | Restaurant | Dining out | $58.20 | Credit card |
The Summary tab returns:
| Category | Jan 2026 | Feb 2026 |
|---|---|---|
| Groceries | $198.75 | $94.80 |
| Dining out | $38.25 | $58.20 |
| Gas | $80.35 | $39.60 |
| Health | $18.99 | $0.00 |
| Total | $336.34 | $192.60 |
The gas purchase on January 31 lands in January and the groceries on February 1 land in February, which is the month test in the formula doing its job. February keeps filling in as you log.
Use a Filter View to Dig Into One Category
A regular filter hides rows for everyone who opens the file. A filter view is saved under a name and changes only what you see, which matters if you share the tracker with a partner.
- Click any cell in the Log data.
- Choose Data > Filter views > Create new filter view.
- Click the name in the bar at the top of the sheet and call it “Dining out, largest first”.
- Click the filter icon in the Category header, choose Filter by values, click Clear, tick Dining out and click OK.
- Click the filter icon in the Amount header and choose Sort Z → A.
- Close the view with the X at the right of the bar, and reopen it any time from Data > Filter views.
Make a few you will reuse: one per credit card, one for purchases over $100 (Filter by condition > Greater than) and one for the current month.
In Excel: Data > Filter adds the same header buttons. In a file shared through Microsoft 365, View > Sheet View > New keeps your sorting and filtering from changing what others see.
Build a Pivot Table for a Month-by-Category Summary
The Summary tab gives you fixed rows you control. A pivot table is the quick alternative when you want to slice the log a new way without writing formulas.
- Click any cell in the Log data and choose Insert > Pivot table.
- Check that the data range reads Log!A1:E1000, choose New sheet and click Create.
- In the editor, click Add next to Rows and choose Category.
- Click Add next to Columns and choose Date.
- Click Add next to Values and choose Amount, summarized by SUM.
- Right-click any date in the pivot table and choose Create pivot date group > Year-Month, so the dates collapse into months.
- Under Rows, set Sort by to SUM of Amount and the order to Descending, so your biggest category sits on top.
Add Account under Filters to see spending on one card at a time. The pivot table updates as you add rows inside its data range. If the empty rows at the bottom of the log show up as a blank row, add Category under Filters and untick the blank value.
In Excel: choose Insert > PivotTable, then drag Category to Rows, Date to Columns and Amount to Values. Recent versions group dates into months on their own; if yours does not, right-click a date and choose Group, then Months and Years. Excel pivot tables do not update by themselves, so use Data > Refresh All after logging. Formatting the log as a table first (Ctrl+T) makes new rows part of the source automatically.
If you would rather skip the build, our budget spreadsheet has a variable transactions log with sort and filter that feeds twelve monthly tabs for you. And if you are still deciding between a sheet and an app, see budget spreadsheet vs budgeting app.
Log every purchase for two full weeks before you judge your categories. Then merge any category with only one or two entries into its neighbor, and bring the Summary tab to your monthly budget review.
This guide is general information to help you organize your money, not financial advice. For decisions about debt relief, taxes or investing, talk to a qualified professional.
Frequently asked questions
Can I track expenses in Google Sheets on my phone?
Yes. The Google Sheets app for Android and iPhone lets you add rows and pick from your dropdowns. Typing is slower than on a computer, so log quickly on the go and tidy up on a computer once a week.
Should I log income in the same sheet as expenses?
You can. Add a Type column with an Income or Expense dropdown and add Type as one more condition in each SUMIFS. If you only have one or two paychecks, a separate income tab is simpler.
How do I import bank transactions into Google Sheets?
Most banks let you download transactions as a CSV file. In Google Sheets, use File > Import, copy the rows into your log and pick a category for each one, because the bank's categories will not match your dropdown.
Should I use SUMIF or SUMIFS for expenses?
Use SUMIFS. SUMIF takes one condition, while SUMIFS takes several, which you need to total one category within one month. The argument order differs: SUMIFS puts the range you add up first.