• Print
  • Default text size A
  • Larger text size A
  • Largest text size A

Capital Gains and Cost Basis

If you sell a security, the IRS requires that you report any resulting capital gains or losses as well as the associated cost basis when you file your income tax return. Learn the basic principles behind reporting this information.

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.

Applications of the Cost Basis Method

Method Used for How it works for each security Typical effects
First-in, first-out (FIFO) Any securities* Sells shares starting with the ones you have held the longest and works up to the most recently acquired May result in larger taxable gains than other disposal methods
High-cost (HICO) (also HICO Long-Term and HICO Short-Term) Any securities

Sells shares with the highest purchase price first. If more than one lot has the same price, we sell the lot with the earliest purchase date first.

Long- and short-term variations sell shares starting with the highest purchase price in the short-term or long-term holding period first. Depending on the variation, after all short-term or long-term shares are depleted, we then follow the same approach for the other category.

May help minimize taxable gains
Low-cost (LOCO) (also LOCO Long-Term and LOCO Short-Term) Any securities Sells shares with the lowest purchase price first. Long-term and short-term variations sell shares starting with the lowest purchase price in the long-term or short-term holding period first, as we explained with the high cost method. May increase taxable gains
Last-in, first-out (LIFO) Any securities Sells shares starting with the shares you purchased most recently and works backwards to the shares you held for the longest time. May help minimize taxable gains
Tax-sensitive Any securities Sells shares starting with the greatest losses, works through to the smallest losses and then from the smallest to greatest gains; includes calculation of the estimated gain using static long-term and short-term rates to determine the tax per share. May help minimize taxable gains
Specific share identification Any securities Allows you to choose which specific lots you sell at a given time. You must identify the shares by the Settlement Date. Most labor-intensive; can result in the least taxable gain, since it gives you discretion over which gains become realized and, therefore, are taxable
*Fidelity's default method for all types of securities except mutual funds.

Additional resources

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

Getting Ready for Tax Season (32:49) NEW
Watch this webinar series for tips on year-end tax planning, tax law changes, cost basis reporting, and how to use Fidelity tax resources.

Help with cost basis

  • Cost basis information tracking Login required.

    Fidelity customers can log in to see how each holding’s cost basis is calculated.

  • Gainskeeper®

    Software that helps any investor track cost basis and manage capital gains and losses

  • TradeLog®

    Cost basis tracking software with enhanced features for Active Traders

Fidelity does not provide legal or tax advice. The information herein is general in nature and should not be considered legal or tax advice. Consult an attorney or tax professional regarding your specific situation.

Software products are provided as a convenience to you, and Fidelity bears no responsibility for your use of, and output associated with, such products. The information and products made available to you are not intended to be, and should not be construed as, legal or tax advice or a legal opinion.
Before using this information, review important legal information and terms of use applicable to products, services, and/or information provided or accessed herein by the following companies:

GainsKeeper®
The use of GainsKeeper branded products is governed by Wolters Kluwer Financial Services (Wolters Kluwer) applicable license agreements. GainsKeeper and the GainsKeeper logo are registered trademarks and/or service marks of Wolters Kluwer. Wolters Kluwer is not affiliated with Fidelity Brokerage Services (FBS) or their affiliates. Wolters Kluwer is solely responsible for the information, content and software products provided by it. Fidelity does not explicitly or implicitly endorse or approve such information, content or products. Fidelity cannot guarantee that such information and content supplied is accurate, complete, or timely, or that the software products provided produce accurate and/or complete results. Fidelity does not make any warranties with regard to the information, content or software products or the results obtained by their use. Fidelity disclaims any liability arising out of your use (or the results obtained from, interpretations made as a result of, or any tax position taken in reliance on information provided pursuant to, your use) of these Wolters Kluwer software products or the information or content furnished by Wolters Kluwer.

TradeLog®
The use of TradeLog branded products is governed by Armen Computing Ltd. (Armen) applicable license agreements. TradeLog and the TradeLog logo are registered trademarks and/or service marks of Amren. Armen is not affiliated with Fidelity Brokerage Services (FBS) or their affiliates. Armen is solely responsible for the information, content and software products provided by it. Fidelity does not explicitly or implicitly endorse or approve such information, content or products. Fidelity cannot guarantee that such information and content supplied is accurate, complete, or timely, or that the software products provided produce accurate and/or complete results. Fidelity does not make any warranties with regard to the information, content or software products or the results obtained by their use. Fidelity disclaims any liability arising out of your use (or the results obtained from, interpretations made as a result of, or any tax position taken in reliance on information provided pursuant to, your use) of these Armen software products or the information or content furnished by Armen.

641044.6.0