In Google Sheets you can total a month's spending by category and chart it with one QUERY formula, no pivot table needed. QUERY reads your transaction list, groups by category, adds the amounts and hands back a small table that a column chart can use directly.
What your sheet needs
Set up three columns with headings in row 1: Date in A, Category in B, Amount in C. Dates must be real dates, not text, and amounts must be numbers. If a bank export arrives with text dates, select the column and apply a date format; if the cells are left-aligned, they are still text.
The formula
Put this in E1, with the month start date in H1 as a real date:
- =QUERY($A$1:$C$500,"select B, sum(C) where A >= date '"&TEXT($H$1,"yyyy-mm-dd")&"' and A < date '"&TEXT(EDATE($H$1,1),"yyyy-mm-dd")&"' group by B order by sum(C) desc label sum(C) 'Total'",1)
- The last argument, 1, tells QUERY that row 1 holds headings.
- The result is already sorted from largest to smallest.
- If your spreadsheet locale uses decimal commas, Google Sheets may ask for semicolons between the arguments instead of commas. Follow the formula bar.
A worked month in euros
Say a month's spending came to €1,400. These are invented figures.
| Category | Amount (€) |
|---|---|
| Rent | 720 |
| Food | 340 |
| Leisure | 110 |
| Other | 100 |
| Transport | 60 |
| Health | 45 |
| Phone | 25 |
| Total | 1,400 |
Check: 720 + 340 + 110 + 100 + 60 + 45 + 25 = 1,400.
Turn it into a chart
- Select the QUERY output, headings included.
- Choose Insert, then Chart. Sheets usually guesses a column chart, which is a good fit.
- In the chart editor, check that the first column is used as the labels.
- Set the title to the month, and remove the legend, as there is only one series.
Why does the chart show a strange number?
Most often the Amount column contains a few values stored as text, so sum() ignores them, or a negative refund pulls a category down. Use ISNUMBER on a sample cell to test, and decide whether refunds belong inside the category, which is usually the cleaner choice.
Keeping the source data clean
QUERY is only as good as the data under it. Most problems are small and repeat every month, so a short habit pays off.
- Format column A as a date and column C as a number before you paste.
- Trim stray spaces in category names, since Food and Food with a trailing space are different to QUERY.
- Keep one header row only. If you paste several exports, remove the repeated header lines.
- Use a dropdown list in the Category column through Data validation, so spellings stay consistent.
A last point on presentation: put the month and the total in the chart title, and write the unit on the axis, for instance euros, so that nobody has to guess. If the largest category is rent and it dwarfs everything else, consider a second chart with rent left out, so the flexible spending becomes readable. Two small charts beside one another are clearer than one chart that tries to show everything. You can build the second from the same QUERY by adding a where clause that excludes the housing category.
What about spending in several currencies?
If you pay in more than one currency, convert each line to one currency in a helper column before charting, and note the rate you used. Do not add euros to other currencies in one column. SpendixAI offers per-expense currencies with a base currency, but it is built around India and rupees, so for a euro budget a sheet like this one is the practical route.
Useful ideas start with a clearer picture of your own spending.
Explore your reports

