How to Calculate Cost Basis for Stocks

Using the correct cost basis ensures your tax calculations are correct when you sell shares.
Image Credit: Szepy/iStock/Getty Images

Believe it or not, there was a time when the Internal Revenue Service (IRS) did not have a clue as to a taxpayer's cost basis in a stock. Instead, the IRS assumed that taxpayers were honest and made little effort to hold them accountable for their profits or losses when they sold stocks. This IRS honor system assumed that taxpayers would report their stock sale profits and losses accurately on their tax returns.

Advertisement

In these days of yore, the taxpayer either reported an actual stock purchase price or made a "best guess." After all, the IRS had no automated system that could verify the taxpayer's calculation. Those days are over, in part because a law now requires brokerage firms to report an investor's cost basis, a figure that's used to calculate an investment asset's gain or loss.

Video of the Day

Advertisement

Video of the Day

Investor Cost Basis Reporting

The cost basis reporting rules were an element of the 2008 "big bailout" legislation. These rules apply to some of an investor's taxable holdings that were purchased in 2011 or later. For instance, as of 2013, banks and brokers were required to track and report the cost basis of stocks held in taxable accounts.

Advertisement

The reporting rules also apply to mutual funds, dividend reinvestment plans and some exchange-traded funds purchased in 2012 or later. In 2014, reporting for bonds and options contracts began. IRS Form 1099-B, which is prepared by an investor's bank or brokerage firm, accounts for all of these requirements.

Advertisement

Definition of Stock Cost Basis

A stock's cost basis is equal to the purchase price of the particular share in addition to the cost of the trade, such as a broker's commission. This cost offsets the asset's sale price when its traded and, thus, a portion of the taxpayer's profit on the investment.

Advertisement

If, later, the taxpayer acquires additional shares of the same stock, she must track the purchase date and cost of each share. This information related to each acquisition comes into play when the taxpayer sells the shares.

Advertisement

How to Calculate Cost Basis

The rules that were defined in the 2008 legislation require a taxpayer to pay close attention to the shares that she is thinking of selling. As of 2008, it was no longer a matter of selecting and selling a group of stocks that the taxpayer purchased in one transaction or even picking stocks to sell according to which one would minimize the stockholder's current tax situation. Instead, today, the taxpayer's decision as to how to calculate cost basis must be made within three days of the trade settling.

Advertisement

Whereas the IRS uses the first in first out method to calculate a stock's cost basis, the taxpayer may select one of several alternatives: first in first out, specific identification of shares sold, average cost of shares or the highest in first out method.

Cost Basis Calculation Example

Assume that in June of 2000, a taxpayer purchased $2,000 of ABC stock, or 124 shares. Also assume she invested the company's stock dividends in that company's stock. As of 2021, the taxpayer's stock holdings in ABC are worth about $38,000.

Advertisement

Advertisement

If the taxpayer sold $20,000 of the ABC stock, or about 1,660 shares​,​ she could generate a gain or a loss depending on the method she uses to calculate her cost basis. For instance, when she sells the shares that she bought first, she might log a capital gain of around $14,200. If she decides to hold those shares and, instead sell the shares she acquired more recently, that choice might generate a loss of about $28,000.

Advertisement

While this example is a theoretical one, an investor has access to a number of stock cost basis calculators on the web.

FIFO Stock Cost Basis Calculation

Assume that, on June 1, a taxpayer purchases 200 shares of ABC stock for $40 per share. Also assume the shareholder acquires an additional 100 shares in October at a price of $30 per share.

Advertisement

When the taxpayer sells 240 shares, she uses the FIFO method to determine her cost basis. In this case, that cost basis is equal to (200 shares x $40 per share) plus (40 shares x $30 per share), or $9,200.

Default Cost Basis Calculation

If a taxpayer fails to specify the method to be used to perform the cost basis calculation for stocks and exchange-traded funds, her brokerage firm will use its preferred, or default, method. For instance, if the firm uses a first in first out, or FIFO, method, it will sell the taxpayer's "oldest' shares first. In contrast, for mutual funds, the default cost basis calculation may be performed using a method that calculates the average cost of the shares held in the taxpayer's account.

Advertisement

Alternatively, the cost basis of an investment may be determined using the specific identification of shares sold method, which determines the cost basis of the actual shares sold. Lastly, the highest in first out method may be used whereby the cost basis for stocks is calculated on the assumption that those shares with the highest cost are sold first.

Advertisement

Advertisement

Report an Issue

screenshot of the current page

Screenshot loading...