People invest with the hope of earning a return over time. But what happens when you choose to sell? Cost basis is key to understanding your tax obligations and the true profit of your investments. 

Here’s everything you need to know about cost basis, including how to calculate it, how it affects your taxes and why it’s vital to your investment strategy.

Cost basis in investments: What it is and how to calculate it

Cost basis is the original value of an investment, typically the price you bought it for. It’s used to calculate capital gains or losses when you sell the investment. Cost basis includes the purchase price along with any associated brokerage fees and commissions. 

Methods to calculate cost basis

The cost basis for stocks and mutual funds is generally the price you paid when you purchased the asset, plus any other trading costs. However, there are several methods to calculate cost basis, and each can impact your capital gains or losses differently. 

The different methods used to calculate cost basis include:

  • First In, First Out (FIFO): The oldest shares you purchased are sold first. It’s the default method used by many brokerages if you don’t specify a different method.
  • Last In, First Out (LIFO): The most recent shares you purchased are sold first. This can be beneficial if your shares have declined in value since you bought them. 
  • Average cost: This method calculates the average cost of all the shares you own and uses that average to calculate gains and losses. It’s commonly used for mutual funds.
  • Specific shares: This method allows you to choose which shares to sell, giving you flexibility in managing your capital gains and losses for tax purposes. You’ll need to specify to your broker which shares you’re selling at the time of the transaction.

Example of cost basis

Let’s say you buy 50 shares of Company A for $20 per share. The total cost of this purchase is $1,000 (50 shares x $20). This becomes your cost basis. A few years later, you decide to sell all 50 shares when the price has risen to $30 per share. The total sale amount is $1,500 (50 shares x $30). The capital gain on this transaction is how much you sold it for minus the cost basis: $1,500 – $1,000 = $500. This $500 gain is subject to capital gains tax.

Factors that impact an investment’s cost basis

Figuring out your cost basis tends to be a simple process. However, it’s important to note that cost basis can change over time due to subsequent purchases, corporate actions and dividend reinvestments. 

Reinvesting dividends 

When you reinvest dividends, you’re essentially using that income to purchase more shares of the stock. Your cost basis goes up because the reinvested dividends are used to buy more shares, effectively increasing your total investment amount. 

Stock splits

A stock split increases the number of shares you own, but it lowers the cost basis per share. So, if a company performs a 2-for-1 stock split, you’ll end up with twice as many shares, each with half the original cost basis. Companies often split their stock to make shares more affordable for investors following a run-up in the stock’s price. Recent examples include Apple’s  4-to-1 split in 2020 and Alphabet (Google’s parent company)’s 20-to-1 split in 2022. 

Company mergers

When a company you own is bought by another company, it’s likely that your overall cost basis won’t be impacted. That being said, if you receive new shares as part of the merger, the cost basis for each individual share could change.

Futures contracts and cost basis

Calculating the cost basis for futures contracts involves assessing the difference between a commodity’s local spot price and its associated futures price. For example, if a particular corn futures contract is trading at $3.50, while the current market price of the commodity today is $3.10, there is a 40-cent cost basis. As the delivery date of the contract approaches, futures prices and spot prices tend to converge, reducing the cost basis.

Cost basis in real estate transactions

To calculate the cost basis for real estate, first add up these costs:

  • The original purchase price of the property
  • Closing costs
  • Major home improvements
  • Costs to repair damage to the home and property

Then these factors can reduce your cost basis:

  • Property value depreciation
  • Insurance payments received due to a casualty or theft loss
  • Tax credits assigned for home energy improvements

The adjusted basis of the property is the cost of the property after accounting for any increases or decreases to its original value. 

Unlike stocks and mutual funds, the IRS offers a generous exclusion for capital gains tax on certain types of real estate

You can sell your primary residence and avoid paying capital gains taxes on the first $250,000 of profits if your tax-filing status is single, and up to $500,000 if married and filing jointly. To get the exemption, you must have lived in the home for at least two out of the last five years. 

How cost basis affects taxes

By law, all brokerages are required to send most of your cost basis information to the IRS. The sale of stocks, mutual funds and most exchange-traded funds (ETFs) will generate a Form 1099-B from your broker that includes detailed cost basis information to help you report capital gains and losses on your tax return.

You’ll have to report if you realized any capital gains or losses from your investments in taxable accounts first on Form 8949 and then transfer the info to Schedule D. On Form 8949, you’ll note when you bought the asset and when you sold it, as well as what it cost and what you sold it for. 

If you sell an asset for a price higher than its cost basis (you made a profit), the difference is a capital gain, which may be subject to taxes. On the flip side, if you sell an asset for less than its cost basis (you lost money), you’ve incurred a capital loss, which can be used to offset other capital gains and reduce your overall taxable income

Regardless of a brokerage’s disclosure of your cost basis to the IRS, it’s your responsibility to ensure the correct figure is reported on your tax return.

Keeping records of cost basis is important

Keeping accurate records of your cost basis is important for tax reporting and making informed investment decisions. 

Ultimately, every investor is expected to maintain their own records of cost basis, according to the IRS. 

Without proper record keeping, you might find yourself dependent on the cost basis reported by your broker. That might not sound like a big deal, but it can be if your broker gets acquired or isn’t properly recording the information to the IRS for whatever reason. 

Bottom line

Understanding cost basis is an essential part of managing your investments and planning for taxes. It helps determine the capital gains or losses when you sell and can significantly impact your tax bill. By maintaining accurate records and making strategic decisions about which shares to sell and when, you can potentially minimize your tax liability.