Should I sell and rebuy stocks before the end of the year to trigger a gain and offset capital losses?
"You have multiple issues buried within this question. First, we don't know your tax bracket. For my answer, I'll assume 25%. This simply means that in 2016, you'll have a taxable $37,650 or higher.  The interesting thing is that losses and gains are treated differently. A 25%er's long term gain is taxed at 15%, yet losses, up to $3000, can offset ordinary income. This sets the stage for strategic tax loss harvesting. In the linked article, I offered a look at how the strategy would have resulted in the awful 2000-2009 decade producing a slight gain (1%, not great, of course) vs the near 10% loss the S&P suffered over that time. This was by taking losses in down years, and capturing long term gains when positive (and not using a carried loss).  Back to you - a 15%er's long term gain tax is zero. So using a gain to offset a loss makes little sense. Just as creating a loss to offset the gain. The bottom line? Enjoy the loss, up to $3000 against your income, and only take gains when there's no loss. This advice is all superseded by my rule ""Don't let the tax tail wag the investing dog."" For individual stocks, I would never suggest a transaction for tax purposes. You keep good stocks, you sell bad ones. Sell a stock to take a short term loss only to have it recover in the 30 day waiting period just once, and you'll learn that lesson. Learn it here for free, don't make that mistake at your own expense."
In a comment on this answer you asked  It's not clear to me why the ability to defer the gains would matter (since you never materially benefit until you actually sell) but the estate step up in basis is a great point! Could you describe a hypothetical exploitive scenario (utilizing a wash sale) in a little more detail?  This sounds like you still have the same question as originally, so I'll take a stab at answering with an example.   I sell some security for a $10,000 profit.  I then sell another security at a $10,000 loss and immediately rebuy.  So pay no taxes (without the rule).  Assuming a 15% rate, that's $1500 in savings which I realize immediately.  Next year, I sell that same security for a $20,000 profit over the $10,000 loss basis (so a $10,000 profit over my original purchase).  I sell and buy another security to pay no taxes.  In fact, I pay no taxes like this for fifty years as I live off my investments (and a pension or social security that uses up my tax deductions).  Then I die.  All my securities step up in basis to their current market value.  So I completely evade taxes on $500,000 in profits.  That's $75,000 in tax savings to make my heirs richer.  And they're already getting at least $500,000 worth of securities.   Especially consider the case where I sell a privately held security to a private buyer who then sells me back the same shares at the same price.   Don't think that $10,000 is enough?  Remember that you also get the original value.  But this also scales.  It could be $100,000 in gains as well, for $750,000 in tax savings over the fifty years.  That's at least $5 million of securities.   The effective result of this would be to make a 0% tax on capital gains for many rich people.   Worse, a poorer person can't do the same thing.  You need to have many investments to take advantage of this.  If a relatively poor person with two $500 investments tried this, that person would lose all the benefit in trading fees.  And of course such a person would run out of investments quickly.   Really poor people have $0 in investments, so this is totally impractical. Yes. As long as the stock is in a taxable account (i.e. not a tax deferred retirement account) you'll pay gain on the profit regardless of subsequent purchases.  If the sale is a loss, however, you'll risk delaying the claim for the loss if you repurchase identical shares within 30 days of that sale. This is called a wash sale. Note that the rules around wash sales vary depending on where you live. For the U.S., the wash sale rules say that you cannot buy a substantially identical stock or security within 30 days (before or after) your sale. So, you could sell your stock today to lock in the capital losses. However, you would then have to wait at least 30 days before purchasing it back. If you bought it back within 30 days, you would disqualify the capital loss event. The risk, of course, is that the stock's price goes up substantially while you are waiting for the wash sale period. It's up to you to determine if the risk outweighs the benefit of locking in your capital losses. Note that this applies regardless of whether you sell SOME or ALL of the stock. Or indeed, if we are talking about securities other than stocks. You should constantly look at your investment portfolio and sell based on future outlook. Don't get emotional. Selling a portfolio of stocks at once without a real reason is foolish.  If you have a stock that's up, and circumstances make you think it's going to go up further, hold it. If prospects are not so good, sell it. Also, you don't have to buy or sell everything at once. If you've made money on a stock and want to realize those gains, sell blocks as it goes up. Stay diversified, monitor your portfolio every week and keep a reserve of cash to use when opportunity strikes. If you have more stocks or funds than you can keep current on every week, you should consolidate your positions over time. In many ESPP programs (i.e. every one I've had the opportunity to be a part of in my career), your purchase is at a discount from the lower of the stock prices at the start and end of the period. So a before-tax 5% return is the minimum you should expect; if the price of the stock appreciates between July 1 and December 31, you benefit from that gain as well. More concretely: Stock closes at $10/share on July 1, and $11/share on December 31. The plan buys for you at $9.50/share. If you sell immediately, you clear $1.50/share in profit, or a nearly 16% pre-tax gain. If the price declines instead of increases, though, you still see that 5% guaranteed profit. Combine that with the fact that you're contributing every paycheck, not all at once at the start, and your implied annual rate of return starts to look pretty good. So if it was me, I'd pay the minimum on the student loan and put the excess into the ESPP. "You have to calculate the total value of all shares and then ask yourself ""Would I invest that amount of money in this stock?""  If the answer is yes, then only sell what you need to sell. Take the $3k loss against your income, if you have no other gains.   If you would not invest that amount of cash in that stock, then sell it all right now and carry forward the excess loss every year. Note at any point you have capital gains you can offset all of them with your loss carryover (not just $3k)." You talk about an individual not being advised to sell (or purchase) in response to trends in the market in such a buy and hold strategy. But think of this for a moment: You buy stock ABC for $10 when both the market as a whole and stock ABC are near the bottom of a bear market as say part of a value buying strategy. You've now held stock ABC for a number of years and it is performing well hitting $50. There is all good news about stock ABC, profit increases year after year in double digits. Would you consider selling this stock just because it has increased 400%. It could start falling in a general market crash or it could keep going up to $100 or more. Maybe a better strategy to sell ABC would be to place a trailing stop of say 20% on the highest price reached by the stock. So if ABC falls, say in a general market correction, by less than 20% off its high and then rebounds and goes higher - you keep it. If ABC however falls by more than 20% off its high you automatically sell it with your stop loss order. You may give 20% back to the market if the market or the stock crashes, but if the stock continues going up you benefit from more upside in the price. Take AAPL as an example, if you bought AAPL in March 2009, after the GFC, for about $100, would you have sold it in December 2011 when it hit $400. If you did you would have left money on the table. If instead you placed a trailing stop loss on AAPL of 20% you would have been still in it when it hit its high of $702 in September 2012. You would have finally been stopped out in November 2012 for around the $560 mark, and made an extra $160 per share. And if your thinking, how about if I decided to sell AAPL at $700, well I don't think many would have picked $700 as the high in hindsight. The main benefit of using stop losses is that it takes your emotions out of your trading, especially your exits. @BlackJack does a good answer of addressing the gains and when you are taxed on them and at what kind of rate. Money held in a brokerage account will usually be in a money-market fund, so you would own taxes on the interest it earned.   There is one important consideration that must be understood for capitol Losses.  This is called the Wash Sale Rule.  This rule comes into affect if you sell a stock at a LOSS, and buy shares of the same stock within 30 days (before or after) the sale.  A common tactic used to minimize taxes paid is to 'capture losses' when they occur, since these can be used to offset gains and lower your taxes.  This is normally done by selling a stock in which you have a LOSS, and then either buying another similar stock, or waiting and buying back the stock you sold.   However, if you are intending to buy back the same stock, you must not 'trigger' the Wash Sale Rule or you are forbidden to take the loss. Examples.  Lets presume you own 1000 shares of a stock and it's trading 25% below where you bought it, and you want to capture the loss to use on your taxes. This can be a very important consideration if trading index ETF's  if you have a loss in something like a S&P500 ETF, you would likely incur a wash sale if you sold it and bought a different S&P500 ETF from another company since they are effectively the same thing.  OTOH, if you sold an S&P500 ETF and bought something like a 'viper''total stock market' ETF it should be different enough to not trigger the wash sale rule.  If you are trying to minimize the taxes you pay on stocks, there are basically two rules to follow.  1) When a gain is involved, hold things at least a year before selling, if at all possible.  2) Capture losses when they occur and use to offset gains, but be sure not to trigger the wash sale rule when doing so. "There some specific circumstances when you would have a long-term gain. Option 1:  If you meet all of these conditions: Then you've got a long-term gain on the stock.  The premium on the option gets rolled into the capital gain on the stock and is not taxed separately.  From the IRS: If a call you write is exercised and you sell the underlying stock, increase your amount realized on the sale of the stock by the amount you received for the call when figuring your gain or loss. The gain or loss is long term or short term depending on your holding period of the stock. https://www.irs.gov/publications/p550/ch04.html#en_US_2015_publink100010630 Option 2: If you didn't hold the underlying and the exercise of the call that you wrote resulted in a short position, you might also be able to get to a long-term gain by buying the underlying while keeping your short position open and then ""crossing"" them to close both positions after one year. (In other words, don't ""buy to cover"" just ""buy"" so that your account shows both a long and a short position in the same security.  Your broker probably allows this, but if not you, could buy in a different account than the one with the short position.)  That would get you to this rule: As a general rule, you determine whether you have short-term or long-term capital gain or loss on a short sale by the amount of time you actually hold the property eventually delivered to the lender to close the short sale. https://www.irs.gov/publications/p550/ch04.html#en_US_2015_publink100010586 Option 1 is probably reasonably common.  Option 2, I would guess, is uncommon and likely not worthwhile. I do not think that the wash sale rules can help string along options from expiration to expiration though.  Option 1 has some elements of what you wrote in italics (I find that paragraph a bit confusing), but the wash sale does not help you out." "Edited: Pub 550 says 30 days before or after so the example is ok - but still a gain by average share basis.  On sale your basis is likely defaulted to ""average price"" (in the example 9.67 so there was a gain selling at 10), but can be named shares at your election to your brokerage,  and supported by record keeping. A Pub 550 wash might be buy 2000 @ 10 with basis 20000, sell 1000 @9 (nominally a loss of 1000 for now and remaining basis 10000), buy 1000 @ 8 within 30 days.   Because of the wash sale rule the basis is 10000+8000 paid + 1000 disallowed loss from wash sale with a final position of 2000 shares at 19000 basis.  I think I have the link at the example:  http://www.irs.gov/publications/p550/ch04.html#en_US_2014_publink100010601" Buy low, sell high. I think a lot of people apply that advice wrongly. Instead of using this as advice about when to buy and when to sell, you should use it as advice about when not to buy and when not to sell. Don't buy when P/Es cannot support the current stock price. Don't sell when stocks have already fallen due to a market panic. Don't follow the herd or you will get trampled when they reverse direction in a panic.  If you are smart enough to sell ahead of the panics, more power to you, but you should be using more than a 52-week high on a graph to make that decision. "You asked for advice, so I'll offer it.  Trying to time the market is not a great strategy unless you're sitting in front of a Bloomberg terminal all the time. Another person answering your question suggests the use of index funds; he's likely to be right. Look up ""asset allocation.""  What you want to do is decide that you want your portfolio to contain, for example: If one of your stock holdings goes up far enough that you're out of your target asset allocation ranges, sell some of it and buy something  in another asset class,s so you're back in balance.  That way you lock in some profit when things go up, without losing access to potential future profits.  The same applies if something goes down; you buy more of that asset class by selling others. This has worked really well for me for 30+ years." "If the stock market dropped 30%-40% next month, providing you with a rare opportunity to buy stocks at a deep discount, wouldn't you want to have some of your assets in investments other than stocks? If you don't otherwise have piles of new cash to throw into the market when it significantly tanks, then having some of your portfolio invested elsewhere will enable you to back up the proverbial truck and load up on more stocks while they are on sale. I'm not advocating active market timing. Rather, the way that long-term investors capitalize on such opportunities is by choosing a portfolio asset allocation that includes some percentage of safer assets (e.g. cash, short term bonds, etc.), permitting the investor to rebalance the portfolio periodically back to target allocations (e.g. 80% stocks, 20% bonds.) When rebalancing would have you buy stocks, it's usually because they are on sale. Similarly, when rebalancing would have you sell stocks, it's usually because they are overpriced. So, don't consider ""safer investments"" strictly as a way to reduce your risk. Rather, they can give you the means to take advantage of market drops, rather than just riding it out when you are already 100% invested in stocks. I could say a lot more about diversification and risk reduction, but there are plenty of other great questions on the site that you can look through instead." "Once again I offer some sage advice - ""Don't let the tax tail wag the investing dog."" Michael offers an excellent method to decide what to do. Note, he doesn't base the decision on the tax implication.  If you are truly indifferent to holding the stock, taxwise, you might consider selling just the profitable shares if that's enough cash. Then sell shares at a loss each year if you have no other gains. That will let you pay the long term gain rate on the shares sold this year, but offset regular income in years to come. But. I'm hard pressed to believe you are indifferent, and I'd use Michel's approach to decide.  Updated - The New Law is simply a rule requiring brokers to track basis. Your situation doesn't change at all. When you sell the shares, you need to identify which shares you want to sell. For older shares, the tracking is your responsibility, that's all." I wrote a detailed article on Tax Loss Harvesting to show the impact on returns.  For my example, I showed a person in the 15% bracket. In years with no loss, they trade to capture gains at 0% long term rate, thus bumping their basis up. In years with losses, they tax harvest for a 15% effective 'rebate' on that loss.  I showed how for the lost decade 2000-2009, a buy and hold would have returned -1% CAGR, but the tax loss harvester would have gained 1% (just 1% for the decade, not CAGR), ending the decade with no loss.  As one's portfolio grows, the math changes. You can only take $3000 capital loss against ordinary income, and my example relies on the difference between taking a gain for free but using a loss to offset income. Note, the higher earner would take gains at 15%, but losses at 25%, but only for the relatively small portfolio. The benefit for them is to use loss harvesting to offset gains, less so for ordinary income.  As the other answer state, Wealthfront can aid you to do this with no math on your part.