Best Deal Financial Planning PRO Bundle
✓ Financial Planning✓ Net Worth Tracker✓ Monthly Budgeting✓ Travel Budget Planner✓ Annual Budgeting Planner
View Details →
beginner Budgeting

Sum Expenses by Category

Add up all transactions that match a specific category, like "Groceries" or "Entertainment".

Formula
=SUMIF(category_range, "Category Name", amount_range)

How It Works

SUMIF adds up values in one range based on a condition in another range. For budgeting, this means you can total all expenses that match a specific category.

Syntax

=SUMIF(range, criteria, sum_range)
  • range: The cells containing categories (e.g., A2:A100)
  • criteria: The category to match (e.g., “Groceries”)
  • sum_range: The cells containing amounts to sum (e.g., B2:B100)

Example

TransactionCategoryAmount
WalmartGroceries$85.50
NetflixEntertainment$15.99
Trader Joe’sGroceries$62.30
Electric billUtilities$120.00

Formula: =SUMIF(B2:B5, "Groceries", C2:C5)

Result: $147.80

Variations

Case-Insensitive Match

=SUMIF(B:B, "groceries", C:C)

Google Sheets SUMIF is case-insensitive by default.

Using a Cell Reference

=SUMIF(B:B, E1, C:C)

Where E1 contains the category name - useful for dropdown menus.

Partial Match with Wildcards

=SUMIF(B:B, "*Food*", C:C)

Matches any category containing “Food” (e.g., “Fast Food”, “Food Delivery”).

Pro Tips

  1. Use named ranges for cleaner formulas: =SUMIF(Categories, "Groceries", Amounts)

  2. Lock ranges with $ when copying: =SUMIF($B$2:$B$100, D2, $C$2:$C$100)

  3. Combine with data validation for consistent category names

Common Errors

  • #VALUE!: Ranges have different sizes - make sure category_range and sum_range have the same number of rows
  • Returns 0 unexpectedly: Check for typos or extra spaces in category names

Want More Than a Formula?

Our premium spreadsheet templates do the heavy lifting for you - with automatic calculations, visual charts, and everything pre-built. One-time purchase, no subscriptions.

Private & secure

Your financial data stays on your device. We never see it.

Learn more →

Need help?

Check our guides or reach out with questions.

View FAQ →