Both 401(k)s and IRAs offer tax-advantaged retirement savings. However, there are some key differences.

What Is a 401(k)?

A 401(k) is a qualified employer-sponsored retirement plan. All contributions you make to a 401(k) account are pre-tax, meaning you won’t be taxed on that money at the time you earn it. Instead, you’ll pay taxes on it when you withdraw it during retirement.

The main benefit of a 401(k) plan is that employers can match or contribute to an employee’s account. Many employers offer a matching contribution up to a certain percentage of your salary.

What Is an IRA?

While 401(k)s are limited to employees of companies who offer them, any qualifying individual can open and contribute to a traditional IRA (Individual Retirement Account) or Roth IRA.

Traditional IRAs are available to individuals under the age of 70½. Like a 401(k), a traditional IRA offers tax-deferred growth on your investments, so you aren’t taxed on the assets until they are withdrawn. Contributions may be tax-deductible, too, if you aren’t participating in an employer-sponsored plan.

A Roth IRA offers the opposite benefit: you pay tax on income before you make contributions to the Roth account, but you don’t pay taxes when you withdraw funds during retirement.

To qualify for a Roth IRA, you must have an adjusted gross income (AGI) less than $132,000, or $194,000 if married filing jointly.

401(k) vs IRA: Contribution Limits

401(k) plans have a far higher maximum contribution level than either a traditional or Roth IRA. For 2016, employees may contribute up to $18,000 of pre-tax income to a 401(k). Those age 50 or above can contribute an additional catch-up contribution of $6,000.

And that’s not even counting employer contributions. The total amount that can be contributed to a 401(k), including employer and employee contributions, is $53,000 for those under 50, and $59,000 for those 50 and above.

In comparison, the annual contribution limit for either a traditional or Roth IRA is $5,500, or $6,500 for individuals age 50 or above. For Roth IRAs, your contribution limit begins to decrease when your income reaches $117,000 ($184,000 if married filing jointly).

401(k) vs IRA: Investment Options

Most 401(k) plans offer limited investment options in stocks and mutual funds. As an employee, you may be asked to choose an overall investment strategy (aggressive growth, growth, conservative) rather than choosing the number and type of investments.

This suits many employees, who would rather be “hands-off” with their retirement account and leave it to the fund management professionals. But what if you are investment-savvy and want more control over how your money is invested?

Some 401(k)s do come with the option of a self-directed account (called a “brokerage window”) that allows you to trade investments that aren’t in your plan’s official options. However, this is the exception rather than the rule.

A self-managed IRA, on the other hand, is similar to a regular brokerage account. This gives you nearly unlimited investment options, as well as control over the number and type of investments you buy. You can also avoid the administrative fees that many 401(k) plans charge.

401(k) vs IRA: Cost

Most IRAs have no or very minimal annual maintenance fees. You may pay a management fee if you choose to have your account managed by an advisor rather than handling it yourself.

The administrative and record-keeping fees associated with a 401(k), on the other hand, vary widely, and can be as high as 2% annually. While some employers cover these maintenance costs, many do not. The costs tend to be higher in smaller plans—in large plans, the cost is shared among many employees, and so the individual portion is lower.

The small investment selection of 401(k)s also factor into the cost, as you won’t be able to shop around yourself for funds with the lowest expense ratios.

Which One Is Best?

This is a bit of a trick question, as you don’t have to choose one or the other. Your retirement plan may well include both, in order to gain different types of tax advantages. A 401(k) will give you tax savings now, while adding a Roth IRA will allow you to withdraw funds tax-free in your retirement years.

One rule the experts agree on? If your employer offers a retirement plan with matching contributions, you should maximize your contributions to that plan first. For example, if your employer will match your contributions up to 5% of your salary, you should contribute at least that 5% if you can. Otherwise, you’re leaving free money on the table.