Investing Efficiently: Which Accounts To Use First

I talk a lot about credit card and bank bonuses that allow me to increase my income a few hundred dollars at a time, but these are just a small portion of my overall financial plan.  Everybody has different financial goals, but the end game for my fiance and I is financial independence, which means the income from our investments is greater than our expenses.  Our plan to be financially independent by 40 is outlined in this post, Our Financial Independence Plan: FI By 40, and a major component of this plan is saving a large percent of our income and placing it into index funds that we plan to keep for the long term.  Recently, a reader asked me why I chose the priority of investment accounts in that post, so I thought I’d go into more detail on that particular aspect.  Selecting the correct placement of your investments can save you a HUGE amount on taxes and possibly cut years off of your working career if you choose, so everyone should at least be aware of the basics.

Basics of Tax-Advantaged Accounts

Once you have chosen to invest your money for the long term, you will have several different options of where to place that money.  Not only deciding which fund, stock, or bond to buy, but also what account to use in order to buy it.  The two primary types of accounts are special tax-advantaged accounts like a 401k or IRA and regular brokerage accounts like one you could open directly with Vanguard.  Tax-advantaged accounts are, in general, far superior to their taxed counterparts because they can let you delay taxation to increase your investment amount, allow you to pay taxes up front to enjoy tax free gains, and possibly avoid certain taxes altogether.  They also each have different rules and restrictions that make deciding between them a non-trivial matter.  There are several types of these tax-advantaged accounts, but the primary 3 I will be talking about are 401k’s, IRA’s, and HSA’s.  Several other kinds exist such as 403b’s, 457’s, and 529’s, but I am going to stick with the ones that are most common.  Luckily, the information below should be applicable to all the different kinds of accounts if you focus on WHY I rank them in the order I do.

Both the 401k and IRA each have a Traditional and Roth option that determine whether you pay taxes when the money is put in or when it’s taken out, and there are a number of different considerations to be taken when deciding which is right for you.  I won’t be going into those distinctions in this article, but there is a plethora of information online if you search for “Roth vs. Traditional” and want to read about it.

The Optimal Order To Use Tax-Advantaged Accounts

Each of the accounts has different rules, tax considerations, and limits that make them better or worse than each other under certain circumstances.  If you are investing a small amount, then finding the best and putting all of your money in that shouldn’t be too hard, but if you’re saving a large amount of money every year, you’ll begin to run into the limits imposed on the accounts and may need to use two or more of them to optimize your tax savings.  This is the general priority of which order you should place money into the accounts:

  1. 401k up to your employer’s match
  2. HSA up to the maximum
  3. IRA up to the maximum
  4. 401k up to the maximum
  5. Regular taxable accounts

Now let’s look at why I chose that order and whether or not it applies to you.  If any of these particular accounts aren’t available to you, either swap in similar accounts (403b instead of 401k for example) or just move down to the next one that is available to you.  Let’s look at some detail for each account and why it’s ranked where it is:

401k Up To Employer Match

If your employer offers a 401k and matches a portion of your investment, then this is far and away the best option for your investments.  The match that they provide is effectively an instant (and often large) return on your money.  For example, if they match half of the first 4% of your income that you contribute to the account, that’s an INSTANT 50% gain on your investments.  50% is far above what you can expect an average investment to gain over a short time period, so even if your employer’s 401k plan doesn’t offer great investment options, it still makes sense to contribute as much as they will provide a match on before looking at other options.

HSA Up To The Maximum

HSA’s themselves are relatively new accounts, first being established in 2003, but their benefits can be enormous if used correctly.  They are also heavily restricted in that you may only contribute to one if you have a high-deductible health plan, so many people do not qualify for them.  The idea of the account is a place to store money for future medical expenses, but you are allowed to invest the money while it sits in the HSA.  No taxes are paid on the money put into the accounts AND no taxes are paid on money taken out of the account if used for medical expenses.  Unlike a 401k or IRA where you have to pay taxes on at least one of those transactions, the HSA allows you to avoid the taxes altogether.

The third thing that makes HSA’s so powerful is that they are the only legal way I know of to avoid FICA taxes such as Social Security and Medicare.  This only works if you are able to contribute to an HSA directly from your paycheck, but it allows you to save over 7% right off the bat.  If there is still money left in your HSA when you turn 65, then it effectively turns into an IRA where you pay income taxes on the money withdrawn.  Even at this point, it is still possible to withdraw tax free for medical expenses, of which you’ll probably have plenty of the older you get.

