You know it’s important to save and invest for retirement. And the earlier you start, the better chance for success you’ll have.

For one, time is a critical factor in determining how much compound interest can work in your favor. The longer your money has to compound and earn interest on interest, the more you’re likely to earn. Compound interest works exponentially.

The longer your time horizon in the stock market, the less likely you are to experience severe losses, too. Giving your investments more time to ride out ups and downs and market volatility means exposing yourself to less risk.

All of this is good to know — but it doesn’t get into the nuance and all the details about where you should contribute money for retirement.

Like I said, you already know it’s important. Now you need to know exactly how to do it. You can start by understanding the various rules around contributions for different accounts.

Below, you’ll find a list of retirement accounts and some rules that will help you determine how best to use them to your advantage.

Contribution Rules on Various 401(k)s

You’ve probably heard of the 401(k). It’s a common employee benefit that you should take advantage of if you have access to one.

You’re not out of luck if you’re self-employed. You can explore the Solo 401(k) or check out the SIMPLE 401(k) instead.

Here’s what to know about contributing to a 401(k):

  • The employer sets the waiting period for new employees regarding when they can start contributing to their 401(k) plan. Periods may vary, but they can’t exceed one year.
  • You can contribute up to $18,000 per year (as of 2017).
  • Employers can match your contributions up to a combined total of $54,000.
  • Employees age 50 and up may put in an extra $6,000 for the year as a catch-up contribution.
  • There is an income cap of $270,000 that applies to the amount an employer can match.
  • As the employee, you can contribute to your 401(k) with no income cap — as long as you don’t exceed the yearly contribution limit.

Solo 401(k) plans are very similar to traditional 401(k) programs. These accounts offer business owners with no additional employees an opportunity to invest in a 401(k). This plan follows the same basic rules with a few added perks:

  • The business owner plays the part of both employee and employer.
  • Employer contributions can be up to 25% of the “salary” or earnings of the business.
  • Like the traditional 401(k), contributions as the employee are capped at $18,000 per year — but the yearly total contribution is capped at $54,000.
  • If you’re over 50, you get the same catch-up contribution of $6,000.

Contributing to IRAs and Roth IRAs

Traditional individual retirement accounts (or IRAs) and Roth IRAs both offer good ways to save for retirement while enjoying tax benefits.

A traditional IRA works like a 401(k), in that your contributions are tax-deferred today. This can give you a tax break during your earning years, but you need to pay taxes on your withdrawals when you make them in retirement.

Here are some specifics on traditional IRAs:

  • Anyone under the age of 70 and a half who earns taxable or self-employment income (younger than age 70 ½) can open and contribute to an IRA account.
  • You can contribute to an IRA while contributing to another retirement plan through an employer.
  • You may face income limits on this account, depending on whether you (or your spouse) has access to an employer-sponsored plan.
  • You may only contribute $5,500 between all IRA accounts per year (you can divide that amount between a traditional and a Roth, for example — but you can’t put $5,500 into both accounts).
  • The non-working spouse in your family can also contribute up to $5,500 to their account if they follow IRS guidelines for doing so.

Roth IRAs are a little bit different. You pay taxes on your contributions today, but you get to withdraw that money tax-free in the future. The rules look a little different, too. Here’s what to know:

  • There are no age caps for Roth IRA contributions — but there are income caps that kick in on a sliding scale. Once your adjusted gross income reaches $118,000 (or $186,000 if you’re married), you start hitting limitations on how much you can contribute.
  • You can contribute up to $5,500 if you’re under 50. You can contribute $6,500 if over age 50.
  • The IRS gives you 15 months to contribute for each tax year beginning on the first day of the year and ending on the tax deadline of the next

What to Know If You Use a SIMPLE IRA

SIMPLE IRAs are like a cross between the standard employer-sponsored 401(k) and regular IRA accounts. They can help you if you’re small business owner, and this might be your employer’s choice if you work for a small company.

The big advantage? SIMPLE IRA account holders can contribute more than twice as much per year compared to the other types of IRAs. Here are some other contributions guidelines and rules:

  • As an employee, you must have earned a minimum of $5,000 in either of two previous years before you can qualify for employer contributions to a SIMPLE IRA.
  • You can contribute up to $12,500 per year (unless your earnings were less than that, in which case your contributions would max out at the amount you earned).
  • There is no age cap to contribute as an employee. Employees ages 50 and up can contribute an additional $3,000 as a catch-up contribution.
  • You will hit a salary cap at $270,000 regarding the 2% employer contribution.

Rules and Limits for SEP IRAs

SEP stands for Simplified Employee Pension, and they’re another common choice for small business owners, entrepreneurs, and freelancers. That’s thanks to the fact that you can include your contributions as tax write-off, an important benefit for self-employed workers trying to minimize their tax burden.

You just need to earn some kind of 1099 income to qualify to use a SEP. This could be earnings from a part-time side hustle, or from your full-time freelance business.

Here are other details about SEP IRAs to keep in mind:

  • There are no income limits.
  • If you’re using a SEP as an employee, you must have been employed by your company for three of the past five years with income of at least $600 per year — but only employers can contribute to a SEP. (You need a personal IRA if you want to make contributions yourself).
  • Employers (which means you if you’re self-employed) can contribute up to $54,000 or 25% of an employee’s salary (whichever is less).
  • If you contribute to your own SEP and have employees, you must put the same percentage into their SEPs as you put into your own.
  • You can have both a SEP and a traditional IRA for retirement savings.

Obviously, there are a lot of considerations to work through to determine the best kind of retirement account to use (especially if you have more than one option available). This only gets more complex when you own your own business, as you have more decisions to make.

In most cases, you always want to contribute at least enough to secure the match in your 401(k) if you can use one. That match is like free money, so don’t leave it on the table.

If you don’t have a 401(k) but can contribute to another type of plan that offers a match, like a SIMPLE IRA, take advantage and get that match!

Beyond that, you want to make sure you diversify your retirement accounts if you have more than one. When you use a 401(k) or a SEP IRA, for example, your contributions will be tax-deductible. That helps you out today, but you need to pay taxes in the future when you make withdrawals.

You can balance your tax advantages by also contributing to a Roth IRA. You pay taxes now, so you can withdraw money tax-free in the future. This keeps your accounts more diversified than if you were to use, say, a 401(k) and a traditional IRA which carry the same tax advantages.

But again, it’s complicated and can quickly get confusing. Talk through your options with a fee-only financial planner who can take both what’s available to you and your goals into account to create a well-rounded, comprehensive plan that shows you how to work your wealth to the fullest extent.