Choosing Your Health Insurance Plan – With Math!

A couple years ago my wife and I were procrastinating yet again on selecting a health care plan option. Specifically, which of two plans to select for her and our son that were offered by her company.  My health insurance is super simple: I’m fully covered, no premiums (ignoring dental and vision). But hers was hard! There’s a huge amount of information to consider, from premiums to deductibles to co-pays to co-insurance rates to tax-savings to traditional vs high-deductible plans to how much to put in your FSA or HSA…. Insane.

I got fed up with trying to eyeball this decision. So, I broke out Python! I managed to script up and plot a wide variety of scenarios, and as a result the decision finally became clear. I love Python and plots – I’m definitely an engineer to the core.

And when open enrollment rolled around this year, I just had to re-open the Python script, plug in a few updates to the numbers, and I got my answer! Beautiful.

What We Compared

We’d already ruled out the premium health plan in past years, via a much simpler analysis. And we weren’t considering a change to dental or vision plans. So, given that our son is on my wife’s insurance plans, our analysis specifically compared the standard and high deductible health plans for an “employee plus children” plan. If you’d like to compare other options, or your insurance plan options are structured differently, you’re welcome to modify the python script. If you do, it would be great to hear from you what changes you made – I’ll try to add any fundamental capabilities to the template. See “Conclusions” section below for more info.


Below are the “inputs”, which are all the numbers that have an impact (big or small) on our decision. I provide values for the “employee plus children” option for both a standard plan and a high deductible health plan (HDHP).

Monthly Premiums:

  • Standard: $93
  • HDHP: $61

Standard plan office visit copays (not applicable for HDHP, as you pay those costs in full until you hit your deductible):

  • Primary care physician: $30
  • Specialist: $40

Note: well visits remain $0 for both plans.

Estimated Office Visit cost

  • Primary Care Physician: $103.05
  • Urgent Care: $165
  • Specialist: unknown, probably highly variable based on type of physician

Note: As a result of not having a good estimate for all possible specialist office visits, did not assess specialists below, but we operated on the assumption that the Urgent Care rate was probably close to a conservative average rate for specialists.

Deductibles (in network):

  • Standard Individual: $1000
  • Standard Family: $3000
  • HDHP Family: $3200 (note: for HDHP, must meet family deductible for individuals within family plan)

Co-insurance (percentage of medical expenses covered by insurance after deductible met, until you reach out-of-pocket max):

  • Standard: 0.8 (80%)
  • HDHP: 0.8 (80%)

Out of Pocket (OOP) max:

  • Standard Individual: $4500
  • Standard Family: $9000
  • HDHP Individual: $6850
  • HDHP Family: $10000

Company HSA Contribution (Annual): $1500

Max Employee HSA Contribution (Annual): Max $7100 total – $1500 company contribution = $5600

Max FSA Contribution (Annual): $2750 (2020)

Note: only available for Standard plan, just like HSA only available for HDHP plan – though very importantly, the FSA is use-it-or-lose-it every year, so quite stressful (unlike HSA)


  • Standard Copay: $10
  • HDHP Expected cost: $15

Note: with HDHP, you pay the full cost of drugs until deductible met, then insurance pays for 80% until max OOP, just like other medical expenses

Tax Savings Rate: 0.22 (top income tax rate) + 0.0765 (FICA)

Whew! That’s a lot of numbers. What do we do with all these numbers? We build plots of course!


Comparing Out of Pocket Expenses for Individual Within “Employee+Children” Plan

What happens with each plan (Standard vs HDHP) if we start with zero dollars in medical expenses for an individual within an “employee + children” plan and slowly raise that number to $30,000? How much will you actually pay (out of pocket) for each plan?

Wow, the HDHP plan wins at every single value! My wife and I were shocked the first time we saw this plot. You can also see how much more the Standard plan is than the HDHP with the green “difference” line: over $500 at all times. (My apologies to those with color-blindness, normally I use different patterns for different lines to prevent confusion.)

Comparing Out of Pocket Expenses for Family Within “Employee+Children” Plan

What about medical expenses for the entire family (“employee + children” in this case)? 

Incredible, the difference is even larger! You save over $2000 at almost all expense levels by choosing the HDHP.

Comparing Out of Pocket Expenses for Primary Care Doctor Visits