The HSA allows you to avoid taxes altogether on medical expenses, avoid FICA taxes on the contributions, and can grow tax-free until you need to withdraw the money in retirement.  For these reasons, I rank it above both the IRA and 401k (after the employer match).  There is a limit to the amount you can contribute though that is shared by both you and your employer, so keep that in mind when planning out your investments.

IRA Up To The Maximum

Both the IRA and 401k offer almost identical tax benefits if you choose the same Roth vs. Traditional option for each one, but I rank the IRA above the 401k (after the employer match of course) for one simple reason: you get to select who manages the accounts and what investments are available to you.  The account management company and investment options in a 401k are both determined by your employer.  You may be fortunate enough to have a wide selection of low-cost investments in your 401k, but many others are given a weak selection of high-cost investments that will slow down the growth of the account.

One thing to note is that the IRA has contribution restrictions based on your income level.  Once you reach a certain income, you no longer receive the tax benefits of using a traditional IRA so it doesn’t make sense to use one at all.  At ANY income level though, it is still possible to utilize a Roth IRA under the current tax code.  While you can no longer contribute directly past a certain income level, you are allowed to contribute post-tax money to a Traditional IRA and roll it over to a Roth IRA in the same year.  This works out to the same benefits as contributing to a Roth IRA directly and is referred to as a “Backdoor Roth” contribution.  While the process is a little complicated, this is a commonly used feature of the tax code for those above the standard contribution income limit.

401k Up To The Maximum

As mentioned above, the IRA and 401k are extremely similar in the benefits they offer, but the IRA wins out because you aren’t restricted to your employer’s investment choices.  For someone with a good selection of low-cost funds, the two accounts become essentially the same.  The 401k does have the highest contribution limit of the 3 accounts discussed, so if you’re able to max out the other two, the 401k will become your best choice.

Regular Taxable Accounts

If you’re saving enough money to max out all the tax-advantaged accounts available to you, only then does it make sense to start using a regular taxable account.  Investments in general do have certain tax advantages, such as long-term gains having a lower tax rate than regular income, but a taxable account is a far inferior option to the tax-advantaged accounts mentioned above.  While IRA’s, 401k’s, and HSA’s allow you to avoid or delay taxes, a regular taxable account does not offer any of these benefits.

One benefit to the taxable account is that your money is always accessible and you won’t have to pay penalties to withdraw the funds at any time.  Most people would be better served with a sufficient emergency fund rather than relying on their investment accounts for worst-case scenarios, but it is worth a mention.  A large dip in the market followed by an emergency that requires you to access the funds will end up as a significant loss over the long-term.

What If You Intend To Retire Early?

Most of the accounts mentioned are set up as retirement accounts with penalties for withdrawing the funds early, but it still makes sense to use them even if you think you’ll need the funds before that.  There are several ways to access these funds early with a little planning via Roth Ladders or SEPP payments, but I won’t be going into the detail for those here.  Even if you aren’t able to use the funds for several years, if you plan on living into your 60s and beyond, I imagine you’ll still need some money at that point in your life.  Suffice it to say, even a person seeking early retirement can benefit greatly by utilizing these tax-advantaged retirement accounts.

An Example To Illustrate The Benefits Of Choosing Your Accounts Efficiently (Warning: Math)

There are an enormous number of different variables that go into investment choices, accounts, and each person’s situation, so I am going to try to construct an example that’s as simple as possible while still demonstrating the benefits of choosing your accounts carefully.  Wish me luck!

Let’s take a person with NO investments that’s 25 years old and just landed a high-paying job.  They know the importance of investing early and often, and after working out a budget, has $15,000 of pretax money to invest each year.  Their employer matches the first $2,000 that is put into a 401k and also offers an HSA.  This person makes too much to contribute directly to a Roth IRA, but has researched the Backdoor Roth IRA and knows how to get the maximum contribution in there.  They will also only contribute for 20 years before the accounts are left to grow on their own with no new contributions.

We’ll say all of the investments gain 7% annually, but the 401k and HSA funds each have a 1% expense ratio while the IRA and taxable funds only have a 0.1% expense ratio.  This will show how poor investment choices in accounts you can’t control negatively effect gains.  Another assumption is that all HSA funds will be able to be put towards medical expenses, so no taxes will be paid on the withdrawals.  We will also assume a 20% effective tax rate when making post-tax contributions (+7.65% FICA taxes) or withdrawing from traditional (pre-tax) accounts, and a 15% capital gains tax when withdrawing gains from a taxable account.

Lots of assumptions and specific numbers, but I had to pick something in order for the numbers to be comparable to each other.  Lucky for you, I’ll link to the google sheet I used to crunch these numbers at the end and you’ll be able to play around with some of them yourself.  Now let’s look at the different options I chose to simulate and compare.

Different Investment Account Choices to Simulate

