How to Create a Budget Formula in Excel
In this article
To create a budget formula in Excel, you build a small set of cells that hold your income and expense categories, then use simple arithmetic and SUM formulas to total each group and subtract expenses from income. The result is a live budget that updates the moment you change any number. You do not need a template or add-in: a blank workbook, a few column headers and the formulas below are enough.
What You'll Need
- Excel on Windows, macOS, or Excel for the web (the formulas are the same; menu labels can differ slightly by version, device and region).
- A blank workbook, or an existing one where you can add a new sheet.
- Your income and expense figures for one period (monthly is the most common). Estimates are fine to start.
- Basic familiarity with typing in a cell and pressing Enter.
Step-by-Step
- Set up four column headers. In row 1, type Category in A1, Type in B1, Planned in C1 and Actual in D1. The Type column lets you separate income from expenses without relying on the order of rows.
- Enter your categories. In column A, list each income source and expense on its own row, starting at A2. For example: Salary, Freelance, Rent, Groceries, Utilities, Transport, Savings. Keep one category per row; do not merge cells.
- Label each row's type. In column B, type Income next to income rows and Expense next to expense rows. Use exactly those two words so the formulas can match them.
- Fill in the Planned column. Enter the amount you expect for each category in column C. Enter numbers only, with no currency symbols or text; format the column as currency afterwards by selecting it and choosing a currency format from the Number group on the Home tab.
- Fill in the Actual column as you spend. Leave column D blank until money actually moves, then type the real figure. Blank cells count as zero in the formulas, so nothing breaks.
- Total planned income. Pick an empty cell below your list, for example F2, and type
=SUMIF(B2:B20,"Income",C2:C20). This adds every Planned amount whose Type is Income. Adjust the range end (B20, C20) to match your last row. - Total planned expenses. In F3, type
=SUMIF(B2:B20,"Expense",C2:C20). This adds every Planned amount marked as an Expense. - Calculate the planned balance. In F4, type
=F2-F3. A positive number means you plan to spend less than you earn; a negative number flags a shortfall before you spend anything. - Repeat for actuals. In G2 type
=SUMIF(B2:B20,"Income",D2:D20), in G3 type=SUMIF(B2:B20,"Expense",D2:D20), and in G4 type=G2-G3. These show what really happened. - Add a per-category difference. In E1 type Difference. In E2 type
=C2-D2and copy it down the column by dragging the fill handle (the small square at the bottom-right of the cell). Positive means you spent less than planned; negative means you overspent. - Check the totals reconcile. The sum of column C should equal F2 plus F3, and the sum of column D should equal G2 plus G3. If they do not, a row is probably missing a Type label or contains text instead of a number.
- Format for readability. Select the amount columns and apply a currency format, make headers bold, and freeze the top row with View > Freeze Panes > Freeze Top Row so headers stay visible as you scroll.
Common Mistakes
- Typing currency symbols into cells. "$1,200" is text, not a number, and SUMIF will ignore it. Enter 1200 and format the cell instead.
- Mismatched Type labels. "Income " with a trailing space, or "income" in lowercase, will not match the formula's "Income". Use one spelling consistently, or wrap the criteria in a function that ignores case and spacing.
- Ranges that stop short. If you add rows below B20 or C20, the SUMIF range will not include them. Either leave spare rows inside the range or extend the range reference.
- Mixing planned and actual in one column. Keeping them separate is what makes the difference column and both totals work.
- Hard-coding totals. Typing a total number instead of a formula means it will not update when a figure changes.
- Forgetting savings. Savings is an expense line in a budget formula; if you leave it out, the balance looks healthier than it is.
Tips
- Use a separate sheet per month and copy the formulas across, so each month keeps its own history.
- Turn your category list into an Excel Table (select the range, then Insert > Table). Tables expand automatically when you add rows, and structured references keep formulas readable.
- Add conditional formatting to the Difference column so negative values turn red: Home > Conditional Formatting > Highlight Cells Rules > Less Than, then enter 0.
- Use data validation on the Type column (Data > Data Validation, allow a list) so only Income and Expense can be entered.
- Round to whole currency units for planning; cents add clutter without changing decisions.
- Keep a small buffer category for irregular costs such as repairs or annual renewals.
Troubleshooting
- The SUMIF returns 0. Check that the Type column contains exactly the criteria word, that the sum range contains numbers rather than text, and that both ranges are the same height.
- You see #VALUE!. A cell in the sum range holds text, often a stray space or a currency symbol. Clear it and retype the number.
- The balance is wrong but the totals look right. Confirm the balance formula subtracts expenses from income, not the other way round, and that it points at the correct two cells.
- Copying a formula shifts the wrong references. Use absolute references with dollar signs (for example
$C$2:$C$20) when a range must stay fixed as you copy. - New rows are ignored. Extend the formula ranges or convert the list to a Table so ranges grow automatically.
- Numbers show as dates. Excel may reinterpret entries such as 1/2. Format the column as Currency or Number before typing.
Frequently Asked Questions
Can I build a budget formula without SUMIF?
Yes. If income and expenses are in separate blocks, a plain =SUM(C2:C10) for each block and a subtraction for the balance works. SUMIF is only needed when both types share one list.
Does this work in Excel for the web and Google Sheets?
The formulas are the same in Excel for the web. Google Sheets uses the same SUMIF syntax, though menu locations differ.
How do I budget for irregular expenses?
Add a category for them and enter a monthly average in Planned, then record the real amount in Actual when it occurs. The difference column will show the months you were over or under.
Why does my total not match the sum of the column?
Usually a row has no Type label or a number stored as text. Check both, then recalculate by pressing F9.
Can I add more months without rebuilding the formulas?
Yes. Copy the sheet, clear the Actual column, and keep the Planned figures as a starting point. Formulas copy with the sheet.