What about doctor visits? Won’t you save money with the standard plan if you’re paying co-pays instead of the full cost for doctor visits throughout the year? Let’s first take a look for primary care physician visits (using the estimate provided for the full visit fee, and assuming no other medical expenses, which would tilt the answer toward the HDHP):

So at our estimated doctor visit cost of $103.05, it doesn’t matter how many times you visit the doctor throughout the year: you’ll always save money with the HDHP!  If you somehow go to the doctor every other week (26 visits), you’ll still save hundreds of dollars. Note that this plot is for an individual within a family plan.

Comparing Out of Pocket Expenses for Urgent Care Visits

What about expensive doctor visits: something like urgent care visits? Especially if you can get those for the same lower primary care physician copay of $30? And assume those cost the much steeper price of $165 for the HDHP?

We now FINALLY find a scenario where the Standard Plan comes out ahead of the HDHP: if you go to an urgent care clinic at least 20 times (every 2.6 weeks the entire year), then you finally start to see savings in the tens of dollars, ramping up towards about $100. Psh. Not compelling in my mind.

Investing HSA Funds

Something else I don’t account for: growth of the HSA funds as they are invested in a low cost index fund (based on historical market returns). In fact, some argue that HSA funds are the ultimate retirement account

Combining Factors

Also note that I only considered one factor at a time, instead of mixing medical expenses with doctor visits. But because the scenarios for medical expenses are always better for the HDHP, I believe mixing those with doctor visits will only shift the result further towards the HDHP being cheaper.


Overall, the combination of lower premiums, company contributions, and significant tax savings (because you can max out your HSA) leads the HDHP to be the clear winner for us. The above results are strong enough in my mind to conclude that we are almost certain to pay less overall with the HDHP. And what’s really crazy is that this remains true even for large EXPECTED medical expenses: major upcoming surgeries, having children, etc.

While the above plots might help you if your numbers are similar to ours, nominally I would encourage you to run your own numbers to make sure. One day I may create a web application (after I learn how to build a web app of course) that you can plug your numbers into and get an answer. But until then, here is the Python script I employed for our analysis. You’ll have to be able to run Python scripts on your machine, but otherwise you’ll just need to change the numbers in the top “User Inputs” section – no code modifications needed (unless your plan structure differs, or you’d like to compare more options, or you just want to!)

If you have questions or would like to discuss the numbers you’re seeing in your insurance policies, feel free to ask in the comments below or shoot me a note on the Contact page. I’m no financial professional, but I’ll try to help you see what the math says!

And if you do find that for your situation the standard plan is clearly the winner, please let me know! I’d love to better understand what scenarios make the standard plan cheaper. And of course if you find a bug in my code, I’d greatly appreciate hearing about that!

Note: This post was originally on a different site and some of the comments below are from that original post (thus the older comment dates). 

