Just because you can do something doesn’t mean you should. Like entering a hot dog eating contest, getting a tattoo on your face — or even maxing out your 401(k).

The last one may seem incongruous; after all, numerous studies show Americans feel they aren’t saving enough for retirement. And if you have read any personal finance advice, you probably believe the best bet is to save, save, save.

But depending on your financial situation, putting $18,000, the maximum allowable amount for savers younger than 50, into an employer-sponsored retirement account each year may not make sense. Here are three things to consider before maxing out your 401(k).

1. Nonretirement goals.

While you’ll be grateful for what you save now once the time comes to retire, it’s important to think of the big picture: What other goals do you have between now and then?

Clients regularly ask whether they should max out a 401(k) — and sometimes they are surprised by the answer, said Jeff Weber, a certified financial planner and wealth adviser at Titus Wealth Management.

“Most people think that putting extra money aside for retirement is the best policy,” he said. “But we like to take a look at the big picture and make sure they’re covered in other areas, too.”

As part of the decision process, Weber ticked through a checklist with clients:

Do you have any high-interest credit card debt? If so, pay that off ASAP.

Have you built up an emergency fund with three to six months of living expenses?

Do you have adequate health insurance and life insurance?

Do you have adequate disability insurance in case you’re out of work for six months or more?

Do you have a basic will or trust established?

If you are close to retirement age, do you have long-term care insurance?

Generally, Weber said he wants his clients to have these goals in place before maxing out a retirement plan. But if they don’t, he said he still urges clients to contribute the minimum to get their employer’s match for a company-sponsored retirement plan, if it’s offered.

2. Today vs. tomorrow

Retirement planning is a balancing act of putting money aside for later, while keeping enough readily available to pay for stuff now or in the near future. Wait too long to start saving and you’ll have to play catch-up later. Save too much now and you may need to raid your retirement account.

The statistics on retirement savings can be depressing. A recent study by Ascensus, a retirement plan provider, found that about half of Americans are saving less than 5 percent of their income and only 35 percent of employees are on track to meet their retirement goals.

As a result, the knee-jerk reaction for many advisers is to encourage people to max out savings — and even max out a 401(k), said Rick Irace, chief operating officer at Ascensus. “But that’s not realistic for everyone.”

Irace said he was reminded of that recently when his daughter, who’s in the early stages of her career, asked for advice on her employer-sponsored plan.

“I knew she had other goals in mind and so she had to balance what she can put away for retirement while having enough money to pay rent, gas and everything else,” Irace said. The decision? His daughter is setting aside money in a rainy-day account and began funding her retirement by contributing the minimum amount to meet the company match.

The company-match perk, which is fairly common among firms that offer retirement plans, means your employer will match your contributions up to a certain percentage. While the amount varies, it’s free money for those who contribute to their plans.

3. Other investment options

OK, so you have all your financial ducks in order and are able to set aside that $18,000 (or $24,000 if you’re 50 or older). Is it time to max out? There are other options to consider. Deciding where to invest money beyond the amount required to meet your company’s match limit primarily comes down to one thing: fees.

If the fees in your employer-sponsored plan are high, direct additional money to a traditional or Roth IRA. The contribution limit is much lower — $5,500 a year or $6,500 for those 50 or older — so if you have spare money beyond that, funnel it back into the 401(k).

When choosing between the traditional and Roth variety of an IRA or 401(k), the difference comes down to when you’ll be taxed. In traditional accounts, contributions are pretax and distributions in retirement are taxed; with Roth accounts, contributions are made after taxes but retirement distributions are tax-free.

Another perk of both types of IRAs? These accounts typically have a broader assortment of investments, such as exchange-traded funds. If you are in a place financially where you can max out a 401(k) and IRA without jeopardizing other goals, do it, Irace advises. 

Anna-Louise Jackson is a staff writer at NerdWallet, a personal finance website.