Over the course of a career, Americans change jobs more than 10 times, on average, staying in each job just 4.4 years, according to the Bureau of Labor Statistics.

And each job change typically comes with an important decision—whether to leave a 401(k) retirement account in place or roll it over into an IRA.

New wrinkles have emerged in the decision-making process, as 401(k) plan providers are under pressure to lower expenses and reveal more details about those expenses and as some employers expand and/or improve the investment options—all of which could make 401(k)s more attractive.

But brokerage firms, eager for the assets, urge savers not to leave their 401(k)s behind, and several of them, including Fidelity, Schwab and TD Ameritrade, have offered bonuses as high as $2,500 if you bring your workplace retirement account to them and convert it to an IRA.

Warning: There’s a third choice as well—you could cash out your 401(k) when you leave a job. But this usually is the worst option unless the money is desperately needed. Better to let the assets continue to grow tax-deferred for as long as possible in either a 401(k) or an IRA.

Here’s how to decide what to do…

WHEN IT’S BEST TO KEEP THE 401(k) IN PLACE

In the following situations, lean toward keeping the 401(k) where it is.

You separate from an employer in your late 50s and might need to tap the account soon. If you separate from an employer in or after the year in which you reach age 55, you may be able to make withdrawals directly from that employer’s 401(k) without penalty. If you rolled that money over to an IRA, you would face a 10% early-withdrawal penalty on withdrawals made from the IRA before age 59½. Public safety employees, including police officers, firefighters and medics who worked for state or local governments, can qualify for penalty-free 401(k) and 403(b) withdrawals as early as age 50 if they separate from service at or after this age.

It’s best not to withdraw money from tax-deferred accounts when you’re in your 50s—it is better to let this money continue to grow. But withdrawals might become necessary if you have limited savings outside of tax-deferred accounts and have trouble finding a new job.

Your 401(k) offers great investment options with low fees and expenses. Some 401(k) plans charge modest fees and offer a wide range of desirable investment options. These may include access to low-expense institutional shares of mutual funds not otherwise available to individual investors…or “brokerage windows”—side doors that allow 401(k) plan participants to escape the limited investment options available through their 401(k) plans and opt for other mutual funds, stocks and securities instead.

Unfortunately, many 401(k) plans feature low-quality or limited investment options and impose relatively steep fees and expenses.

What to do: Evaluate the quality and costs of the investments available through your 401(k) before deciding whether to roll over to an IRA. All 401(k) providers now are required to supply fee disclosures to participants, which should help in this evaluation. Check the 401(k)’s administrative fees—anything significantly above $50 per year is on the high side. Next, use an independent resource such as research firm Morningstar to compare the rankings, returns and expense ratios of the mutual funds available through your 401(k) to those of comparable funds offered by low-cost IRA providers such as Vanguard and Fidelity.

If you don’t feel qualified to evaluate your former employer’s 401(k) plan on your own, pay a fee-only financial planner to help. But confirm that you’re working with a fee-only planner—someone who receives only an hourly fee. A financial adviser who earns commissions on investment sales may have a financial incentive to encourage you to roll the money into an IRA.

Rule of thumb: If an employer has fewer than 100 employees, there’s a good chance that its 401(k) has relatively high costs. If it has more than 1,000 employees, there’s a good chance that it imposes lower costs than those available through an IRA. There are plenty of exceptions to this, however.

You might require protection from creditors. Federal law provides 401(k) assets with relatively strong protection from creditors, even in bankruptcy. In contrast, federal law provides only limited protection for IRAs when you file a bankruptcy claim, and outside of bankruptcy, IRA protections vary from state to state.

If you suspect that you might have to declare bankruptcy in the future…or you might be targeted in a lawsuit—perhaps because you’re a doctor, contractor or in some other profession where lawsuits are common—ask an attorney how well your state shields IRAs from creditors. If the protection is weak, it could be worth leaving assets in the 401(k).

WHEN IT’S BEST TO MAKE A SHIFT

As indicated above, it may make sense to roll over a 401(k) to an IRA if the 401(k) has poor investment options and/or high fees and expenses. You can choose better investments from a low-cost IRA provider such as Vanguard or Fidelity.

Also, in the following situations, lean toward shifting your assets…

If you join a new employer that has a 401(k) plan offering excellent investment options and low costs, you might be allowed to roll your existing 401(k) into the new employer’s 401(k) plan. Ask the new employer’s benefits department for details.

You want to maintain as much control as possible over your money. When you leave your money in a former employer’s 401(k), that money is at the mercy of the employer’s decisions.

Example: If the former employer changes from one 401(k) provider to another, your money can be moved into investments that you have not selected unless you promptly choose from among the new investment options. Your money also will be unavailable to you in a “blackout” period during this transition between 401(k) providers.

One option is to leave your money in the former employer’s 401(k) for now, then roll it over if the 401(k)’s investment options later change for the worse. But most people fail to carefully track changes in their former employers’ 401(k) plans. Some don’t read the notices that the plan sends them, while others stop receiving notices entirely because they failed to inform the plan’s administrators of an address change.

Also: In rare cases, 401(k) plans are disqualified because employers fail to follow IRS rules. Employees and former employees who have assets in these disqualified plans might have those assets distributed to them, costing them their chance for continued tax-deferred growth. Rolling 401(k) assets into an IRA avoids this danger.

You have many 401(k)s and want to keep your financial life as simple as possible. The more 401(k)s you have with prior employers, the greater the odds that you will lose track of some of them…and the more difficult it becomes to monitor the overall asset allocations of your savings. Consolidating multiple 401(k)s into a single IRA simplifies your financial life and reduces the odds that you’ll lose track of any savings.

You have a significant amount of highly appreciated company stock in your 401(k), and you’re age 55 or older. The tax code offers a little-known opportunity for those who have company stock in their 401(k)s. If you roll this 401(k) into an IRA, you have the option of distributing the company stock into a taxable account rather than the IRA.

Shifting assets from a 401(k) to a taxable account generally means paying income tax on the full market value of those assets. But with company stock, you’re required to pay income taxes only on the “cost basis” of the shares—the amount you originally paid for them. You will have to pay long-term capital gains tax on the stock’s “net unrealized appreciation”—the difference between that cost basis and the eventual sales price—when you later sell the shares.

For most people, long-term capital gains tax rates are substantially lower than income tax rates, so you should come out well ahead.

It is worth speaking with a financial adviser or tax professional before attempting this—the rules are complicated.

Warning: If you separate from your job prior to the year in which you turn 55, rolling company stock into a taxable account in this way will result in a 10% early-withdrawal penalty.

You have less than $5,000 in the 401(k). If your 401(k) balance is below $5,000, your employer can require you to either roll it over or cash it out when you leave.