If you're a young freelancer in good health, you might think you'll be able to work past retirementage — about 67 for younger workers, according to Social Security rules — and that might not be so bad. But life has a way of throwing you curveballs, and your health, family or other factors might get in the way.

Planning to work forever is not much of a plan. Far better would be to have a pile of cash to help fund your golden years.

Alas, workers today in the United States can depend less and less on traditional pensions — aka "defined benefit" plans, since there's (in theory) a guaranteed payout at the end — and more and more on so-called "defined contribution" plans, like 401(k)s and IRAs. These depend on a worker stashing away his or her own money, and can, unfortunately be wiped out overnight.

Luckily, for young workers with many years to save and diversified assets, investing can help you grow your wealth in tax-advantaged retirement plans — even if the market is rocky along the way. It pays to know your options.

Many employees have access to a company-sponsored 401(k) plan, or, still, a pension if they're lucky. But non-traditional workers need to get a little more creative to fund their retirement. Here are the major ways that a freelancer can save; knowing the account types will help you get ahead.

What's a SEP-IRA?

As your own employer, you can make contributions to a Simplified Employee Pension IRA of up to 25% of net earnings from self-employment (which the IRS helps you calculate here) into a retirement account, up to $54,000 for 2017.

Even though a SEP-IRA has the word pension in it, it's not the same as your grandpa's pension. An old-school pension meant you didn't have to make any contributions and you were guaranteed income in old age; here, you're the one contributing, and if you don't save enough, you risk running out.

Luckily, the design of the account has big upsides that will help your money grow faster over time: All contributions are tax-deductible, and the money grows tax-deferred. It gets taxed when it's withdrawn in retirement.

The advantage of a SEP-IRA over a traditional IRA is far higher contribution limits: You can't put as much in a traditional or Roth IRA in a given year, and individuals under 50 may save just $5,500 per year in 2017.

You can always make withdrawals from your SEP-IRA, but if you do it before retirement, you could pay a penalty. Withdrawals would be included in your taxable income and you'd be subject to a 10% tax if you're under age 59 1/2.

What's a SIMPLE IRA?

One difference between a SEP-IRA and a Savings Incentive Match Plan for Employees IRA is the contribution limit. Here, you can only put only up to $12,500 worth of self-employment earnings in 2017.

The penalty for withdrawing money within two years of establishing the fund is 25% for a SIMPLE plan, rather 10% for early withdrawal from a SEP. And there are often other administrative fees.

You probably won't want to use this plan unless you end up taking on a small number of employees.

Why you'll want to set up an IRA, regardless

If you don't intend to put down $54,000, or even $12,500, a year in retirement savings, you'll still want to set up an IRA: traditional, Roth or both.

Traditional IRA contributions are generally tax deductible; you start paying taxes only when you start making withdrawals in retirement. If you withdraw from a traditional IRA before the age of 59-1/2, you must pay a 10% fee.

With a Roth IRA, contributions are not tax deductible, but they allow for early withdrawals of contributions tax- and penalty-free. You can take out money at any time, as long as you're not taking any investment profits — aka you take out only what you've put in in a given year, or you are using the money for certain qualifying reasons like contributing toward a home purchase. Another benefit is that you're hedging against the possibility that you'll be in a higher tax bracket when you are older.

Again, you are limited to a maximum contribution of $5,500 a year total — across traditional and Roth. Here's Mic's guide to setting up an IRA.

What about a solo 401(k)?

The IRS permits a special kind of retirement account for individuals, the solo 401(k). Mike Piper, aka The Oblivious Investor, has explained why, of all the available options, he thinks opening a solo 401(k) — and making post-tax Roth contributions into it, as you are permitted — could be your best option.

He argues that it combines the best of all worlds: higher contribution limits (compared with a traditional and Roth IRA), and tax-free withdrawals.

"In addition to usually allowing for greater contributions, individual 401(k) plans have another benefit: If you would prefer to do so, you can make Roth contributions to an individual 401(k) rather than pre-tax ('traditional') contributions," he writes.

In the past, individual 401(k) plans came with higher administrative costs. But in the in the last few years, he says, "price competition has brought costs down considerably at some brokerage firms."

"For example, Fidelity's individual 401(k) has no set-up or administrative costs at all. Similarly, Vanguard's individual 401(k) has no set-up fees and only a modest administrative fee: $20 per year for each mutual fund in the plan — and this fee is waived if you have at least $50,000 of assets with Vanguard."

In short, you have a wide range of options to choose from. The next step? Beginning to budget aside some cash each month to contribute to one or more of these account. Here's how to get started.

Sign up for The Payoff — your weekly crash course on how to live your best financial life. Additionally, for all your burning money questions, check out Mic's credit, savings, career, investing and health care hubs for more information — that pays off.