Selling a stock for gain to offset other stock loss
Long term gains are taxed at 15% maximum.  Losses, up to the $3K/yr you cited, can offset ordinary income, so 25% or higher, depending on your income. Better to take the loss that way. With my usual disclaimer: Do not let the tax tail wag the investing dog.
"Because they track an index. Edited: The definition of the word in this case meaning ""something used or serving to point out; a sign, token, or indication"" from Meaning  #3 I presume therefore you are asking what an index is? There are many variations of what makes up an Index but in short it is a representation of some part of a market. An extremely simplistic calculation would be to take a basket of stocks, and sum their prices.  If one stock moves up a dollar, and one moves down a dollar, the index has effectively not changed, as it is presumed that the loss in one is offset by the gain in the other." You also may want to consider how this interacts with the stepped up basis of estates.  If you never sell the stock and it passes to your heirs with your estate, under current tax law the basis will increase from the purchase price to the market price at the time of transfer.   In a comment, you proposed:   Thinking more deeply though, I am a little skeptical that it's a free lunch: Say I buy stock A (a computer manufacturer) at $100 which I intend to hold long term. It ends up falling to $80 and the robo-advisor sells it for tax loss harvesting, buying stock B (a similar computer manufacturer) as a replacement. So I benefit from realizing those losses. HOWEVER, say both stocks then rise by 50% over 3 years. At this point, selling B gives me more capital gains tax than if I had held A through the losses, since A's rise from 80 back to 100 would have been free for me since I purchased at 100. And then later thought  Although thinking even more (sorry, thinking out loud here), I guess I still come out ahead on taxes since I was able to deduct the $20 loss on A against ordinary income, and while I pay extra capital gains on B, that's a lower tax rate. So the free lunch is $20*[number of shares]*([my tax bracket] - [capital gains rates]) That's true.  And in addition to that, if you never sell B, which continues to rise to $200 (was last at $120 after a 50% increase from $80), the basis steps up to $200 on transfer to your heirs.   Of course, your estate may have to pay a 40% tax on the $200 before transferring the shares to your heirs.  So this isn't exactly a free lunch either.  But you have to pay that 40% tax regardless of the form in which the money is held.  Cash, real estate, stocks, whatever.  Whether you have a large or small capital gain on the stock is irrelevant to the estate tax.   This type of planning may not matter to you personally, but it is another aspect of what wealth management can impact. A mutual fund makes distributions of its dividends and capital gains, usually once a year, or seminanually or quarterly or monthly etc; it does not distribute any capital losses to its shareholders but holds them for offsetting capital gains in future years, (cf, this answer of mine to a different question). A stock pays  dividends; a stock neither has nor does it  distribute capital gains: you get capital gains (or losses) when you sell the shares of the stock, but these are not called distributions of any kind. Similarly, you incur capital gains or losses when you  redeem shares of mutual funds but these are not called distributions  either. Note that non-ETF mutual fund shares are generally not bought and sold on stock exchanges; you buy shares directly from the fund and you sell shares back (redeem them) directly to the fund.  All of the above transactions are taxable events for the year to you unless the shares are being held in a tax-deferred account or are tax-free for other reasons (e.g. dividends from a municipal bond fund). The harvested losses are capital losses.  See this IRS page: Generally, realized capital losses are first offset against realized capital gains.  Any excess losses can be deducted against ordinary income up to $3,000 ($1,500 if married filing separately) on line 13 of Form 1040.  Losses in excess of this limit can be carried forward to later years to reduce capital gains or ordinary income until the balance of these losses is used up. This means that your harvested losses can be used to offset ordinary income --- up to $3000 in a single year, and with extra losses carried forward to future years.  It is pretty close to a free lunch, provided that you have some losses somewhere in your portfolio. This free lunch is available to anyone, but for a human, it can be quite a chore to decide when to sell what, keep track of the losses, and avoid the wash sale rules.  The advantage of robo-advisors is that they eat that kind of bookkeeping for breakfast, so they can take advantage of tax loss harvesting opportunities that would be too cumbersome for a human to bother with. Great question! It can be a confusing for sure -- but here's a great example I've adapted to your scenario: As a Day Trader, you buy 100 shares of LMNO at $100, then after a large drop the same day, you sell all 10 shares at $90 for a loss of $1,000. Later in the afternoon, you bought another 100 shares at $92 and resold them an hour later at $97 (a $500 profit), closing out your position for the day. The second trade had a profit of $500, so you had a net loss of $500 (the $1,000 loss plus the $500 profit).  Here’s how this works out tax-wise: The IRS first disallows the $1,000 loss and lets you show only a profit of $500 for the first trade (since it was a wash). But it lets you add the $1,000 loss to the basis of your replacement shares. So instead of spending $9,200 (100 shares times $92), for tax purposes, you spent $10,200 ($9,200 plus $1,000), which means that the second trade is what caused you to lose the $500 that you added back (100 x $97 = $9,700 minus the 100 x $102 = $10,200, netting $500 loss). On a net basis, you get to record your loss, it just gets recorded on the second trade. The basis addition lets you work off your wash-sale losses eventually, and in your case, on Day 3 you would recognize a $500 final net loss for tax purposes since you EXITED your position. Caveat: UNLESS you re-enter LMNO within 30 days later (at which point it would be another wash and the basis would shift again). Source: http://www.dummies.com/personal-finance/investing/day-trading/understand-the-irs-wash-sale-rule-when-day-trading/ When you sell a stock that you own, you realize gains, or losses. Short-term gains, realized within a year of buying and selling an asset, are taxed at your maximum (or marginal) tax rate. Long term-gains, realized after a year, are taxed at a lower, preferential rate. The first thing to consider is losses. Losses can be cancelled against gains, reducing your tax liability. Losses can also be carried over to the next tax year and be redeemed against those gains. When you own a bunch of the same type of stock, bought at different times and prices, you can choose which shares to sell. This allows you to decide whether you realize short- or long-term gains (or losses). This is known as lot matching (or order matching). You want to sell the shares that lost value before selling the ones that gained value. Booking losses reduces your taxes; booking gains increases them. If faced with a choice between booking short term and long term losses, I'd go with the former. Since net short-term gains are taxed at a higher rate, I'd want to minimize the short-term tax liability before moving on to long-term tax liability. If my remaining shares had gains, I'd sell the ones purchased earliest since long-term gains are taxed at a lower rate, and delaying the booking of gains converts short-term gains into long-term ones. If there's a formula for this, I'd say it's  (profit - loss) x (tax bracket) = tax paid Yes you can.  This is known as a short selling against the box.  In the old days, this was used to delay a taxable event.  You could lock in a gain without triggering a taxable event.  Any loss on one side of the box would be offset by a loss on the other side, and vice versa.  However, the IRS clamped down on this, and you will realize the gain on your long position as soon as you go short on the other side.  See http://www.investopedia.com/terms/s/sellagainstthebox.asp. As to how to initiate the short cover, just transfer the long position to the same account as your short position and make sure your broker covers the short.  Should be relatively easy. I have an example of a trade I made some time ago.  By entering the position as a covered call, I was out of pocket $5.10, and if the stock traded flat, i.e. closed at the same $7.10 16 months hence, I was up 39% or nearly 30%/yr. As compared to the stock holder, if the stock fell 28%, I'd still break even, vs his loss of 28%. Last, if the stock shot up, I'd get 7.50/5.10 or a 47% return, vs the shareholder who would need a price of $10.44 to reflect that return. Of course, a huge jump in the shares, say to $15, would benefit the option buyer, and I would have left money on the table. But this didn't happen. The stock was at $8 at expiration, and I got my 47% return. The option buyer got 50 cents for his $2 bet.  Note, the $2 option price reflected a very high implied volatility.