I will try to do so, though I suspect this will stretch my spreadsheet-making abilities.
You could modify the attached if you don't want to start with a blank sheet. No guarantees as to whether that will be helpful or not. ;)
Inputs cells are in light green. Spreadsheet is protected but with no password so (in Excel 2013) Review>Unprotect Sheet will open it for editing.
Major assumptions:
1) You have post-tax cash equal to your SL payment, plus pre-tax cash equal to your HSA maximum.
2) The pre-tax cash can go into the HSA, or you can pay tax and then pay more on the SL if it is still active, or invest taxably if the SL has been paid.
3) Money to pay medical expenses is available, and is above and beyond that in #1.
4) Annual payments. Change cell B5 to 12 for monthly payments, but then you'll also need to add 84-7=77 rows to the calculation table.
Known shortcomings:
- Does not account for taxation of taxable returns, nor capital gain taxes needing payment to get net spendable from the taxable account.
- Does not account for taxation of HSA withdrawals if not used for medical expenses
Short conclusion: based on the above assumptions, and further assuming the spreadsheet is built correctly, fund the HSA to the max and don't pay any extra on the SL unless you have cash flow beyond that. Change cell B12 and watch cell S26.
I'm also curious about peoples' qualitative opinions on how much of a medical emergency fund is necessary. It makes me a bit uncomfortable to think about not having dedicated cash available to meet the deductible if needed but my wife is more interested in killing her student loans than sitting on a cushion of cash with strings attached.
I wouldn't keep a medical emergency fund
in addition to an emergency fund, but would recognize that "loss of income" and "extraordinary medical expense" are two major reasons one might need to tap an e-fund. Up to you to estimate the likelihood of both happening simultaneously. If assuming only one at any given time, "some number of months of income" may not differ much from "the full deductible for an HDHP."