This project provides a comprehensive college cost calculator. It helps users estimate the true cost of attending college by considering tuition, loans, interest rates, and opportunity costs. The big difference between this and other calculators is that we factor in opportunity cost and look at how long it would take for your education to be profitable.
- Calculate total college costs including tuition, loan interest, and opportunity cost
- Visualize cost breakdown with an interactive pie chart
- Estimate break-even point based on expected salary differences
To run this project locally:
-
Clone the repository:
git clone https://github.com/mikebranc/should-i-go.git cd should-i-go -
Install dependencies:
npm install # or yarn install -
Run the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser to see the result.
The main components of this project are:
src/app/components/CollegeCostCalculator.tsx: The main component for the calculator UI and logicsrc/app/components/InfoTooltip.tsx: A reusable tooltip component for providing additional informationsrc/app/utils.ts: Utility functions for calculations
Opportunity cost is calculated by multiplying your annual high school salary by the number of years spent in college.
The breakeven point is calculated by finding the intersection of two lines: one representing the cumulative earnings without a college degree, and another representing the cumulative earnings with a college degree minus the total cost of education. This can be modeled by the following equation:
t * H = t * C - (T + I + O)
Where: t = time (in years) H = annual salary with high school diploma C = annual salary with college degree T = total tuition cost I = total interest cost on student loans O = opportunity cost (Y * H), where Y is the number of years spent in college
Solving for t gives us the breakeven point in years:
t = (T + I + O) / (C - H)
This equation calculates how long it takes for the additional earnings from a college degree to offset the total cost of obtaining that degree.
The loan interest is calculated using the daily simple interest formula, which is commonly used for student loans. This method accrues interest daily based on the outstanding principal balance. We assume a 10 year loan which is pretty standard.
For more detailed information on how student loan interest is calculated, please refer to these helpful links and calculators:
- Understanding Interest Rates for Federal Student Loans
- Bankrate - How to Calculate Sudent Loan Interest
- Bankrate - Student Loan Calculator
- Forbes - Student Loan Calculator
This tool is designed to help make more informed decisions about college costs. It provides estimates and should not be considered financial advice. Users should consult with financial professionals for personalized advice.
To learn more about the technologies used in this project: