True cost of a 401(k) loan
calculate_401k_loan_costRuns the 401k.loans true-cost calculator: payment per paycheck and number of payments, total repaid and interest, pre-tax pay needed per payment, tax later on the interest, the 401(k) balance at payoff with and without the loan (growth gap) and that gap at 65, the legal and usual plan borrowing limits, and, if you might leave the job, the balance owed then plus the tax and 10% additional tax if it is not repaid or rolled over.
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": {
"vested_balance": "<vested_balance>",
"loan_amount": "<loan_amount>"
},
"name": "calculate_401k_loan_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| age | No | Your age today, 18 to 80. Default 40. | |
| years | No | Years to repay: 1 to 5, or 10 or 15 for a loan to buy your main home. Default 5. | |
| loan_amount | Yes | Amount to borrow in dollars, e.g. 15000. | |
| pay_frequency | No | How often you are paid (one loan payment per paycheck). Default biweekly. | biweekly |
| plan_rate_pct | No | Plan loan interest rate in percent, 0 to 20. Default: the prime rate plus 1 point, as an example; the real rate is on your plan's loan paperwork. | |
| state_tax_pct | No | State income tax rate in percent, 0 to 15. Default 0. | |
| vested_balance | Yes | Vested 401(k) balance in dollars, e.g. 60000. | |
| 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. | |
| leave_job_after_months | No | Model leaving the job after this many months (0 = do not model it). Default 24, as on the page. | |
| lost_match_per_paycheck | No | Employer match you would lose with them, dollars per paycheck. Default 0. | |
| paused_contribution_per_paycheck | No | Your own 401(k) contributions you would stop while repaying, dollars per paycheck. Default 0. |