21 thoughts on “Choosing Your Health Insurance Plan – With Math!”

    1. EngineeringYourFI

      Thanks Travis! Yeah you were one of the people I had in mind when I first started considering these options. Initially I thought it only probably made sense if you had very little medical expenses, but now it’s clear that it’s best in almost all scenarios. Wild.

  1. Awesome great job! Thanks for putting all this useful information together. I picture/chart tells more than 1000 words 🙂

    1. EngineeringYourFI

      Yeah, it is really wild, and kinda sad actually. I guess it’s probably for folks who really don’t want to pay more than a copay when they go to a doctor visit, even though they will likely pay much more in the long run.

  2. Thanks for the info. I typically go with HDHP + kids and glad to know it “pays off” even though it feels like it doesn’t. Something I wanted to mention regarding your conclusion about the HDHP (“And what’s really crazy is that this remains true even for large EXPECTED medical expenses: major upcoming surgeries, having children, etc.”)…I am expecting a kiddo in Feb. I gathered info from the dr. office and hospital for estimates for HDHP and Health Premium Plus. It appears it will actually be way cheaper to go with the Health Premium Plus for Jan & Feb, then switch to HDHP for the rest of the year (I have up to 31 days to switch my plan due to the life event). Just wanted to mention that in case anyone else has a known life event coming up they want to factor in. 🙂

    1. EngineeringYourFI

      Wow, I had not thought at all about doing something like that, very nice! Makes sense, taking advantage of the “life event” to switch your policy. And it really makes sense for you since you’re due in February, vs the end of the year. I might try to run that scenario through my code if I get a chance, see what it says. If I do, I’ll add it as an update to the post. Thanks for the idea!

      1. if you have a baby in end of the year, you do the reverse way. Opt for the HDHP for the whole year and switch to highest plan for few weeks only. Since all the delivery related charges are due after baby is borne, you can charge them to new plan.

        1. EngineeringYourFI

          Huh, interesting. I thought you paid based on the plan at the time of event, but it sounds like it might be based on when you get billed? Something to look into! Were you able to do this yourself?

          I guess this means don’t have a baby in the middle of the year! 🙂

  3. Hi, thank you for putting this together. I’ve done something similar in Excel but this is much more elegant. Also, sorry to be a pain but I’m a bit confused about some of the data. For the first two charts (individual and family in employee+children plan) both of the the HDHP curves seem to hit the max below the values you specified. For the individual case shouldn’t the HDHP curve flatten out at $6850 out of pocket? Similarly, for the family case, shouldn’t the the HDHP curve flatten out at $10000? Lastly, what causes the “kink” in the co-insurance portion of the individual in employee+children plan? Thanks!!

    1. EngineeringYourFI

      Excellent questions! The two main factors why the HDHP curves don’t flatten out at the “OOP max” shown above are 1) the $1500 company HSA contribution (which is a big part of why the HDHP is so clearly the winner) (note how the HDHP curve starts below $0 as a result) and 2) the tax savings of the $5600 you put into the HDHP. As a result, your actual OOP max is nowhere close the published OOP max on the plan. Neat, huh? Make sense? Lemme know if not.

      For the kink, I’m not sure I follow which kink you’re referring to (unfortunately there are a number of them). Are you talking about the kink in the Standard plan at $10000 for the first plot? If so, I believe that is when the maxed out FSA runs out of funds (note that $10000 is much larger than the max FSA value of $2750, but you’re only paying 20% of those medical expenses after you hit your deductible).So as a result it gets steeper, since you’re not seeing that tax savings with the FSA funds. Again lemme know if that doesn’t make sense.

      1. I thought I understood your reply last night but I got a bit confused as I thought about it some more. I’m sure I have a mistake in my mental model but here’s what I’m thinking… I view the y-axis as money-out-of-pocket but since the FSA and HSA contributions are getting subtracted out (or ignored) they aren’t represented. Even though they are tax free, they are still money-out-of-pocket (much like the plan premiums). Adding all the out-of-pocket dollars would make the lines flatten at the out of pocket max and show the delta between the curves based on the total paycheck withholding. Does that make sense?

        1. EngineeringYourFI

          Another good question. So I actually don’t regard the HSA fund as money out of pocket, but rather as a transfer from one pot (e.g. your checking account) to another (a tax free investment account). Since it all rolls over, it’s essentially another investment account for you (that grows tax free). It’s only an out of pocket cost (in my mind) if you spend it on medical expenses. On the flip side, the FSA does not roll over, but I’m including it’s tax advantages for a fairer comparison (so essentially assuming you can estimate exactly how much you will spend on medical expenses with your FSA funds). So in that sense, I’m treating the standard plan better than I should, because unless you know you will spend over the max FSA amount, you will probably put a conservative amount in that account, and thus not take full advantage of the tax savings that my above plots indicate.

          So really it’s the $1500 company contribution and the tax savings that are the reason it’s flattening out well below the plan OOP max, because you would indeed be spending the entire HSA funds if you were spending enough on medical care to get up to the plan OOP max.

          Hope all that makes sense. Have you had a chance to look at the python script at all? I’d be curious if you have other questions/ideas looking at how it works.

        2. Oh, never mind. I had a slightly different mental model but I see how the HSA and FSA are handled and it makes sense. Thanks again!

    2. I’m glad you noted the investment advantages to a HDHP plan. I’ve had one for the past several years, and the (large) tax savings and investment returns have been nice.

      1. EngineeringYourFI

        Nice! Do you have to manually do a trade for each paycheck, or does it automatically invest the funds for you? Unfortunately we’re the former

        1. Ouch! No, with ours, I have it set to buy a certain fund with each contribution. It _is_ a bit funky in that a minimum of $1k needs to be kept in a cash savings account (with the rest invested), but is ok other than that.

          Payflex is my HSA administrator BTW (for Aetna).

Leave a Comment

Your email address will not be published. Required fields are marked *