When you're buying and selling investments, it's important to know what happens to your gains when tax time rolls around. That's why having a clear understanding of cost basis is so vital. Read on to learn more about this tax concept and how it applies to you.

What is it?
What is cost basis?
Cost basis is the amount you've paid for an investment that you intend to sell (or have already sold). But, it's also more complicated than that. For example, the cost basis of an investment is different if you bought the investment for yourself vs. if you inherited it.
It can also be affected by other factors, like reinvestments of dividends, upgrades to real estate, and stock splits. This is why it's so important to track the cost of each investment individually, even if you only buy stocks or are heavily invested in various bonds.
When does it apply?
When does cost basis apply?
The cost basis of an investment comes into play when you're calculating capital gains or losses for the tax year. Luckily, you don't have to worry about cost basis unless you've sold an investment. Your stock broker will help you keep a running total of your cost basis in individual stocks you purchase, especially across multiple price points. But for other types of investments, you may have to track cost basis yourself.
Real estate is one area where capital gains plays a big part, and when it comes to real estate investments, you'll have to track your own cost basis. Since you're the only one who will have receipts for upgrades or improvements, for example, it's important to keep accurate records should you decide to sell an income-generating property. Generally speaking, properties that you live in and hold long-term do not fall under the same rules.
How to calculate
How to calculate cost basis
Cost basis varies depending on what type of investment you're talking about. But, on a very, very basic level, you can think of simple cost basis calculations as follows.
Your average cost basis for multiple stock investments can be calculated by the investment. If you own 10 shares of XYZ, Inc., half of which you bought at $100 and half at $150, your average cost for those shares is $125 each.
However, you have other options for cost basis calculations, including a first in, first out calculation that allows you to use the shares of the first grouping you purchased as your basis. Sometimes, you can sell specific shares based on their individual cost basis, which your brokerage will provide for you.
Other events can change your cost basis, including stock splits, which will affect your average cost basis per share, reinvesting dividends, and inheritance. Also, remember to include the cost of your brokerage fees, since those can be counted toward your cost basis, too.
For real estate, it's more complicated. If it's an investment property, you'll start with the price you paid for the property, add in any improvements that you've made to increase the value of the property, and that will become your new cost basis. So, if you bought a duplex for $500,000 and spent another $100,000 remodeling it for your new tenants, your cost basis at that point is $600,000.
Related investing topics
Why it's important
Why does cost basis matter to investors?
Cost basis matters to investors who are liquidating some or all of their investments. Optimizing your cost basis can greatly reduce your tax liability, especially if you're using methods like tax loss harvesting. By strategically selling stocks with a higher cost basis, for example, you could save money on taxes.
With real estate, it's just as important, especially since real estate can appreciate quickly, leading to high capital gains. There are many ways to adjust the cost basis of these properties, like doing renovations.
However you choose to manage your investments, keep good track of what you have, what you paid for it, what it's worth now, and how you've dealt with the profits. By taking maximum advantage of your cost basis, you can minimize your tax bills if you need to take some cash out or sell a position.