Use this cost basis calculator to estimate your adjusted basis, capital gain or loss, and potential tax impact when selling an investment.
Educational estimate only. Tax reporting can depend on lot method (FIFO, specific identification, average cost for mutual funds), wash sale rules, and local regulations.
What Is Cost Basis?
Cost basis is the value used to measure taxable gain or loss when you sell an asset. In plain language, it is what you effectively “have in” the investment. For stocks and ETFs, basis usually begins with the purchase amount plus transaction costs. Then it may be adjusted over time.
When you sell, your gain or loss is typically:
- Net proceeds (sale value minus selling fees)
- minus your allocated cost basis for the shares sold
This is why understanding basis is central to tax planning, performance tracking, and portfolio decisions.
How to Use This Basis Calculator
1) Enter purchase details
Start with price per share, number of shares, and buy fees. These create your initial investment basis.
2) Add basis adjustments
Use the adjustment field for items that increase or decrease basis over time. Examples include certain reinvested dividends or return-of-capital events.
3) Account for stock splits
A split changes share count and basis per share, but not total basis. If your stock split 2-for-1, enter 2.
4) Enter sale details
Add sale price, shares sold, and selling fees. The calculator estimates proceeds, gain/loss, and optional tax impact.
Formula Behind the Tool
Adjusted Total Basis
Adjusted Basis = (Purchase Price × Shares Purchased) + Buy Fees + Basis Adjustments
Adjusted Shares After Split
Adjusted Shares = Shares Purchased × Split Ratio
Cost Basis Per Share
Basis Per Share = Adjusted Basis ÷ Adjusted Shares
Allocated Basis for Shares Sold
Allocated Basis = Basis Per Share × Shares Sold
Net Proceeds and Gain/Loss
Net Proceeds = (Sale Price × Shares Sold) − Sell Fees
Gain/Loss = Net Proceeds − Allocated Basis
Why Basis Matters So Much
- Tax accuracy: Incorrect basis can cause overpaying or underpaying taxes.
- Decision quality: True after-tax returns are clearer when basis is tracked correctly.
- Recordkeeping confidence: Audits and corrected 1099-B forms are easier to handle.
- Planning: You can model partial sales and compare outcomes before acting.
Common Basis Adjustments Investors Miss
- Reinvested dividends that add to basis
- Broker commissions and transaction charges
- Return-of-capital distributions (often reduce basis)
- Corporate actions such as mergers, spin-offs, and splits
- Wash-sale disallowed losses carried into replacement shares
If your account history is long, these details can meaningfully change your final taxable result.
A Practical Example
Suppose you buy 100 shares at $40 with $5 commission. Your initial basis is $4,005. Later you sell 100 shares at $55 and pay $5 to sell. Your proceeds are $5,495. Gain is $1,490 before taxes. At a 15% capital gains rate, tax estimate is $223.50. Your after-tax proceeds estimate is $5,271.50.
This is exactly the kind of scenario the calculator handles quickly.
Cost Basis Methods: Quick Reminder
Different assets and account types can use different lot methods. Common methods include FIFO, specific identification, and (for some mutual fund holdings) average cost. This calculator uses a straightforward average-basis approach for estimation, which is ideal for planning. For official filing, follow your broker statements and tax advisor guidance.
Frequently Asked Questions
Does a stock split create a taxable gain?
Generally, no. Splits typically change share count and basis per share without changing total basis.
Are broker fees part of basis?
Buy-side fees generally increase basis; sell-side fees reduce proceeds.
Can I estimate tax with this tool?
Yes, by adding an estimated capital gains tax rate. It is a planning estimate, not a tax filing output.
Bottom Line
A good basis calculator helps you move from rough guesswork to clear, decision-ready numbers. Whether you are tracking long-term investing performance or planning a sale this quarter, getting basis right is one of the highest-leverage habits in personal finance.