How to Calculate Capital Gain With Splits & Dividends

by Nola Moore, studioD

A lot can happen to a stock if you're a buy-and-hold investor and wait years or even decades before selling. Not only does this make calculating your capital gain more complicated, but it's also more important, as long term holdings are likely to yield good gains and you don't want to pay any more tax than necessary. Fortunately, calculating gain is simply a matter of one step at a time.

Identify which stocks you sold. If you sold your entire position, or you bought all of your shares at the same time, this is easy -- all shares have the same tax information. If you only sold part of your position, however, you need to go by tax lot, or purchase group. The IRS defaults to "first in, first out," (FIFO), meaning you sold your oldest stocks first. You can select specific lots if you like, but you need to define the lots with your brokerage firm first to ensure you both report the same gain to the IRS.

Determine what happened to your stock after you bought it. You are specifically interested in anything that affected the number of shares you held. This includes stock splits and reverse splits, stock dividends and reinvested dividends. You need to know the fair market value or FMV, of the stock for all stock dividends and reinvested dividends when you received them. This is typically on your brokerage statement for the period, or may be available at the company website. You can also look up the open and close prices for the date of the transaction and use the average of those as your FMV.

Make a chart or list of all the stock transactions in chronological order. It might say something like "bought 100 shares, 3:1 stock split, $40 reinvested dividend and 10 share stock dividend."

Write the number of shares added and total shares held after each event next to the event. Each of these events is a tax lot, so if you're doing FIFO, you can stop when the total shares is equal to or greater than the number of shares you sold.

Determine the cost basis for each addition event. For a purchase, this is the cost of the shares plus any commissions and fees. For stock splits and reverse splits, it is zero -- you add stock but not cost. For stock dividends it is the FMV of the shares on the date you received them, and for reinvested dividends it is the price of the reinvested stock. For full lots, you need the total cost. For lots you split, find the cost per share, then multiply that by the number of shares you sold.

Add up all cost bases for the shares you sold, and add any commissions and fees related to the sale. This is your tax cost basis for the sale.

Subtract your tax cost basis from the proceeds of the sale to find your capital gain.


  • If you've sold the entire lot, you can use the cost on your brokerage statement as your tax cost basis. Note that splits only change the number of shares, not the total cost, since you didn't add any cash to get the split shares.


  • Cash dividends are taxed separately from capital gains, and should not be included in your cost basis. If you reinvested dividends, you pay tax on the dividend when you receive it, and on the capital gain when you sell the stock.

Items you will need

  • Brokerage statements

About the Author

Nola Moore is a writer and editor based in Los Angeles, Calif. She has more than 20 years of experience working in and writing about finance and small business. She has a Bachelor of Science in retail merchandising. Her clients include The Motley Fool, Proctor and Gamble and NYSE Euronext.

Photo Credits

  • Push/Photodisc/Getty Images