Spending Analyzer
A local Python tool that combines bank CSVs into monthly Excel and HTML reports, with spending broken down by category and who it was for.
- Python
- CSV
- openpyxl
Why I made it
When I’m cutting it close at the end of the month, I want to know where my money actually went. I’ve got five accounts to check, and somewhere in there is a cash deposit from my parents paying me back for a bill, a few things my sister put on my card, and a gift I bought her just because. Did I get back as much as I covered? And how much did I spend on her in the first place? I was curious about both.
I thought about setting up something like Rocket Money, then decided to build a tool in Python around the questions I actually had. I wanted to put all five accounts in one place and sort things in a way that made sense to me. I still have to remember what that random cash deposit was for. I can do the sorting myself and keep it all on my computer, which is where I want my financial data to stay.
What it does
I drop the bank exports into a folder and run the tool from the terminal. It combines the different formats into one set of transactions. I wanted to be able to check in whenever I felt like it, so if a newer export overlaps with an older one, the same purchase only counts once.
Then I go through the purchases it still needs help sorting. I can pick a category, say who it was for, or split one receipt between groceries and a gift. I’ll save a rule for something predictable, like a monthly bill. For a store where I buy a little of everything, I can make the choice just for that purchase.
I get a monthly report I can open in Excel or in my browser. I usually want the quick view first: what I spent, who it was for, and how much I got back. In Excel I can also look up the individual purchases behind those totals. The reimbursement comparison is an estimate across the month. A cash deposit gives me a number to work with, but it doesn’t tell me which bill it covered.
I also added profiles so I can run reports for a different set of accounts without mixing the transactions or the rules I use to sort them.
What I might try next
I’ve been thinking about an interface where you swipe to sort purchases, kind of like a dating app. For now, I can already see how much I spent on myself and how much I covered for someone else without going through five statements again.