Enhanced Financial Habit Builder
- 50% for Needs (housing, food, utilities): $${needs.toFixed(2)}
- 30% for Wants (entertainment, dining out): $${wants.toFixed(2)}
- 20% for Savings/Debt Repayment: $${savings.toFixed(2)}
Track your spending closely and adjust your expenses to fit within these guidelines.
`; } else if (financialGoal === 'debt') { var debtRepaymentTarget = disposableIncome * 0.3; // Allocate 30% of disposable income to debt repayment var debtRepaymentMonths = Math.ceil(debtAmount / debtRepaymentTarget); habitMessage = `Goal: Pay Off Debt.
You have a total debt of $${debtAmount.toFixed(2)}. To reduce your debt effectively, aim to allocate at least $${debtRepaymentTarget.toFixed(2)} per month (30% of your disposable income) towards debt repayment.
At this rate, you can be debt-free in approximately ${debtRepaymentMonths} months.
We recommend using the debt snowball method (starting with the smallest debt first) or the debt avalanche method (paying off high-interest debt first).
`; } else if (financialGoal === 'investing') { var investableIncome = disposableIncome * 0.2; habitMessage = `Goal: Start or Increase Investing.
You've set an investment goal of $${investmentGoal.toFixed(2)} per month. To achieve this, aim to allocate at least $${investableIncome.toFixed(2)} (20% of your disposable income) towards investments.
We recommend automating your investments and focusing on low-cost, diversified options like index funds.
`; } // Display results result.innerHTML = habitMessage; });