Stock Cost Basis Calculator

This stock cost basis calculator helps you find your average buy price. Each time you click “Calculate,” it factors in your previous buy or sell transactions. You can also start from the beginning by hitting the reset button.

Stock Cost Basis Calculator

Cost Basis Definition

Cost basis is the original value of an investment. This helps you determine your gains or losses. It’s useful for determining whether your investments are profitable.

This is important for taxes as well. If you sell at a much higher price than your cost basis, you might have to pay more in capital gains taxes. That is because the capital gains tax rate is determined by the difference between the cost basis and the current market value of the asset.

On the flip side, you might sell an investment at a loss. By tracking your losses, you can sometimes use them to offset other taxable gains. Learning how to calculate your cost basis is an important step for investors. So let’s start with a basic formula below and then look at cost basis adjustments…

Stock Cost Basis Formula and Adjustments

With this stock cost basis calculator, you can determine the total cost basis of your investment. By entering the number of shares (units) and share price (cost per unit), you can find the total value of the investment.

The formula behind this is simple. Although, as you enter subsequent transactions, it can become harder to follow. For example, if you buy 100 shares at $20 and later buy another 100 shares at $30, your total cost basis is $5,000 (100 × 20 + 100 × 30). The average adjusted cost basis per share is $25 ($5,000 / 200 shares). With this cost basis calculator, you can see this in the “SCB per Unit” result.

You can also enter in partial sales at different price points. This will give you a good idea of your resulting cost basis on both a total and per share level. Feel free to play around with the calculator and test out different scenarios.

Stock Splits

There are many factors that can affect the cost basis calculation such as mergers, special dividends and bankruptcies. A common one is stock splits. This is when a company increase the number of shares it has outstanding. An example is a 2-for-1 split. This means that for every share you held before the split, you would now have two shares. So if you had 50 shares, after the split you would have 100.

The good news is that this doesn’t complicate the formula too much because the initial cost stays the same. Sticking with the above example, if you paid $10 per share, your initial cost would be $500 (50 x 10). After the split, since the initial price stays the same, your shares would be $5 per share.

This tool is good to keep on hand and it’s even more useful as your portfolio grows. To see how your portfolio might grow, check out our free Investment Calculator. It gives a visual of potential investment returns. And to help find better investments, consider signing up for one of our free e-letters here.


Become a smarter, more confident and more successful wealth builder with the free Investment U e-letter.

By submitting your email address, you will receive a free subscription to the Investment U e-letter, and offers from us and our affiliates that we think might interest you. You can unsubscribe at any time. Privacy Policy