Simulation 1: Optimal Investments with a Traditional 401k

After maxing out the employer match at $2,000, the HSA at $3,350, and paying taxes on enough money to max out the Roth IRA at $5,500, there is $2,048.06 left to contribute to the traditional 401k.

Yearly Contributions:

  • $3,350 placed into an HSA pretax per year
  • $5,500 placed into a Roth IRA (post-tax) per year
  • $4,048.06 placed into a Traditional 401k per year
  • $2,000 employer match also going into the Traditional 401k per year

Simulation 2: Optimal Investments with a Roth 401k

After maxing out the employer match of $2,000, the HSA at $3,350, and paying taxes on the rest, there is enough to max out the Roth IRA at $5,500 and still contribute an additional $928.78 to the Roth 401k.

Yearly Contributions:

  • $3,350 placed into an HSA pretax per year
  • $5,500 placed into a Roth IRA (post-tax) per year
  • $2,928.78 placed into a Traditional 401k per year
  • $2,000 employer match going into the Traditional 401k per year

Simulation 3: All Investments placed into a Traditional 401k

A lazy way to invest all of your money in tax-advantaged accounts, all $15,000 of pretax money will be placed into a Traditional 401k.

Yearly Contributions:

  • $15,000 into a Traditional 401k per year
  • $2,000 employer match going into the Traditional 401k per year

Simulation 4: All Investments placed into a Taxable account

Let’s see how ignoring ALL tax-advantaged accounts affects the final total.

Yearly Contributions:

  • $10,852.50 placed into a taxable account

Simulation 5: Employer Match and then everything into a Taxable account

Let’s see the difference of simply taking advantage of the employer match will have versus putting everything into a taxable account.

Yearly Contributions:

  • $2,000 into a Traditional 401k per year
  • $2,000 employer match going into the Traditional 401k per year
  • $9,405.50 placed into a taxable account


Results in the year 2055

To quickly recap, we have a person with $15,000 in pretax money to invest every year and they are trying to choose the best set of accounts to use in order to maximize the benefits.  This person only contributes for 20 years starting in 2015 and then lets the money sit in each of the respective accounts until they turn 65 and want to count up what they have.  Let’s see how much money each account mix had in the year 2055 (after paying taxes on the appropriate accounts).

  • Simulation 1: Optimal w/ Trad 401k – $1,930,000
  • Simulation 2: Optimal w/ Roth 401k – $1,891,000
  • Simulation 3: All in Trad 401k – $1,701,000
  • Simulation 4: All in Taxable – $1,551,000
  • Simulation 5: Trad 401k up to match, then Taxable – $1,745,000
Different ways to invest for 20 years and then let compound interest take over.  Account placement of the investments is key in maximizing returns.
Different ways to invest for 20 years and then let compound interest take over. Account placement of the investments is key in maximizing returns.


As expected, the best distribution of accounts was the one I laid out in this post and the worst was ignoring all tax-advantaged accounts.  The difference is significant at $379,000, which illustrates how much of a difference tax-advantaged accounts can make.  There are also a few other interesting things that I want to call out:

  • If your effective tax rate is the same when putting money into and taking money out of the tax-advantaged accounts, the Traditional account slightly beats the Roth account as noticed when comparing simulations 1 and 2.
  • I did not expect simulation 5 to beat simulation 3 before I ran the numbers, but it became obvious after the fact why.  It’s purely because of the expense ratio difference between the two accounts (1% vs. 0.1%).  It’s amazing how less than a percent difference in expense ratios makes over the long term.  It completely eliminated the tax benefits of the 401k!

Hopefully this post helps illustrate the importance of using tax-advantaged accounts when choosing how to invest your money.  It also unexpectedly reminded me of the importance of expense ratios.  Always pay attention to expense ratios when choosing the funds you invest in because it will make a HUGE difference over the long term.

Try It Out Yourself

Here is a link to the Google Sheet I used to work out the numbers for this post.  It’s certainly not full-feature, but it does let you adjust the yearly contribution amounts, years to contribute, gains, expense ratios, and tax rates.  Feel free to make a copy and plug in your own numbers.  If you notice any mistakes, please let me know and I’ll do my best to fix them.  Only edit the yellow boxes to adjust the simple version of the simulation, but feel free to chop it up and add features however you see fit.

Google Sheet: Investment Account Choice Simulator

I’m open to feedback when it comes to mistakes in the formulas, but I don’t intend to add new features at this time.  If you add some features yourself though, I’d love to take a look!

