Keeping costs low is a key tenet of successful long-term investing, but investors sometimes forget that taxes are a cost too. A lot of attention is paid to the tax rates investors will pay on income or capital gains, but investors are often less focused on the location where they hold certain investments.

Investments that generate high levels of income or capital gains distributions for investors are often better to be held in tax-advantaged accounts such as an IRA rather than taxable brokerage accounts. Of course, if you’re relying on the income from those investments to meet your short-term spending needs, you’ll need to hold them in an account that allows for regular access without incurring early withdrawal penalties.

Here are five investments that you should consider avoiding in any of your taxable accounts.

1. Taxable bonds

Taxable bonds and bond funds can be a great way to generate income from your investments. In fact, much of the return that you earn as a bond investor comes in the form of interest income, but that income will typically be taxed at ordinary income rates, which eats into the return you earn as an investor.

One type of bond that is a great fit for taxable accounts is municipal bonds. Interest income from municipal bonds isn’t subject to federal income tax and you may be able to avoid state taxes in certain instances. These are some of the best municipal bond funds to consider for your portfolio.

2. Real estate investment trusts (REITs)

Real estate investment trusts, or REITs, can be a relatively simple way for investors to gain exposure to the real estate market and these securities often come with high dividend yields because they’re required to pay out at least 90 percent of their annual income in the form of dividends.

While the income generated from REITs is great for investors, it’s even better when the security is held in a tax-advantaged account because you won’t owe taxes on the income, though eventually you will be subject to taxes on withdrawals from traditional IRAs and 401(k)s. If possible, steer clear of holding REITs in a taxable account.

3. Dividend-paying stocks

Dividend-paying stocks can be popular with investors for their ability to generate income while also growing your wealth over time. The downside of holding dividend stocks in a taxable account is that dividends may be taxed at ordinary income rates and you can’t control whether or not you receive the dividends.

You could even find yourself in a situation where the dividends you receive push you into a higher tax bracket. For these reasons, tax-advantaged accounts such as a traditional or Roth IRA are a better place to hold dividend stocks.

4. Actively managed mutual funds

Actively managed funds are another area that can create tax headaches for investors when held in taxable accounts. Active funds often have high portfolio turnover as managers try to position their portfolios to the places they find most attractive. But all the buying and selling generates capital gains for fund shareholders who are left to pay the tax bill.

As with dividends, fund shareholders have no say in when an active fund chooses to realize capital gains, so the distribution may come as a surprise to investors. Low-cost index funds and ETFs have proven to be much more tax-efficient over time.

5. Balanced funds

Balanced funds hold a combination of stocks and bonds, with the stocks providing growth for the portfolio, while the bonds generate income. The income generated by these bonds is taxable.

Balanced funds may also have to sell securities in order to maintain the fund’s desired asset allocation. This portfolio rebalancing could lead to capital gains for the fund’s shareholders. For these reasons, it’s best to hold balanced funds in a tax-advantaged account.

Bottom line

All the investments mentioned above can be perfectly sensible assets to own. But because they generate income and distribute capital gains, investors are better off holding these securities in tax-advantaged accounts where they’ll be sheltered from taxes.

Editorial Disclaimer: All investors are advised to conduct their own independent research into investment strategies before making an investment decision. In addition, investors are advised that past investment product performance is no guarantee of future price appreciation.