Updated September 2026
"Cost basis" shows up on brokerage statements, tax forms, and in casual investing conversation, often used slightly differently in each. This page defines it precisely, works through a real example by hand, and explains where the "average cost basis" this calculator computes fits among the several ways cost basis can be figured.
Your cost basis is simply what you paid to acquire an asset — the reference point everything else (gain, loss, break-even) is measured against. For a single purchase, it's just the price you paid. It only gets more interesting once you've bought the same asset more than once, at more than one price, because then "what you paid" isn't a single number anymore — it's a blend.
These are two different but related numbers, and mixing them up is a common source of confusion:
Say you bought a position three separate times:
| Lot | Quantity | Price | Cost |
|---|---|---|---|
| 1 | 50 | $80 | $4,000 |
| 2 | 30 | $60 | $1,800 |
| 3 | 20 | $45 | $900 |
| Total | 100 | — | $6,700 |
Total cost basis: $6,700. Average cost basis per share: $6,700 ÷ 100 = $67.00.
Compare that to a naive simple average of the three prices — ($80 + $60 + $45) ÷ 3 = $61.67 — which is meaningfully lower and wrong for this purpose. The simple average ignores that the first, most expensive lot (50 shares at $80) was also the largest, so it should pull the true average up more than an unweighted mean gives it credit for. This is exactly why "just average the prices" is a common but incorrect shortcut — see how this calculator computes it for the formula that avoids that trap.
For tax reporting on a sale, "cost basis" can be computed several different ways, and which one applies depends on your account type, your broker's default, and sometimes an election you make:
These methods can produce meaningfully different taxable gains or losses on the exact same sale. This calculator's weighted-average number is a useful, consistent planning figure — "what have I actually paid, blended, for what I currently hold" — but it is not automatically your tax-reporting cost basis unless your account specifically uses the average cost method. Your broker's 1099-B or year-end statement is the authoritative source for tax filing.
Even setting tax reporting aside entirely, knowing your true blended cost basis answers the practical question most people actually have: "what price do I need this to reach before I've made my money back?" That's your break-even price, and it's simply your average cost basis with zero target gain applied — see how we calculate for exactly how the calculator turns that into a target price for any gain percentage you choose.
Is "cost basis" the same as "book value"? They're related concepts from different contexts (book value is more of a corporate accounting term for a company's own balance sheet), and casual usage varies — in an investing context, cost basis almost always means what you personally paid for an asset.
Does reinvesting dividends change my cost basis? Yes — a reinvested dividend is functionally a new purchase at that day's price, and should be entered as its own lot if you're tracking cost basis precisely for that position.
My broker shows a different average cost than this calculator. Why? Possible reasons: your broker may include or exclude fees differently, may be tracking a longer or shorter history than you entered here, or may be using a different accounting method for tax purposes. This tool is for quick planning checks — treat your broker's statement as authoritative for anything you're filing.