10 thoughts on “Investing Efficiently: Which Accounts To Use First

  1. Great post – your thinking is almost exactly the same as mine, although you have a head start (I’m hoping to be FI by 50 – 17 years from now).

    Have you run any numbers on fees charged by HSA administrators? Pretty much all of the ones I’ve found charge a monthly fee, and while it probably still won’t outweigh the benefit of tax free in/tax free out money (for medical expenses), depending on the investment options available it might be a closer call than you think.

    Also, my understanding of HSA reimbursement is that there is not time limit for getting the money for medical bills. Because of this, I’ve been paying all of my medical bills with a points earning credit card (hey, gotta tie it back somehow!) and saving those receipts so that in 20 years (or whenever I actually need it) I can get that money out tax free with all those years of compounded growth built in.

    1. Thanks!

      Your comment about HSA fees is definitely something that’s important to consider. While the tax benefits are better than the other accounts, its entirely possible they could be cancelled out by significant fees. The one I have access to through my employer doesn’t have a monthly fee, but unfortunately, it does charge load and trading fees if I want to invest what’s in the account. I did try to capture the fees/poor investment choices by making the expense ratio in the HSA 1% instead of 0.1%, but how relevant that number is depends on your particular plan options. Despite the higher simulated fees, it still came out ahead of the other accounts, but this won’t be the case for every person’s individual situation.

      One thing to note is that even if you aren’t able to invest the money in the account efficiently, simply putting money into it and then reimbursing yourself for medical expenses in the short term will still save you a lot of money by avoiding the FICA+Income taxes. This only works if you have medical expenses somewhat near the contribution limit though, otherwise you would need to scale accordingly.

      Also, your understanding of the time limit on reimbursements is the same as mine. The reason I didn’t mention it though is because I didn’t research that part myself and simply know about it from one of my favorite Mad Fientist articles ( I’m fortunate enough to have little to no medical expenses each year, but when they start coming down the road you can bet I’ll be looking deeper and probably saving my receipts for the long term.

  2. “The third thing that makes HSA’s so powerful is that they are the only legal way I know of to avoid FICA taxes such as Social Security and Medicare.”

    Not at all important to the point of your post, but you can also avoid FICA taxes by using FSAs. FSAs exist for childcare, medical use (but you’re excluded if you have a HSA), and transportation.

    You should probably mention the pro-rata rule when talking about the backdoor Roth IRA, because it can in some cases make using the back door a losing proposition. And even when it’s not a strictly losing proposition, the advantage of using a backdoor Roth can be greatly diminished depending on your tIRA balance.

    For a few lucky people, there is another “account” between choices 4 and 5:the megabackdoor Roth. which allows you to put up to $35k in a Roth IRA.

    Go Curry Cracker makes the case for an early retiree to favor taxable accounts over a Roth. I don’t agree with some of the assumptions (like how the 0% LTCG bracket will remain forever) but it’s certainly worth considering.

    1. Thanks for reading. I agree on all of your points.

      I should have phrased the FICA statement to only reference investments because FSAs can’t be used for investing due to the funds expiring after a short time frame. Checking all the factors before using a Backdoor Roth IRA is important and I’m very jealous of anyone who has access to the Mega Backdoor Roth, that’s a lot of extra money you can avoid taxes on. I also tend to agree with Go Curry Cracker when deciding between traditional and roth if you’re on the early retirement path. I’ll probably do a post about this in the future.

  3. Great article! I had bookmarked this awhile back and coming back to it now as I’m crunching my own numbers. Can you explain your rationale behind setting much higher 401k expense ratios vs the other accounts? I’m following the Boglehead philosophy, so everything is in low cost ETFs. If I use the similar low cost ETFs across 401k, HSA and IRA accounts, aren’t the expense ratios the same (e.g. ~0.1%)?


    1. You can delete my second comment, just realized I wasn’t taking the tax out of the Roth contribution. i.e. it would be 9k in Trad 401k and 750 in Roth

    2. Thanks for reading!

      If your 401k has low cost ETFs or index funds, then that’s fantastic. If the investment options are the same (or similar) between the different accounts available to you, then the expense ratios should all be set to the same. Determining which one to fill up first will then come down to other benefits such as matches in 401k’s or the extra tax benefits of an HSA.

      Unfortunately, there are a lot of 401k’s in the US with very poor investment options. Some of them don’t even have any investment options that have a lower than 1% expense ratio (or worse)! Despite this, it still makes sense to use them in most cases for a match or just the tax benefits if you’ve filled up the other options. That is what I was trying to account for by bringing the up the expense ratio for the 401k in my calculations.


      1. Ah true true, didn’t realize the differences were so huge! I guess I’m lucky, my 401k is with Vanguard and I have access to VIIIX for instance which has a 0.02% expense ratio.

Leave a Reply

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