These days, the American workforce expects competitive employee benefits in addition to a fair wage. After health insurance, an employee retirement benefit plan is probably the most important.

However, the exact type of retirement plan you have doesn’t really matter. Whether it’s a 401(k), 403(b), 457, or some other plan, the general concept is the same—you build long-term savings over time through payroll deductions.

The more you put into your plan, the more you have to grow.

Over long periods, like 20 or 30 years, your initial small investments multiply thanks to compound interest. If you contribute 3% of each paycheck and your employer matches your contribution with another 3%, that’s 6% of your earnings each year going toward growing your nest egg.

Most employer plans are tax-deferred, which means that your contributions are tax-free, but then you have to pay taxes when you withdraw the money in retirement. This is good news in terms of having more capital to work with. But, as you are estimating your retirement budget, remember to subtract taxes at your anticipated tax rate.

The exception is Roth plans. Whether it’s a Roth IRA or Roth 401(k), these plans tax your contributions going in, but not when you take withdrawals.

The type of plan matters in terms of when you pay taxes and how much you can contribute per year, but regardless of the details, the most important guideline to remember is: Contribute as much as you can, as early as you can.

Beyond how much you put into your account, the success of your retirement savings also depends on the performance of what you invest in.

What should you invest in?

Most employer retirement plans invest in mutual funds, which are a way for many investors to pool their money together. If you don’t want to hand-pick your investments, look for target date funds that are adjusted automatically toward safer investments the closer it gets to the “target date”—the approximate year you plan to retire.

You’re in luck if you still have several years—or decades—to let your investments grow. If you want to get a little more hands-on in crafting a balanced portfolio, the traditional wisdom is to subtract your age from 100 to find your investment mix. So, if you were 30 years old, you would want to invest 30% in bonds and 70% in stocks.

Because we are all living longer, many advisors now suggest subtracting your age from 110. So, a 30-year-old would invest 20% in bonds and 80% in stocks.

There are also exceptions to every rule.

Your most important step is to start contributing as much as possible to your 401(k), then go from there. Time can be your biggest ally or your biggest enemy.

Also, do your research around some scenarios for your retirement fund. For example, if you changed nothing about your retirement plan, what would be your best-case scenario? Some other questions for consideration: 

  • If you assume about an 8-10% return on investments that you let sit for 20 years or longer, what would be your likely returns based on your current investments and future contributions?
  • If everything goes to your plan, when will you retire and how much Social Security will you receive?
  • How much more could you possibly have if you increased your 401(k) contributions?
  • What other factors—such as debt and homeownership—will affect your retirement finances?

If you or your spouse are self-employed for any significant time in your careers, you can invest in a “solo 401(k)” or “simple IRA for sole proprietors” retirement plan. You can even set up a self-employment plan that allows for loans and hardship withdrawals.

How 401(k) loans work

Not all retirement plans allow for loans. It is up to your employer to set the guidelines for 401(k) loans and the IRS has rules you must adhere to as well:

  • You may borrow up to half the amount you have vested in the retirement plan or up to $50,000.
  • There may be a minimum to borrow, set by your employer.
  • The longest repayment period is five years, unless you are borrowing for the down payment on your primary residence, in which case, the loan period could be up to 25 years.

Usually 401(k) loans are repaid through payroll deductions, the same way you make contributions. Since you are borrowing from and repaying yourself, the interest repaid goes back to your account.

However, unlike other loan interest, 401(k) interest is not tax-deductible, even if the loan money is used to purchase a house.

Unless you specify otherwise, the money will usually be taken out of all your investments equally. So, if you are invested in two mutual funds, your loan would come from divesting equally from each fund.

Just as with any other loan, you sign a loan agreement, outlining the principal (how much you’re borrowing), the length of the loan, and the interest and fees. Interest rates are usually comparable to market rates you could get from a bank. If you have a low credit score, it’s possible a 401(k) loan would be better.

You do not have to pay taxes or the 10% early withdrawal penalty on a 401(k) loan, even if you are not yet 59 1/2. However, that all changes if you leave your employer before repaying the loan.

Perils of 401(k) loans

The whole point of a 401(k) or similar retirement account is to let it accumulate over time, so any withdrawals taken before the age of 59 1/2 are highly discouraged. Not only will you have to pay taxes to the IRS immediately, but you also must pay an additional 10% penalty. That means if you withdrew $30,000, you’d really only get $20,000, a full one-third less.

Fortunately, 401(k) loans are not considered withdrawals—since it’s assumed you will pay the money back—so you do not have to pay taxes or the penalty.

Unless you leave your job.

Many 401(k) loans are automatically due as soon as you stop working for that employer. Often the full amount must be repaid within 90 days. You also might have to pay the taxes and penalty fee on anything you can’t repay.

Other potential perils of 401(k) loans depend on your circumstances. Laws vary from state to state and employer to employer.

  • If you get divorced, your ex-spouse might be entitled to half of your retirement account. You may need to get their approval to take out a loan.
  • If there is a cash settlement of your 401(k) to your ex-spouse, he or she pays the taxes, but if the settlement is to one of your dependents, you pay the taxes.
  • Creditors can come after your 401(k) for unpaid child support, alimony, or taxes.

Another financial consideration is that you repay your 401(k) loan with after-tax dollars, but even after you repay the loan, you will also pay taxes when you withdraw the money in retirement.

Other 401(k) withdrawals

The IRS recognizes that sometimes you will need large amounts of money and your 401(k) is your best option. Exceptions are made if the money is used for:

  • A down payment on your primary residence
  • Avoiding eviction or foreclosure on your primary home
  • Education expenses (college room and board)
  • Qualifying medical expenses
  • Funeral expenses

Your employer decides what qualifies. Sometimes they won’t allow you to contribute to your plan for six months after you take hardship withdrawals. They can make you jump through hoops like applying for commercial loans as part of the process or they may ask for proof that you’re using the money the way you claim to be.

If you’re considering a 401(k) loan, it’s best to gather all the information first and do some comparison shopping. Could you get a personal loan with similar or better terms? How sure are you that you’ll be staying at your job long enough to repay the loan?

The biggest downside to 401(k) loans is the loss of capital in your retirement account. With less money to grow over time, you are making it harder for your future self to catch up. That being said, every situation is unique. 

If you’re just starting out and anticipating a need for a large amount of money in the future, say for a child’s education, you might investigate other options such as a 529 college savings plan or even a life insurance loan.

Weigh the costs and benefits.