For each sale an investor makes, she needs to calculate whether she earned a gain or incurred a loss. The investor calculates this by subtracting the basis from the sale price of the stock. This is done by calculating the stock basis by considering the amount paid for the stock. When the company splits the stock or issues a stock dividend, the investor may own partial shares, and will have to calculate the basis for partial shares when selling them.

1. Add the cost for all shares you own. If you accumulated the shares through several different purchases, determine how much you paid for each purchase. Include any brokerage costs or fees incurred. Add each purchase together to determine the total cost for all shares.

2. Add the total number of shares you own, including partial shares. Determine the total number of shares you currently own. Consider each stock split or reinvested dividend that occurred and the impact this made on the total number of shares owned.

3. Calculate the cost per share. Divide the total cost by the total number of shares you own.

4. Determine the total number of shares you sold. Add the complete shares along with the partial shares to calculate a total.

5. Calculate the stock basis for the shares you sold. Multiply the cost per share by the number of shares sold.

#### Tips

- This method represents the weighted average method. Some investors maintain the costs incurred for individual purchases. These investors may use an alternate method, such as first-in first-out, or last-in first out. Investors who use the first-in first-out method assume that the shares are sold in the order purchased. Investors who use the last-in first-out method assume that the most recent shares purchased are sold first.
- When companies engage in frequent stock splits, stock dividends and reverse stock splits, the investor can lose track of the total number of shares owned. Use a spreadsheet to track each transaction. This helps manage the total quantity of stock owned.

#### References

#### Photo Credits

- Hemera Technologies/AbleStock.com/Getty Images