During the past five years, stock market investors have enjoyed huge gains. Unfortunately, the IRS will almost certainly be one of the biggest winners from your smart investment strategies, as most people have to pay capital gains taxes on the profits they earn from stocks, mutual funds, ETFs, and other investments. But there are certain steps you can take to pay as little in capital gains taxes as possible. Let's take a closer look at three of them.

1. Capital gains taxes go down if you hold onto investments longer than a year.
There are two different rates you'll pay on capital gains taxes, depending on how long you've owned a particular investment. If you sell after just a year or less, you'll pay short-term capital gains rates. This will be your ordinary income tax rate -- the same that you pay on wages and other income -- and can reach as high as 39.6%. By contrast, if you sell after holding for longer than a year, then long-term capital gains rates apply. They can be as low as 0%, and max out at 20% for top-bracket taxpayers.

Source: Phillip Ingham, Flickr.

As a result, you have an incentive to become a longer-term investor in order to cut your capital gains taxes. Tax considerations shouldn't be the only factor in deciding whether to hang onto an investment, but all other things being equal, waiting until after a year has passed will mean a much smaller bill for capital gains taxes.

2. You're in control when it comes to incurring capital gains taxes.
Many investors make a big deal out of the tax deferral that tax-favored retirement accounts like IRAs and 401(k)s offer. But another form of tax deferral comes simply from the fact that, until you sell a stock, you don't owe any capital gains taxes on your paper profits.

This simple fact gives you a lot of control over your tax bill. If you're in a low tax bracket, choosing to sell stock at a profit will generate capital gains, but the taxes on those gains might be lower than they would be if you'd sold in a later year when your tax bracket may be higher. By contrast, hanging onto highly appreciated stock means that you might never have to pay any capital gains taxes on it -- especially because assets you own at your death get a step-up in tax basis that effectively resets your capital-gains tax liability at zero.

One big exception to this rule applies to mutual fund investors. If a fund manager sells shares of a stock holding, then you might have liability for capital gains taxes even if you don't sell your fund shares. Essentially, the decision your manager made to sell gets passed through to your account, leading to a higher tax bill for you. Apart from that, though, timing your capital gains is largely up to you.

Source:

3. Use IRAs and other tax-deferred accounts to avoid capital gains taxes.
Many investors use a combination of different strategies, using a long-term buy-and-hold strategy for part of their portfolios, but also taking a more active stance with another part of their overall holdings. To reduce capital gains taxes, it's best to use IRAs for the active portion of your portfolio. That way, the bulk of your capital gains from your trading activity -- which often will be short-term gains -- won't get taxed at all. Meanwhile, if you keep long-term investments in taxable accounts, any long-term capital gains taxes you incur will be at lower rates. Obviously, IRAs are useful in reducing taxes for any investment where you have a profit; but if you have to choose, use precious IRA assets for the active part of your portfolio to maximize your tax savings.

Obviously, everyone likes to have capital gains. It's just the capital gains taxes that are annoying. But if you follow these three simple steps, you can cut the amount you'll have to pay in capital gains taxes, and keep more of your hard-earned money for yourself.