At the end of every year, people look for creative ways to reduce their upcoming tax bill. One of the most common strategies for reducing capital gains -- and therefore, capital gains taxes -- is known as tax loss harvesting.

Read on to learn what it means to engage in tax loss harvesting and how the strategy could potentially apply to your own portfolio.

What is tax loss harvesting?

Tax loss harvesting is one of the most-utilized methods for reducing capital gains tax.

If you have realized capital gains (i.e., you sold a security for a profit earlier in the year), you might want to reduce the capital gains tax you'll be responsible for early the next year.

You can effectively tax loss harvest by selling investments with unrealized losses and applying those losses against previously realized gains.

Imagine you bought a stock two years ago for $5,000 and it rose to $10,000 this year. You then sold the stock for a $5,000 long-term capital gain.

You also own a different stock you bought two years ago for $10,000, and it's now worth $5,000. You sell the stock for a $5,000 long-term capital loss.

By harvesting the loss and transitioning it from unrealized to realized, you're able to offset your existing $5,000 long-term capital gain and bring your net capital gain for the year down to zero.

Zero capital gains means zero capital gains tax, and zero capital gains tax often means a happy taxpayer.

Tax loss harvesting rules

There are a few important rules you should know if you're attempting to use tax loss harvesting in your own portfolio.

First, tax loss harvesting won't work in a 401(k), 403(b), IRA, or any other tax-advantaged investment account. Trading activity isn't taxed in these accounts; instead, you're taxed when you withdraw money (except if you're investing in a Roth account, in which case you've already been taxed on the money inside).

For tax loss harvesting to be applicable, you'll need to be working inside a taxable brokerage account.

Next, you'll need to be aware that tax loss harvesting involves applying short-term losses against short-term realized gains, and long-term losses against long-term realized gains. If you're left with a loss in one category and a gain in the other, you can offset the two to come up with a final net number for capital gains.

This amount (if positive) is added to your income for the year; if your net number is negative, it can be used to offset as much as $3,000 worth of ordinary income for the year. Note that the maximum annual limit for capital loss deduction is $3,000, regardless of your filing status (i.e., the limit doesn't jump to $6,000 for married filers).

Any losses in excess of the $3,000 limit can be carried forward indefinitely. This means that you can use a large loss in one year to cover future years' capital gains if you're fortunate enough to have them.

Note that even if you have positive capital gains for the year, you may not pay the same tax rate on them as you do for the rest of your income. Still, if you have a short-term capital gain, you'll pay ordinary income tax on the gain.

If you have a long-term capital gain, on the other hand, you'll be eligible for favorable tax rates ranging from 0% to 20%, depending on your total income level.

Finally, you'll need to be aware of the wash sale rules, which we'll cover in the section below.

What is a wash sale?

To harvest tax losses, all you have to do is sell a security with an unrealized loss. However, you can't simply buy back the stock immediately. To comply with the wash sale rules, you have to stay out of the stock for at least 30 days after the sale. If you don't, then you can't harvest that tax loss. But once you wait out the period, then you can buy back the stock with no tax penalty.

The wash sale rule can make it difficult to harvest tax losses from a stock that you hope to rebound. By being out of the stock for roughly a month, you might well miss out on a sizable share-price gain. However, the IRS thinks these measures are necessary to prevent abuse of the tax loss harvesting strategy.

Does tax loss harvesting work?

In short, yes. Tax loss harvesting does work, but your circumstances need to allow for it.

As an example, to make the most of your capital loss, you'll also need to have locked-in (realized) gains on positions sold earlier in the year; if you don't have any gains, you would only be able to use $3,000 worth of losses to offset ordinary income in the same year (with the rest available as a carry-forward).

If you have a $10,000 gain in a single year, you could sell a position with a $10,000 loss, net the two, and effectively eliminate your capital gains burden for the tax year.

It's important not to lose the forest for the trees while engaging in tax-loss harvesting. If you sell a losing position to reduce your tax bill, you might consider reinvesting the proceeds in a different security within a reasonable time frame.

Time out of the market, even in an effort to reduce your taxes, could hurt you if you miss positive market performance. By selling off assets, you'll also reset your holding periods for long-term capital gains treatment. This is why it's best to have a plan for what you'll do with the proceeds if you decide tax loss harvesting is right in your situation.

Is tax loss harvesting worth it?

This is a question only you can answer, but there are situations in which tax loss harvesting makes a lot of sense.

If you're a high earner, for example, and you have a short-term realized gain that threatens to be taxed at ordinary income rates, you might look for losses in your taxable portfolio that can be used to absorb some or all of that gain.

Recall that short-term gains for high earners can be taxed as high as 50% or 60% depending on where you live, so this is real money at stake.

For lower earners, the impact is smaller -- but not insignificant if you're willing to put in the time to accurately estimate your net capital gains every year.

What is the last day for tax loss harvesting?

All tax loss harvesting must be done by the final trading day of the calendar year, which happens on Dec. 31 or a couple days earlier. You won't be able to retroactively apply losses to gains if you wait until the new year to make your transactions.

The bottom line on tax loss harvesting

Suffering losses in your investments is never fun, but tax loss harvesting lets you get a little of your money back from the IRS. By knowing what you have to do to claim those tax losses, you'll be better prepared to cut your tax bill when tax season rolls around again.

The Motley Fool has a disclosure policy.