Smart investors know that sometimes losers can be winners. Here’s how tax-loss harvesting could save you money.

Tax-loss harvesting can be useful in an array of situations, but understanding when to best utilize this strategy is key. Tax-loss harvesting is the practice of selling an investment for a loss. By realizing, or harvesting, a loss, investors can offset taxes on gains and income.

The following example illustrates the concept:

On the first day of the year, you invest $50,000 in a fund that tracks the entire U.S. stock market. The market drops approximately 20% by May 1, and as a result the value of the fund has dropped to $40,000. While few people enjoy watching the market fall, there is one potential benefit: You can sell the investment, realizing a $10,000 loss for tax purposes.

At this point, you can then purchase a different fund that tracks only the S&P 500. Per IRS rules, you must wait at least 30 days from the day the loss was realized before purchasing a “substantially identical” investment, but by choosing this method you can immediately purchase a fund that tracks a different index. After 30 days elapse, you may then switch back to the original investment, or continue to hold the new investment if it meets your needs.

Continuing with this scenario, by Sept. 1 the market rallies and the S&P 500 fund you purchased is now sitting at $55,000. You are satisfied with holding the S&P 500 fund for the long term, therefore you have locked in a loss for tax purposes while the value of your investments has increased.

Tax-loss harvesting has the potential to add value in a number of circumstances, but it does not make sense for every situation. Tax-loss harvesting both creates a capital loss for tax purposes in the current year and also lowers the cost basis of the investments you own.

Taking long-term advantage of this tax tool

One of the most powerful benefits of tax-loss harvesting stems from the fact that after offsetting other capital gains, the first $3,000 ($1,500 if married filing separately) you accumulate…