Cost Basis Calculator
Average cost = total dollars in ÷ total shares, including DRIP. Click any i for detail.
Lots (averaged)
Purchases ($)
i
Purchases
Sum of buy principal (not including fees). |
|
|---|---|
Commissions / fees ($)
i
Fees
Brokerage commissions and similar friction added to basis. |
|
Shares bought
i
Shares
Shares from those purchases (not DRIP yet). |
|
Reinvested dividends ($)
i
DRIP dollars
Dividends used to buy more shares. |
|
Extra DRIP shares
i
DRIP shares
Shares acquired from reinvested dividends. |
How to use this calculator
- Sum purchase dollars and share counts.
- Add commissions to fees.
- If DRIP is on, add reinvested dollars and extra shares.
- Read average cost per share.
Results explained
Average cost = (purchases + fees + reinvested dividends) ÷ (shares + DRIP shares). This is one averaging method — brokers also support specific-lot identification.
Quick reference: basis
Wash sales and inherited-step-up are not on this page.
| Item | Detail |
|---|---|
| Average cost | Total $ ÷ total shares |
| Specific ID / FIFO | Not modeled |
| Return vs basis | See ROI calculator |
| Retirement accounts | Basis tracking differs in IRAs — this is a taxable-lot sketch |
Profit vs invested: ROI calculator.
How the estimate is built
avg = (spent + fees + reinvest) / (shares + drip shares).
Example scenario
$12,500 for 100 shares, no fees or DRIP → $125.00/sh.
FAQ
Crypto lots?
Same averaging idea if you treat coins as the share count.
Splits?
Adjust shares (and maybe purchase history) before entering totals.
Capital gain?
Gain = sale proceeds − basis × shares sold — not computed here.