Build a Simple Household Budget Calculator with GitHub Copilot
Write a small calculator that adds your monthly expenses — Copilot helps you write the code, line by line.
This guide was written by AI. It passed automated fact and quality checks, and our editor spot-checks published guides every day.
See AI World HQ first on GoogleAdd us as a preferred source and our stories show up higher in Google’s Top Stories.Add on GoogleYou don't need a programming background for this one. Think of Copilot like a friend sitting next to you: you describe what you want in plain English, and it drafts the code. You review it, change a few numbers, and run it. By the end you'll have a small file on your computer that adds up any list of expenses you give it.
💡 Tip: tap a step’s number when you finish it — a green tick appears and your browser remembers how far you got.
- A GitHub account (free at github.com — you'll need it to sign into Copilot).
- Visual Studio Code, a free code editor from Microsoft (download and install it like any other program). It works on Windows, Mac and Linux.
- The GitHub Copilot extension installed inside VS Code and signed in. A free tier exists; paid tiers give higher usage limits. Check the current plans on GitHub's official pricing page.
- Python installed on your computer (free from python.org) — needed only if you want to run the calculator yourself. If you'd rather not install anything, you can paste the code into a free online Python runner instead.
- About 15–20 minutes total.
- Forgetting to save before running. The terminal reads the file from disk, not what you see on screen. If you change the numbers but don't save, you'll keep getting the old total. Press Ctrl+S (or Cmd+S on Mac) every time you edit, then run again.
- Missing a comma or a bracket in the list. Python lists need commas between numbers and matching square brackets. Without them, you'll see a red "SyntaxError" in the terminal. Check that every number except the last has a comma after it, and that you have both an opening [ and a closing ].
- Asking Copilot something it can't actually do here. Copilot is great at writing small code snippets like this, but it can't pull your real bank statements, read your email receipts, or do your taxes. Use this calculator for rough monthly planning, and a real budgeting app if you want automatic tracking.
Open VS Code, create a new file called budget.py, and type this exact comment: # A simple budget calculator that adds monthly expenses and prints a total. Then pause for a second. Watch what Copilot suggests in gray — press Tab to accept it, and you have a working starter in under a minute.
❓ Quick questions
How long does this take?
About 6 minutes — the guide has 6 steps, and you can tick each one off as you go.
Which tool do I need?
This guide uses GitHub Copilot — but the approach works very similarly in other AI assistants.
Do I need to prepare anything?
- A GitHub account (free at github.com — you'll need it to sign into Copilot).
- Visual Studio Code, a free code editor from Microsoft (download and install it like any other program). It works on Windows, Mac and Linux.
- The GitHub Copilot extension installed inside VS Code and signed in. A free tier exists; paid tiers give higher usage limits. Check the current plans on GitHub's official pricing page.
- Python installed on your computer (free from python.org) — needed only if you want to run the calculator yourself. If you'd rather not install anything, you can paste the code into a free online Python runner instead.
- About 15–20 minutes total.
What mistakes should I avoid?
- Forgetting to save before running. The terminal reads the file from disk, not what you see on screen. If you change the numbers but don't save, you'll keep getting the old total. Press Ctrl+S (or Cmd+S on Mac) every time you edit, then run again.
- Missing a comma or a bracket in the list. Python lists need commas between numbers and matching square brackets. Without them, you'll see a red "SyntaxError" in the terminal. Check that every number except the last has a comma after it, and that you have both an opening [ and a closing ].
- Asking Copilot something it can't actually do here. Copilot is great at writing small code snippets like this, but it can't pull your real bank statements, read your email receipts, or do your taxes. Use this calculator for rough monthly planning, and a real budgeting app if you want automatic tracking.
Keep reading
✦ Generated by AI in AI World HQ's automated newsroom, written in plain language. Checked by automated fact and quality gates, and our editor spot-checks published guides every day. Spot a mistake? Use the buttons above.
📘 Prefer it in one file? Home and Family: The AI Pack (20 guides, free printable PDF)
← Back to all stories
