- Fix chart data showing age 70 values instead of age 65 retirement values - Update all hardcoded examples to match actual calculator output - Recent Graduate: 75K → 94K (corrected retirement value) - MBA Graduate: 25K → 29K (corrected retirement value) - Medical Professional: 85K → ,065K (corrected) - Teacher: 8K → 88K (corrected) - Software Engineer: 12K → ,132K (corrected) - Attorney: 5K → 54K (corrected) - All examples now mathematically consistent with calculator logic - Charts no longer appear to 'slow down' at retirement age
SECURE Act 2.0 Student Loan Matching Calculator
A free, interactive web calculator that helps employees and employers understand the financial impact of the SECURE Act 2.0 student loan matching program. This program allows employers to make 401(k) matching contributions based on employee student loan payments.
🚀 Live Demo
Visit the calculator at: https://secure-student-loan.gitlab.io
📋 Features
- Interactive Calculator: Real-time calculations showing net worth comparison over time
- Visual Charts: Dynamic Chart.js visualizations comparing scenarios with and without the program
- Multiple Personas: Pre-loaded examples for different professions (teacher, engineer, attorney, etc.)
- Export Options: Download results as CSV or print for records
- Share Functionality: Share results via Web Share API or clipboard
- Input Validation: Comprehensive validation to prevent calculation errors
- Responsive Design: Mobile-first design that works on all devices
- Accessibility: ARIA labels and semantic HTML for screen reader support
🛠️ Technology Stack
- HTML5: Semantic markup for accessibility
- Tailwind CSS: Utility-first CSS framework (via CDN)
- Alpine.js: Lightweight reactive framework for interactivity
- Chart.js: Beautiful, responsive charts
- GitLab Pages: Static site hosting with CI/CD
💻 Local Development
Prerequisites
- Any modern web browser
- Python (optional, for local server)
Running Locally
- Clone the repository:
git clone https://gitlab.com/your-username/secure-student-loan.git
cd secure-student-loan
- Open directly in browser:
open index.html # macOS
xdg-open index.html # Linux
start index.html # Windows
Or use a local server:
python -m http.server 8000
# Visit http://localhost:8000
🚢 Deployment
The site automatically deploys to GitLab Pages when changes are pushed to the main
branch.
Manual Deployment
- Push changes to the main branch:
git add .
git commit -m "Your commit message"
git push origin main
- GitLab CI/CD will automatically:
- Copy
index.html
to thepublic/
directory - Deploy to GitLab Pages
- Copy
📊 How the Calculator Works
Key Assumptions
- Investment Returns: 7% average annual return (historical S&P 500 average)
- Loan Interest Rate: 5% annual rate (federal student loan average)
- Retirement Age: 65 years old
- Compound Growth: Each year's contribution grows from the time it's contributed until retirement
Calculation Formula
-
Annual Match Amount:
min(Monthly Loan Payment × 12, Salary × Match Rate)
-
Future Value with Compound Growth:
FV = Σ(Annual Match × (1 + 0.07)^(65 - Current Age - Year))
-
Net Worth Comparison:
- With Program: Retirement Account Balance - Remaining Loan Balance
- Without Program: -Remaining Loan Balance (until loans paid off)
🤝 Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Test thoroughly in different browsers
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to your branch (
git push origin feature/amazing-feature
) - Open a Merge Request
Development Guidelines
- Maintain 4-space indentation in HTML
- Use Tailwind utility classes for styling
- Keep all functionality in the single
index.html
file - Test on mobile devices and different screen sizes
- Ensure accessibility with proper ARIA labels
- Validate inputs to prevent calculation errors
📈 Future Enhancements
- Add inflation adjustment options
- Include tax implications calculator
- Add employer cost-benefit analysis
- Create embeddable widget version
- Add more detailed amortization schedules
- Include state-specific student loan programs
- Add comparison with other retirement strategies
📄 License
This project is open source and available under the MIT License.
🙏 Acknowledgments
- SECURE Act 2.0 legislation for making this benefit possible
- The millions of Americans managing student debt while trying to save for retirement
- Employers implementing this innovative benefit program
📞 Support
For questions, suggestions, or issues:
- Open an issue in the GitLab repository
- Contact via [your-email@example.com]
Disclaimer: This calculator provides estimates for educational purposes only. Actual results will vary based on your specific loan terms, employer plan details, investment performance, and contribution consistency. Consult with a financial advisor for personalized advice.