🧾 Building a UK tax calculator
The UK tax system is surprisingly complex. Between income tax bands (which differ in Scotland), National Insurance, student loan repayments, dividend tax, and capital gains tax, it’s hard to get an intuitive sense of what you actually take home. And then there’s the infamous 60% effective marginal rate trap between £100k-£125k where your personal allowance tapers away.
I built a web app that calculates all of this in one place.
What it covers
- Income tax with both English/Welsh and Scottish rate bands
- National Insurance contributions
- Student loan repayments across all plan types, with a loan repayment optimiser that models different payoff scenarios
- Dividend tax with the dividend allowance
- Capital gains tax with the annual exemption
The app includes a marginal tax rate graph that clearly shows the 60% trap zone — which I think is one of the most useful visualisations for anyone earning in that range. It also has a “thoughts” section with a guide to student loans, because the interaction between loan repayments and tax is something most people don’t understand well.
Stack
Flask with Jinja2 templates, deployed on Render with Docker and Gunicorn. The tax calculations are all server-side Python, which makes it easy to update when HMRC changes the rates each year.
Tech: Python (Flask), Gunicorn, Docker, deployed on Render.