"It's Not Rocket Science. It's Math."
A comprehensive mortgage calculator built with Streamlit that helps users calculate mortgage payments, compare refinance scenarios, and analyze the financial impact of different loan options.
- Calculate monthly payments, interest, and remaining balance
- Track payments made and interest paid to date
- Highlight key metrics (balance remaining, interest remaining)
- Compare current loan with refinance options
- Use current balance remaining as base loan amount
- 0.125% (1/8 point) interest rate increments
- Flexible loan terms (15, 20, 25, 30 years)
- Add closing costs to loan or pay out of pocket
- Show minimal impact on monthly payments
- Break-even analysis (time to recoup costs)
- Cost comparison between payment options
- Monthly payment savings/increases
- Total interest impact (accurate comparison)
- Annual savings calculations
- Color-coded results (green for savings, red for increases)
- Download comprehensive calculation reports
- Professional formatting with all calculations
- Timestamped files for easy organization
- Python 3.7+
- Streamlit
-
Clone the repository:
git clone https://github.com/yourusername/mortgage-calculator.git cd mortgage-calculator -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
streamlit run mortgage_app.py
-
Open in browser:
- Navigate to
http://localhost:8501
- Navigate to
- Enter loan amount, interest rate, start date, and term
- Click "Calculate Current Loan" to see results
- Enter new interest rate and loan term
- Set closing costs (default: $5,000)
- Choose to roll costs into loan or pay out of pocket
- Click "Compare Refinance" to see analysis
- Compare current vs. refinance scenarios
- Review savings analysis and break-even calculations
- Download full report for sharing
- Compares remaining interest on current loan vs. total interest on new loan
- Shows true financial impact of refinancing
- Color-coded results for easy interpretation
- Calculates time to recoup closing costs
- Provides recommendations based on timeline
- Shows minimal monthly impact of rolling in costs
mortgage-calculator/
├── mortgage_app.py # Main Streamlit application
├── Payment_calc.py # Core mortgage calculation functions
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- Standard mortgage payment formula
- Accurate amortization calculations
- Proper balance remaining calculations
- Interest paid to date tracking
- Uses current balance remaining as base loan amount
- Accounts for closing costs in loan amount
- Compares apples-to-apples interest calculations
Have questions? Want to leverage the equity in your property and take cash out?
📧 Email: arallo@rhfny.com
This project is open source and available under the MIT License.
Built with ❤️ using Streamlit