Compare a 401(k) loan with a hardship withdrawal, personal loan and HELOC
compare_401k_loan_alternativesPrices four ways to raise the same cash with the 401k.loans comparison tool: 401(k) loan, hardship withdrawal (grossed up for tax and the 10% additional tax), personal loan (rate plus origination fee) and HELOC. For each: amount taken out, monthly payment, money gone for good (interest to others, fees, tax, penalty), interest paid back to yourself, how much smaller the 401(k) is at term end and at 65, and whether it is allowed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cash_needed": "<cash_needed>",
"vested_balance": "<vested_balance>"
},
"name": "compare_401k_loan_alternatives"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| age | No | Your age today, 18 to 80. Default 40. | |
| years | No | Years to pay back, 1 to 5. Default 3. | |
| cash_needed | Yes | Cash you need in hand, in dollars, e.g. 10000. | |
| plan_loan_fee | No | Flat 401(k) loan fee in dollars. Default 0. | |
| plan_rate_pct | No | 401(k) plan loan rate in percent, 0 to 20. Default: the prime rate plus 1 point, as an example. | |
| state_tax_pct | No | State income tax rate in percent, 0 to 15. Default 0. | |
| heloc_rate_pct | No | HELOC rate in percent, 0 to 20. Default: the prime rate alone, before the margin a lender adds. | |
| vested_balance | Yes | Vested 401(k) balance in dollars, e.g. 60000. | |
| penalty_exception | No | true if an exception to the 10% early withdrawal tax applies (for example, you left this employer in or after the year you turned 55). The 10% is never applied at 59.5 or older. Default false. | |
| assumed_return_pct | No | Annual return you assume the 401(k) would earn, in percent (-20 to 20). An assumption, not a forecast. Default 6. | |
| federal_bracket_pct | No | 2026 federal income tax bracket in percent (Rev. Proc. 2025-32): 10, 12, 22, 24, 32, 35 or 37. | |
| heloc_closing_costs | No | HELOC closing costs in dollars. Default 0. | |
| origination_fee_pct | No | Personal loan origination fee in percent of the loan, 0 to 12. Default 0. | |
| personal_loan_rate_pct | No | Personal loan interest rate in percent (not the APR), 0 to 36. Default 11.9, the Federal Reserve G.19 average on 24-month bank loans (Q3 2026). |