Cost Basis Calculator
Bought a stock in more than one go? Find your true average cost per share.
How this is calculated
average = total cost / total shares. Your unrealized gain or loss is the current value of those shares minus what you paid for them.You know your basis. The harder question is whether to hold or sell.
Get the plain-English read on OpenTradeEstimate based on your inputs. Not financial or tax advice. Past performance does not guarantee future results.
How to calculate cost basis
Your cost basis is what you actually paid for a position. When you buy the same stock across several purchases at different prices, the number that matters is your average cost per share.
- Add up the total shares across every purchase you made.
- Add up the total invested by multiplying each purchase's shares by its price, then summing.
- Divide total invested by total shares. The result is your average cost per share.
What is adjusted cost basis?
Adjusted cost basis is your original basis changed for later events such as reinvested dividends, stock splits, commissions, or return of capital. Those adjustments raise or lower the basis, which changes the taxable gain when you sell.
Does cost basis affect my taxes?
Yes. When you sell, your taxable gain is the sale price minus your cost basis. A higher basis means a smaller gain and usually a smaller tax bill, so tracking it accurately across every lot is worth the effort. For your specific situation, check with a tax professional.