
Student Loan Calculator
A financial mathematics web application that helps users understand the long-term cost of UK student loans and evaluate whether voluntary overpayments are worth making.
I started by deriving analytical repayment formulas, validated the logic in Excel, and then implemented a Python numerical solver with an interactive web interface.
Methodology
- Analytical maths first: repayment logic and payoff behaviour derived mathematically.
- Excel prototyping: formulas validated against interactions and edge cases.
- Python numerical solver: year-by-year simulation for flexible scenario analysis.
Repayment Insights
- Baseline repayment path vs overpayment scenario comparison.
- Highlights when overpaying clears debt sooner.
- Shows total savings and cases where overpaying costs more.
Tech Stack
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- Backend: FastAPI, Python
- Visualisation: Recharts, Chart.js
- Infrastructure: Docker, Docker Compose, Nginx, DigitalOcean
Architecture
Domain -> Nginx (SSL + reverse proxy) -> Next.js frontend -> FastAPI backend -> JSON loan plan config + Python solver.
API Endpoints
POST /calculate- yearly repayment projectionPOST /calculate-summary- aggregate totalsPOST /calculate-overpayment- overpayment comparison
Why I Built It
The core question was: "At what salary level does making voluntary student loan overpayments become worthwhile?" The app is designed for transparent scenario analysis rather than claiming to predict the future.