A web application and REST API for calculating UK tax and National Insurance.
๐ Live demo: https://tax.log7.uk/calculator/
- โก๏ธ Modern responsive web interface (Bootstrap 5)
- ๐ฌ๐ง England, Wales & Scotland support (regional tax bands)
- ๐ Calculate for multiple tax years (rates in DB, not hardcoded)
- ๐ผ Handles yearly or hourly income (auto conversion)
- ๐ Blind allowance support
- ๐ REST API for integrations
- ๐๏ธ Tax bands, NI rates, and thresholds editable via Django admin
- ๐ Production-ready deployment
-
Clone the repository:
git clone https://github.com/loglux/tax_calculator.git cd tax_calculator -
Create and activate virtual environment:
python -m venv .venv # Windows: .venv\Scripts\activate # Linux/Mac: source .venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Create a superuser (optional, for admin):
python manage.py createsuperuser
python manage.py runserverOpen http://127.0.0.1:8000/ in your browser.
-
Web:
Use the web form to enter your income, region, year, and other options. -
API:
POSTto/calculate_tax/with JSON, e.g.:{ "income": 45000, "income_type": "yearly", "tax_year": 2024, "is_blind": false, "no_ni": false, "is_scotland": false, "workweek_hours": 40 }Response: Full breakdown of tax, NI, net income, personal allowance, etc.
- Django 5
- Django REST Framework
- Bootstrap 5
- Gunicorn (for production)
- Whitenoise (static files)
โ ๏ธ Disclaimer:
This calculator provides approximate calculations for UK tax and National Insurance, based on publicly available tax bands and thresholds.
It does not use HMRCโs official API or methodology, and results may differ from official HMRC calculations.
This project is for educational and demonstration purposes only, and is not intended as a professional or legally reliable tax tool.
MIT
Developed by Vladislav Sorokin
https://tax.log7.uk/calculator/