Loan Calculator
Bilingual loan calculator with amortization schedules, affordability analysis, and early repayment simulation
stack: Next.js 16, React 19, TypeScript, Tailwind CSS, Chart.js
What
A bilingual (EN/VI) loan calculator built with Next.js 16 App Router and React 19. Supports annuity and fixed-principal repayment methods with variable interest rates per year. Deployed as a static-friendly Next.js app.
Why
Needed a transparent tool to compare loan repayment strategies with Vietnamese bank-style variable interest rates. Most online calculators only support a single fixed rate and lack side-by-side method comparison.
Notes
- Two calculation methods: annuity (PMT formula) and fixed principal with reducing interest
- Affordability calculator using DTI ratio thresholds (36%/43%)
- Early repayment simulator showing interest savings
- URL sharing via pako-compressed base64 query params
- PDF export with jspdf + autotable; Vietnamese output uses ASCII-safe text due to font limitations
- Save/load multiple loan plans to localStorage
- Charts: line (balance over time), bar (interest vs principal), doughnut (payment breakdown)