Retirement Accounts Explained: 401(k), IRA, Roth, HSA

Last updated July 2026

Short answer

The account you invest through matters as much as what you buy, because it shapes how your money is taxed. A 401(k) is offered through an employer with higher limits and possible matching; an IRA is opened on your own with more choice but lower limits; Roth versions are funded with after-tax money and grow tax-free, while traditional versions give a tax break now and are taxed on withdrawal; and an HSA can double as a stealth retirement account. Contribution limits change every year, so verify current figures with the IRS. This is educational, not tax advice, and Walnut is not an investment adviser.

These guides explain each retirement and tax-advantaged account type, this year's contribution limits, and the comparisons people ask about most, in plain language.

Why the account you invest through matters as much as what you buy

A retirement account is not an investment. It is a wrapper you put investments inside, and the wrapper decides how the government taxes the money going in, growing, and coming out. The same S&P 500 index fund held in a taxable brokerage account, a Traditional IRA, a Roth IRA, or a Health Savings Account can end up with very different after-tax value decades later, purely because of the wrapper. That is why choosing the right accounts, and funding them in the right order, is often worth more than which fund or stock you pick inside them.

US retirement accounts split along two questions. First, who offers it: an employer-sponsored plan (a 401(k) or 403(b)) or an account you open yourself (an IRA or HSA). Second, when you get the tax break: pre-tax money that is taxed later (traditional), after-tax money that grows and comes out tax-free (Roth), or the HSA, which can be untaxed on all three legs. Almost every account below is a combination of those two axes. Once you see the grid, the whole field gets simpler.

The main US retirement account types

There are more account types than most people need. These are the ones that cover the large majority of savers, described the same way each time: what it is, who it is for, and how it is taxed.

401(k) and Roth 401(k)

A 401(k) is an employer-sponsored plan you contribute to straight from your paycheck. The classic (traditional) 401(k) uses pre-tax dollars: contributions lower your taxable income now, the money grows tax-deferred, and you pay ordinary income tax when you withdraw in retirement. Many employers match some of your contributions, which is the closest thing to free money in personal finance. A growing number of plans also offer a Roth 401(k), which takes after-tax dollars now so qualified withdrawals later are tax-free. The 401(k) has a much higher annual contribution limit than an IRA, so it is the workhorse account for people with access to one. Our guide to what a 401(k) is goes deeper on matching, vesting, and rollovers. A 403(b) is the near-identical version offered by public schools, universities, hospitals, and nonprofits.

Traditional IRA

An Individual Retirement Account is one you open yourself at a broker, independent of any employer, which means far wider investment choice than a typical 401(k) menu. A Traditional IRA is generally funded with pre-tax (or tax-deductible) dollars, grows tax-deferred, and is taxed as ordinary income on withdrawal, the same tax shape as a traditional 401(k) but with lower contribution limits. Deductibility can be limited once you also have a workplace plan and earn above certain thresholds. The IRA explainer covers the traditional-versus-Roth split and eligibility in detail.

Roth IRA

A Roth IRA is funded with after-tax money, grows tax-free, and pays out completely tax-free in retirement, provided you meet the holding-period and age rules. There are no required withdrawals during your lifetime, and you can withdraw your own contributions (not earnings) at any time without penalty, which makes it unusually flexible. The catch is an income limit: high earners cannot contribute directly, though many use a "backdoor" conversion. Because the growth is never taxed, the Roth IRA is prized for money you expect to compound for a long time. See Roth IRA explained for the rules, and Roth IRA vs 401(k) for how it stacks against a workplace plan.

Health Savings Account (HSA)

An HSA is technically a medical account, available only if you have a qualifying high-deductible health plan, but it is the most tax-advantaged account in the US code. Contributions are pre-tax, growth is tax-free, and withdrawals for qualified medical expenses are tax-free too, the so-called triple tax advantage. Unspent money rolls over year to year and can be invested, and after a certain age you can withdraw for any reason (paying only ordinary income tax, like a Traditional IRA). Many savers treat a fully invested HSA as a stealth retirement account. The HSA guide explains eligibility and the medical-expense rules.

SEP-IRA

A SEP-IRA is a Simplified Employee Pension, built for the self-employed and small-business owners. It works like a Traditional IRA (pre-tax in, taxed on withdrawal) but with a much higher contribution ceiling tied to a percentage of your self-employment income, so a freelancer or contractor can shelter far more than a regular IRA allows. It is simple to open and administer, which is the point. Solo 401(k)s are a common alternative for the self-employed who want Roth options or the ability to contribute more at lower income levels.

The account types at a glance

A quick map of who offers each account, how it is taxed, and the saver it fits. Contribution limits are omitted on purpose because they change every year (more on that below); verify the current figures with the IRS or your provider before you act.

AccountWho offers itTax treatmentBest suited to
401(k) (traditional)Employer planPre-tax in, taxed on withdrawalAnyone with a workplace plan, especially with a match
Roth 401(k)Employer planAfter-tax in, tax-free outWorkplace savers who expect higher future tax rates
Traditional IRAYou open it yourselfPre-tax / deductible in, taxed on withdrawalWider investment choice; those without a workplace plan
Roth IRAYou open it yourselfAfter-tax in, tax-free growth and withdrawalsLong-horizon compounding; under the income limit
HSAYou open it (needs an HDHP)Triple tax-free (in, growth, medical out)Anyone eligible; a stealth retirement account when invested
SEP-IRASelf-employed / small businessPre-tax in, taxed on withdrawalFreelancers and owners wanting a high ceiling
403(b)Schools, nonprofits, hospitalsPre-tax or Roth, like a 401(k)Public-sector and nonprofit employees

