By leveraging the tax code, Donald Trump “wrote off” over $900 million in net operating losses from his various business ventures on his 1995 IRS tax filing, even as his net worth continued to grow.   The IRS allows individuals (particularly real estate developers) to claim these paper losses for up to 20 years to offset both past and future income, even if they invested little of their own capital.  Most experts speculate that Trump hasn’t been required to pay income taxes for nearly two decades because of his tax-avoidance strategy.

We are getting an eye-opening lesson in the ways individuals can leverage strategic mixes of partnerships, trusts, licensing deals, and corporate entities combined with accounting gimmicks to reduce personal taxes.  While some of these methods require teams of lawyers and accountants, some methods, like tax-loss harvesting, require minimal effort and cost nothing.   Here are the 5 basic rules you need to know to get started with tax-loss harvesting:

(1) In any given year, your realized capital losses offset any realized capital gains, reducing your net gains subject to taxes.  Note that short-term losses are first deducted against short-term gains, and longterm losses are deducted against longterm gains. Net losses of either type can then be deducted against the other kind of gain.

If you lost $5,000 selling your Chipotle stock* (because you figured out that “fresh” & “local” means that E.Coli can hitch a ride in your burrito) and if you gained $9,000 selling Netflix stock (because you knew cord-cutting was a real phenomenon), you would only get taxed on your net capital gain of $4,000.

(2) You can deduct capital losses up to $3,000 per year.  This is a free gift from the IRS. Don’t let this freebie pass you by.  

If you lost $4,000 selling Wynn Resorts stock (because you didn’t realize Chinese high rollers would suddenly scale back their big Baccarat bets), you can deduct $3,000 of that loss.

(3) Capital losses roll over from year to year.

If you lost $30,000 selling your stock in Potbelly Sandwiches Co. (because their succulent BBQ pulled pork sandwiches blew you away but ended up being just a fad) you can take the $3,000 deduction for 10 years in a row (if you have no other gains to offset).

(4) Capital losses that you rollover will offset future capital gains.

If you sell your shares in Facebook at a $20,000 gain a couple years from now (if Instagram takes off like wildfire and gets monetized), your $30,000 losses in Potbelly Sandwiches would make your Facebook winnings tax-free!

(5) There is no limit to how often or how much you can tax-loss harvest.

The only stipulation is that if you buy the same asset again within 30 days of selling it, your capital losses are deferred until you sell the shares for the second time.  This is called the wash sale rule.  This rule is easily skirted by buying a similar asset instead of the same asset.

*Individual stocks are for illustrative purposes only.  The evidence is clear that investing in a basket of individual stocks RARELY beats diversified index funds over 3-year, 5-year, and 10-year time horizons.