Capital gains and cost basis

If you sell an investment such as a stock or mutual fund, the IRS requires that you report any capital gains or losses along with cost basis information.

What Is Cost Basis?

Should I sell at a loss to offset capital gains?

This is a strategy many investors choose, and it can be effective if you haven't bought new shares of the same security within the past month and do not plan to purchase any in the following month. However, if you purchase additional shares of the same or substantially identical security within 30 days before or 30 days after the sale date, you will have made a "wash sale," and you cannot claim the loss on your income tax return. Instead, you can add the disallowed loss to the basis of the security in your account.

Cost basis is the price you paid to purchase a security plus any additional costs such as broker's fees or commissions.

When you sell a security, your tax liability is determined by how much you spent to buy the security (cost basis) and your sales price. If you sell a security for more than the original purchase price, the difference is taxable as a capital gain.

Gains from the sale of securities are generally taxable in the year of the sale, unless your investment is in a tax-advantaged account, such as an IRA, 401(k), or 529 plan. Generally, for those accounts, you only incur taxes when you start taking withdrawals.

Capital gains are taxed at different rates depending on your tax bracket and how long you've held a security. If you sell a security that you've held for more than a year, any resulting capital gains are considered long-term and are taxed at lower rates than ordinary income. Conversely, short-term capital gains are taxed as ordinary income. In addition to offsetting certain capital losses against capital gains, investors can generally deduct net capital losses of up to $3,000 from their taxable income each year. If you incur more than $3,000 in losses in a given year, you can carry forward the remaining loss balance to subsequent years.

How Is Cost Basis Calculated?

The IRS generally identifies two methods for calculating cost basis.

Average cost method – This method takes the total cost of the shares and divides it by the number of shares in the fund. For example, if you own a mutual fund that has 3 shares purchased at $5, $6, and $7; using the average cost method, we'll add up the purchase prices ($18), and divide it by the total shares in the fund (3), resulting in a cost basis of $6. We use this method to calculate cost basis for mutual funds and certain dividend reinvestment plans. To select a different cost basis method, please visit Cost Basis Information TrackingLog In Required.

Actual cost method – As the name suggests, your cost basis is the purchase price of each share. In order to use this method, you'll need to know the actual purchase price of each share. This can be tricky, especially if you purchased shares at different prices and are not sure exactly which shares were sold.

By default, Fidelity uses first in, first out (FIFO) when selling your shares. This means that shares that were bought first are also sold first. For example, let's say you own 200 shares. The first 100 were purchased at $10 per share, the next 50 at $15, and the final 50 at $20 per share. You sell 125 shares. With FIFO, the first 100 shares sold will come from your first batch and the remaining 25 from your second batch.

This can help you keep track of exactly which shares were sold and as a result, help simplify your cost basis calculations. With another disposal method, the sold shares may have come from all 3 batches or just the final 2, making it a little tricky to keep track of your actual purchase price.

Depending on your circumstances, FIFO may not be the best disposal method. In some cases, it may be more beneficial to sell shares bought last first. Learn more about our other disposal methods. To change your default disposal method from FIFO, please visit Cost Basis Information TrackingLog In Required.

Cost Basis Reporting Requirements

Taxpayers have a long-standing responsibility to report gains and losses, and related cost basis information when they file their income tax returns. Brokers, such as Fidelity, also have a requirement to report sales information to the IRS on Form 1099-B.

To report capital gains on your return, you must file Schedule D with your Form 1040; most filers need to begin with Form 8949, which provides a format for listing each individual sales transaction that you make during the year.

Next step

Visit Cost Basis Information TrackingLog In Required to change how we calculate your cost basis or to select a different disposal method.

Additional resources

Qualified Dividends
Learn the basic principles behind what dividend income is taxed at lower capital gains rates.

Tax resources