Founded in 1993 by brothers Tom and David Gardner, The Motley Fool helps millions of people attain financial freedom through our website, podcasts, books, newspaper column, radio show, and premium investing services.

The answer to the "How can I earn tax-free income?" question may surprise you -- because there are actually lots of ways to collect dollars without being taxed on them. Here are nine common ways.

"In this world nothing can be said to be certain, except death and taxes." -- Benjamin Franklin, in a 1789 letter to Jean-Baptiste Leroy

Benjamin Franklin's quip is famous and certainly seems true, but taxes are not always as certain as you might think. There are actually a number of ways to achieve tax-free income, some of which might serve you well.

Image source: Getty Images.

Here's a look at nine ways to get tax-free income.

1. Roth IRAs and Roth 401(k)s

You may not realize it, but just as there are two main kinds of IRAs -- traditional and Roth -- many companies now offer their workers the choice between traditional and Roth 401(k)s. With a traditional IRA and 401(k), you contribute pre-tax money that reduces your taxable income and, therefore, your tax bill for the year. When you withdraw the money in retirement, it's taxed as ordinary income to you. With the Roth IRA and 401(k), though, you contribute post-tax money that doesn't deliver any upfront tax break. But you eventually get a big tax break when you withdraw from the account in retirement – because you get to take all the money out of the account tax-free if you follow the rules. For 2017, you can contribute up to $5,500 and $18,000 to IRAs and 401(k)s, respectively, with an additional $1,000 and $6,000 allowed, respectively, for those aged 50 or older. If you contribute $10,000 per year for 20 years and your contributions grow by 8%, on average, annually, you'll end up with almost $500,000 -- and you can take it all out tax-free in retirement!

Image source: Getty Images.

2. The home-sale exclusion

Our tax code features a generous home-sale exclusion, permitting many home sellers get to exclude up to $250,000 in capital gains from the sale of their home from taxes -- and up to $500,000 for married couples filing jointly. They do have to follow a few rules, though, such as having lived in the home for at least two of the five years before the sale. As an example, if you buy a home for $200,000 and sell it many years later for $400,000, you'll have a gain of $200,000 and it can all be tax-free income to you.

3. Municipal bond interest

In most cases, interest from municipal bonds is free of federal taxation and often free from state taxes, as well. That's not the case with most bond interest. This is one attractive feature of municipal bonds, as well as the fact that many of them are rather sound, issued by state or local governments with strong credit ratings. Note that if you're receiving Social Security income or are subject to the alternative minimum tax, your interest may indeed be taxed, so ask your accountant about that, or look into it further, yourself. (Your tax-prep software might flag this for you, too.)

Image source: Getty Images.

4. Stock losses

Stock losses aren't things that generally please us, but they can be put to good use, offsetting gains from stocks we sell. Imagine, for example, that you sell stocks this year and realize capital gains of $10,000. If you also have $6,000 in losses, you can offset your gains with the losses, ending up taxed on only $4,000 of gains. The other $6,000 in gains is essentially tax-free. If your losses exceed your gains, you can use up to $3,000 of your losses to offset your taxable income, too, carrying forward any losses still remaining to future years.

5. FSAs and HSAs

Using health savings accounts (HSAs) or flexible spending accounts (FSAs) can also shield some income from taxes. Contributions to them are made with pre-tax money, shrinking your taxable income. Note that you need to have a qualifying high-deductible health insurance plan to be able to take advantage of HSAs. They can be well worth it, though, as they let savings accumulate and grow over time, not taxing withdrawals for qualifying medical expenses. After age 65, you can withdraw money from an HSA for any purpose, paying ordinary income tax rates on withdrawals. Any unused amounts can be rolled over from year to year, unlike FSA money, which is mainly use-it-or-lose-it from year to year. (Still, even that can be very helpful.) Contribution limits are $2,600 for Health FSAs in 2017 and for HSAs, they're $3,400 for individuals and $6,750 for families in 2017, with an additional $1,000 allowed for those 55 or older. Use these accounts as intended and you'll be paying for health expenses with tax-free income.

Image source: Getty Images.

6. Gift money

In 2017, you can give up to $14,000 to anyone you'd like, and married couples can give up to $28,000 -- and that money is tax-free to the recipient. The gift limit changes every year or few years, so keep up with the changing tax code if you're interested in this tax break. This is a good way for parents or grandparents to pass money down to children and grandchildren. If there's a lot of money to be given, it can be given in chunks over a bunch of years.

7. Airbnb

Tax rules allow you to rent out your home for up to 14 days in a year and to collect any income from that tax-free. This can be meaningful if, for example, you can rent out your fancy home for $2,000 per week for two weeks -- that would be $4,000 in tax-free income that you don't even have to report to the IRS. You might rent out your home via Airbnb or other means, but know that however you do it, there are more rules to follow for the tax break. For example, you also need to live in the home for 14 or more days during the year or at least 10% of the total number of days you rent it out to others.

Image source: Getty Images.

8. Life insurance

If you collect a life insurance benefit when someone dies, it will probably be completely tax-free income to you. There are a few exceptions to this rule, so take a closer look if you received a life insurance payout during the year.

9. Social Security

Finally, know that while Social Security benefits are sometimes taxed, such as if you work during retirement and earn a certain amount of income, no more than 85% of your benefits can be taxed and if you don't have much other income, it's likely that none of your benefit dollars will be taxed.

While death is indeed certain, taxes don't always have to be. The nine income sources above are examples of income you can receive that's tax-free.

Author

Selena Maranjian has been writing for the Fool since 1996 and covers basic investing and personal finance topics. She also prepares the Fool's syndicated newspaper column and has written or co-written a number of Fool books. For more financial and non-financial fare (as well as silly things), follow her on Twitter... Follow @SelenaMaranjian