search icon
      blog search icon

      How to Calculate Cost Basis? A Beginner's Guide

      By Wasim Omar

      Published on

      June 1, 2023

      7:14 AM UTC

      Last Updated on

      June 5, 2023

      7:17 AM UTC

      How to Calculate Cost Basis? A Beginner's Guide

      Understanding the intricacies of investing in the stock market can be a daunting task for both seasoned investors and newcomers alike. One critical aspect of stock investing is determining the cost basis, which serves as the foundation for various financial decisions.

      The cost basis represents the original value of an investment and is essential for calculating capital gains or losses, tax obligations, and assessing overall investment performance.

      Knowing how to calculate cost basis for stock is important for a number of reasons, but most importantly due to its relation to capital gains tax, which in turn impacts the wealth divide in an economy.

      According to the Tax Policy Center in 2018, the highest-earning 1% of households accounted for 69% of the total long-term capital gains realized during that year. This points to the high degree of concentration of such gains, making the accuracy of cost-basis calculations so critical.

      In this article, we will delve into the cost-basis approach with stocks, providing a comprehensive guide on dealing with this crucial metric accurately. Ultimately, we deliver a solid assessment of how to calculate cost basis for stock.

      How to Calculate Cost Basis

      We begin our exploration of the topic at hand by jumping right into our central question of how to calculate cost basis for stock. Discussed below are the most common calculation methods of stock costing that are typically used:

      • FIFO (First In, First Out)

        FIFO is a cost calculation method where the first shares acquired are considered the first shares sold. In other words, when selling a stock, the cost basis is based on the price of the oldest shares in your portfolio.

      • LIFO (Last In, First Out)

        LIFO is the opposite of FIFO. With this method, the most recently acquired shares are considered the first shares sold. Alternatively, LIFO assumes that the shares purchased earliest are sold last.

      • Specific Identification

        The specific identification method involves tracking the cost basis of individual stocks. With this approach, you identify and designate the cost basis for each specific share you sell.

        This method is commonly used when dealing with stocks that have different purchase prices or when you want to strategically choose which shares to sell based on their cost basis.

      • Average Cost

        The average cost method calculates the cost basis by taking the average of the purchase prices of all the shares you own. It involves dividing the total cost of all shares by the total number of shares held.

        This method is simple and commonly used for mutual funds and dividend reinvestment plans, where shares are acquired at different prices over time.

      Reasons for Adjusting Cost Basis

      Cost basis adjustments for stocks are necessary to accurately reflect changes in the original investment value due to various factors. It is fundamental to consider these adjustments when focusing on how to calculate cost basis for stock.

      Here’s a discussion on adjusting the cost basis for a range of different scenarios:

      Stock Splits

      In a stock split, the number of shares owned increases, and the price per share decreases proportionately. To adjust the cost basis for stock splits, you divide the original cost basis by the split ratio.

      For example, in a 2-for-1 stock split, you would hand over two stocks, receive one in exchange, and halve the original cost basis per share. This new value will subsequently be used for all stock basis calculations.


      In a stock merger, when one company merges with another, shareholders of the acquired company receive shares of the acquiring company. The cost basis for the acquired company’s shares needs to be allocated to the new shares received.

      Typically, the allocation is based on the relative fair market values of the companies involved. This adjustment ensures that the cost basis is appropriately transferred to the new shares, and is distinct from the method of how to determine cost basis of old stock.

      Reinvested Dividends

      Reinvested dividends refer to dividends received from a stock that is automatically reinvested in purchasing additional shares. To adjust the cost basis for reinvested dividends, you add the reinvested dividend amount to the original cost basis.

      This method is crucial to understand for anyone interested in learning how to calculate cost basis for stock, as it ensures that the additional shares acquired through reinvestment are accounted for in the cost basis calculation.

      Commissions and Fees

      When purchasing or selling stocks, brokerage commissions and fees are incurred. These costs can be factored into the cost basis to reflect the total expenses associated with the investment.

      To adjust the cost basis for commissions and fees, you add the total commission and fee expenses to the original cost basis when purchasing shares. Conversely, you subtract the total commission and fee expenses from the sale proceeds when selling shares.

      Tax Implications of Cost Basis

      One of the main motivations behind why it is pertinent to learn how to calculate cost basis for stock is to understand tax implications. Properly determining the cost basis is essential for accurate reporting of capital gains or losses on your tax returns.

      Regarding the tax implications of the cost basis, the following are the most crucial areas to consider.

      • How Cost Basis Affects Taxes on Capital Gains and Losses

        The cost basis plays a fundamental role in determining the taxable amount of capital gains or losses when selling stocks. By subtracting the cost basis from the sale proceeds, you calculate the capital gain or loss.

        A higher cost basis leads to lower taxable gains, reducing the tax liability. Conversely, a lower cost basis can result in higher taxable gains and potentially increased taxes.

      • Short-Term Vs. Long-Term Capital Gains and Losses

        The holding period of a stock determines whether capital gains or losses are categorized as short-term or long-term. Short-term gains or losses occur when shares are held for one year or less, while long-term gains or losses apply to shares held for more than one year.

        The tax rates differ for short-term and long-term capital gains, with long-term gains typically receiving more favorable tax treatment.

        Accurate calculation according to the cost basis formula is crucial for determining the correct categorization and tax rates applicable to gains or losses.

      • Impact Of Adjusted Cost Basis on Taxes

        Adjustments to the cost basis, such as those resulting from stock splits, mergers, reinvested dividends, or commissions, can have implications for taxes. These adjustments affect the overall cost basis, potentially reducing or increasing the taxable gains or losses.

        It is important to factor in these adjustments when calculating the adjusted cost basis to ensure accurate tax reporting and avoid overpaying or underpaying taxes.

      Tools and Resources for Calculating Cost Basis

      Being knowledgeable about tools and resources for calculating cost basis is crucial for informed decision-making, compliance, and effective record-keeping. By leveraging these tools, investors can navigate the complexities of stock basis calculations with confidence.

      Online Calculators and Tools

      Various online calculators and tools specifically designed for cost-basis calculations are available on financial websites or through tax software providers. They are great for those struggling to learn how to calculate cost basis for stock.

      These tools typically require users to input relevant information such as purchase price, sale price, dates of acquisition and sale, and any adjustments like stock splits or mergers.

      The calculators then generate accurate cost basis calculations, taking into account different factors that may impact the cost basis. They can be particularly useful for individuals managing their investments independently or who want simple and straightforward cost-basis calculations.

      Brokerage Platforms and Their Cost-Basis Tracking Features

      Many brokerage platforms offer built-in cost-basis tracking features. These platforms automatically track and update cost basis information for investments held within the account.

      When investors buy or sell securities through their brokerage accounts, these platforms capture transaction details, including purchase price, sale price, and dates. This information is then used to calculate an accurate cost basis for each investment.

      Investors can typically access their cost basis records and generate reports directly from the brokerage platform, simplifying the process of tracking and managing cost basis.

      Brokerage platforms are particularly beneficial for investors who prefer an integrated solution that combines investment management and cost-basis tracking.


      In conclusion, understanding how to calculate cost basis for stock is crucial for investors, not only to accurately assess their gains or losses but also to navigate the complex landscape of tax implications.

      By mastering the different methods for determining cost basis, investors can make informed decisions and optimize their tax strategies. Moreover, being aware of the adjustments required for stocks ensures accurate reporting and compliance with tax laws.

      Ultimately, understanding the importance of cost-basis calculations empowers investors to optimize their investments, reduce tax liabilities, and maintain compliance.

      By mastering the idea of the cost basis for stocks, investors can confidently navigate the intricacies of the stock market, make informed investment decisions, and achieve their financial goals.

      More From Stocks telegraph