A Flask-based web application that helps users plan their financial independence by providing two powerful calculators for retirement planning.
- Calculator 1: Determine future investment value based on monthly savings
- Calculator 2: Calculate required monthly investment for target retirement income
- Supports custom initial investments
- Calculations for investment durations from 10 to 50 years
- Localized number formatting
- Responsive web interface using Bootstrap
- Error handling and user feedback
- Persistent session storage for form inputs
- Python 3.x
- Flask 3.1.0
- Bootstrap 5.3.0
- Gunicorn (for production deployment)
- Supports localized number parsing
- Clone the repository:
git clone https://github.com/yourusername/financial-independence-app.git
cd financial-independence-app- Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`- Install the required dependencies:
pip install -r requirements.txt- Start the development server:
python app.py- Open your web browser and navigate to:
http://localhost:5001
- Use the web interface to:
- Calculate future investment value (Calculator 1)
- Determine required monthly investment (Calculator 2)
- Set initial investment, annual return rate, and safe withdrawal rate
- View projections for multiple investment durations
financial-independence-app/
├── app.py # Main Flask application
├── requirements.txt # Project dependencies
└── templates/
├── home.html # Home page with calculator selection
├── calculator1_index.html # Calculator 1 input form
├── calculator2_index.html # Calculator 2 input form
├── result.html # Results for Calculator 1
└── calculator2_result.html # Results for Calculator 2
The application uses advanced financial formulas to calculate:
- Future investment value
- Compound interest projections
- Safe withdrawal rate calculations
- Required monthly investments
Key calculations include:
- Annuity formula for investment growth
- Discrete compounding interest calculations
- Safe withdrawal rate projections
The application includes comprehensive error handling for:
- Invalid number inputs
- Zero or negative rate inputs
- Calculation edge cases
- User input validation
flask run --debug --port=5001- Create a new branch for your feature
- Implement the feature
- Test thoroughly
- Submit a pull request
The application is configured to run with Gunicorn in production:
gunicorn app:app- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with assistance from ChatGPT (click here to access the main used chat)
- Inspired by financial independence planning tools
- Developed to help users visualize the financial independence journey
- Deployed by Augusto