Pre-tax, Roth, and the HSA triple tax advantage

Almost every decision above comes down to one question: do you want the tax break now or later? A pre-tax (traditional) account deducts your contribution from this year's income, so you save tax today and pay it on withdrawal in retirement. A Roth account gives no break today but is never taxed again, so all the growth is yours. The rule of thumb is that Roth wins if you expect to be in a higher tax bracket later (often true for younger savers early in their careers), and pre-tax wins if you expect a lower bracket in retirement, though nobody knows future tax rates, which is a real argument for holding some of each.

The HSA is the exception that beats both. Money goes in pre-tax, grows tax-free, and comes out tax-free when used for qualified medical costs, which almost everyone incurs in retirement. No other account gets all three legs untaxed. That is why, for people who are eligible, an invested HSA often ranks above a Roth IRA in the funding order below.

The order most people fund these accounts in

When you cannot max out everything at once, most personal-finance frameworks converge on the same priority waterfall. Fill each tier before moving to the next. This is a widely used default, not personal advice, and your own tax situation, debt, and goals can change it.

  1. Capture the full 401(k) employer match first. If your employer matches contributions, this is an immediate, guaranteed return that no other account can beat. Contribute at least enough to get every dollar of the match before anything else.
  2. Pay down high-interest debt. Not an account, but a guaranteed "return" equal to the interest rate. Credit-card debt in the high teens or twenties usually beats any investment, so clear it before investing further.
  3. Fund an HSA if you are eligible. The triple tax advantage makes it the most efficient dollar you can invest, so many savers max it next and pay current medical costs out of pocket to let it compound.
  4. Contribute to a Roth or Traditional IRA. Wider investment choice than most workplace plans and, in a Roth, tax-free growth. Pick Roth or traditional based on your bracket now versus later.
  5. Go back and max out the 401(k) or 403(b). Once the match, HSA, and IRA are handled, return to the workplace plan and push toward its (much higher) annual limit.
  6. Invest the rest in a taxable brokerage account. No contribution limit and full flexibility, just no special tax wrapper. This is where money beyond the tax-advantaged accounts goes.

The logic is simple: grab free money first, then guaranteed returns, then the most tax-advantaged space, then the merely flexible. For the head-to-head that trips people up most, our Roth IRA vs 401(k) comparison walks through why the match comes before the Roth.

How the accounts fit together

You are not choosing one account; you are building a stack. A common setup is a 401(k) at work for the match and the high limit, a Roth IRA on the side for tax-free growth and flexibility, and an HSA if a high-deductible health plan fits your situation. These are complementary, not competing. Using several also gives you tax diversification in retirement: a mix of pre-tax and Roth balances lets you manage your taxable income year to year, drawing from whichever bucket is most efficient.

Two mechanics tie the stack together. Rollovers let you move money from an old employer's 401(k) into an IRA when you change jobs, consolidating accounts and widening your investment choice without a taxable event. And required minimum distributions (RMDs) eventually force withdrawals from most pre-tax accounts once you reach a certain age, which is one more reason some savers deliberately build Roth balances, since Roth IRAs have no lifetime RMDs. What you actually hold inside each wrapper (index funds, individual stocks, thematic portfolios) is a separate decision from which wrapper to use.

Contribution limits change every year

One rule matters more than any single number: contribution limits, income thresholds, and catch-up amounts are set by the IRS and adjust most years for inflation. Any specific dollar figure you read, here or anywhere, has a shelf life. Always confirm the current year's limits on the IRS website or with your plan provider before you contribute, especially near year-end and when deciding how much to put into each account. The relative sizes are stable even when the exact numbers move: a 401(k) allows far more than an IRA, catch-up contributions raise the ceiling once you pass a certain age, and Roth IRA eligibility phases out above income thresholds. Rely on the shapes and verify the digits.

Where the investing happens

Retirement accounts decide the tax treatment; they do not pick your investments. Inside almost any of these wrappers you still choose what to hold, whether that is a broad index fund, a handful of stocks, or a themed portfolio. Walnut is the AI investing assistant that talks to the broker you already have and places the trades you approve, so once your money is in the right account you can analyze what you hold and manage it by chatting through Claude, ChatGPT, or a built-in assistant, read-only by default. Walnut does not open retirement accounts or give tax advice, and it is not an investment adviser; it sits on top of the brokerage where those accounts already live.

FAQ

What is the difference between a 401(k) and an IRA?

A 401(k) is offered through an employer and usually has higher contribution limits and possible matching; an IRA is opened on your own with more investment choice but lower limits. Many people use both. See our IRA vs 401(k) guide.

Should I use a Roth or traditional account?

Roth accounts are funded with after-tax money and grow tax-free; traditional accounts give a tax break now and are taxed on withdrawal. The right choice depends on your tax situation now versus in retirement. This is educational, not tax advice.

What are this year's contribution limits?

Limits change annually and differ by account. This hub has current-limit pages for 401(k)s, IRAs, and HSAs; always verify the latest figures with the IRS or your provider.

Is an HSA a retirement account?

An HSA is a health savings account, but because unspent funds roll over and can be invested, many people use it as an extra retirement account. See our HSA guide.

Walnut is informational and is not an investment adviser. This is educational, not tax advice; verify current limits and rules with the IRS or your provider. Nothing here is a recommendation to buy, sell, or hold any security.

Explore more guides

    Retirement Accounts Explained (2026): 401(k), IRA, Roth, HSA - Walnut AI Investing App