What Is Cost Basis? How to Calculate It for Taxes
By Markets & Investing DeskUpdated Nov 10, 2026

Definition
Cost basis is the amount you're treated as having invested in an asset for tax purposes. Your capital gain or loss on a sale is the difference between what you receive and that basis.
Key takeaways
- Reinvested dividends raise your basis, so leaving them out means paying tax twice on the same money.
- Return of capital and depreciation lower basis, while capital improvements and wash sale losses raise it.
- FIFO, specific identification and average cost can produce different gains and holding periods on one sale.
- Inherited assets generally take a basis equal to fair market value on the date of the owner's death.
Cost basis is the amount you’re treated as having invested in an asset for tax purposes: usually the purchase price plus acquisition costs such as commissions and fees, adjusted afterward for events like reinvested dividends, return of capital distributions and stock splits. When you sell, your taxable capital gain or deductible loss is the difference between what you receive and that basis. A higher basis means a smaller taxable gain. A lower basis means a larger one.
What Cost Basis Includes
Cost basis = purchase price + acquisition costs
Acquisition costs for securities typically mean commissions and transaction fees paid to buy. For real estate, they include certain settlement and closing costs. From there the basis becomes an adjusted basis as events occur:
Adjusted basis = original cost basis + additions − reductions
Cost basis can be expressed as a total, the full dollar amount invested in a position, or per share, the total divided by the number of shares you hold. The total tells you how much of a sale’s proceeds is a tax-free return of your own money. The per-share figure lets you compare your cost with the current price: if the market value per share is below your cost basis per share, the position has an unrealized loss.
You don’t pay tax on your cost basis itself: that portion of sale proceeds is a return of your own investment. Tax applies only to the amount realized above basis. If you sell below basis, the difference is a capital loss that can offset other capital gains and, within annual limits, ordinary income. The rate applied to a gain is a separate question, covered in our guide to capital gains tax.
How to Calculate Cost Basis: A Worked Example
Hypothetical example. You buy 50 shares of a stock at $80 per share and pay a $5 commission.
- Original cost basis: (50 × $80) + $5 = $4,005
- Cost basis per share: $4,005 ÷ 50 = $80.10
Over the next two years the company pays dividends of $150 and $170, which you reinvest in additional shares. Each dividend is taxable income in the year you receive it, even though you never took it as cash, so it becomes part of your investment:
- Adjusted cost basis: $4,005 + $150 + $170 = $4,325
You then sell the entire position for $5,000 and pay a $5 commission on the sale. Selling costs reduce the amount you realize:
- Amount realized: $5,000 − $5 = $4,995
- Capital gain with the correct basis: $4,995 − $4,325 = $670
- Capital gain if the reinvested dividends were left out: $4,995 − $4,005 = $990
The $320 difference would be taxed twice: once as dividends and again as part of the gain. This matters most for investors in dividend reinvestment plans or funds that reinvest distributions.
Events That Raise or Lower Cost Basis
Several events adjust basis after purchase. The direction matters because it moves your future gain the opposite way.
Increase basis:
- Reinvested dividends and capital gains distributions, as in the example above
- Additional purchases of the same security (each purchase creates a new lot with its own basis)
- A loss disallowed under the wash sale rule, which is added to the basis of the replacement shares
- Capital improvements to real estate, such as an addition or a new roof
Decrease basis:
- Return of capital distributions, which are treated as a partial refund of your investment rather than income. Once basis reaches zero, further return of capital is generally taxed as a capital gain.
- Depreciation claimed on rental or business property
- Certain casualty loss deductions and insurance reimbursements on property
Lowering the Cost Basis Per Share by Buying More
Adding shares at a lower price, known as averaging down, is often described as “lowering the cost basis.” Hypothetical example: you hold 100 shares bought at $50 ($5,000) and buy 100 more at $30 ($3,000). Your average cost per share falls to $40 ($8,000 ÷ 200), but your total cost basis rises from $5,000 to $8,000 because you invested more money. For tax purposes the purchases also remain separate lots unless you use an averaging method, which matters when you later sell part of the position.
Adjusting Cost Basis After a Stock Split
A stock split changes the number of shares and the basis per share, but not your total basis. Hypothetical example: you own 200 shares with a total basis of $6,000, or $30 per share. The company does a 3-for-1 split.
- Method 1: total basis ÷ new share count = $6,000 ÷ 600 = $10 per share
- Method 2: old basis per share ÷ split ratio = $30 ÷ 3 = $10 per share
A reverse split works the same way in the other direction: fewer shares, higher basis per share, same total.
Cost Basis Methods for Partial Sales
When you hold several lots of the same security bought at different prices and sell only some shares, you need a rule for which shares you sold. The choice can change both the size of the gain and whether it is short-term or long-term.
- First in, first out (FIFO): the oldest shares are treated as sold first. For stocks, this is generally the default if you don’t identify specific shares.
- Specific identification: you choose the exact lots sold, provided you identify them to your broker at the time of the sale.
- Average cost: your total basis is divided by total shares, and every share sold carries that average. It is available for mutual fund shares and shares held in dividend reinvestment plans, and it is a common broker default for funds.
- Last in, first out (LIFO), highest cost, lowest cost: variations of specific identification that many brokers offer as standing elections.
Hypothetical example. You bought shares of a fund in three lots:
| Lot | Shares | Price | Cost |
|---|---|---|---|
| 1 (held more than a year) | 100 | $40 | $4,000 |
| 2 (held less than a year) | 100 | $60 | $6,000 |
| 3 (held less than a year) | 100 | $50 | $5,000 |
Total basis is $15,000 for 300 shares, an average of $50. You sell 100 shares at $70 ($7,000), ignoring fees.
- FIFO (lot 1): $7,000 − $4,000 = $3,000 long-term gain
- Average cost: $7,000 − $5,000 = $2,000 gain (for averaged fund shares, holding period is generally determined first in, first out, so these would be treated as lot 1 shares)
- LIFO (lot 3): $7,000 − $5,000 = $2,000 short-term gain
- Highest cost (lot 2): $7,000 − $6,000 = $1,000 short-term gain
The highest-cost choice produces the smallest gain, but it is short-term, which is taxed at ordinary income rates. A larger long-term gain can sometimes cost less in tax than a smaller short-term one, so the right method depends on your tax bracket and on whether you have losses to offset. If the sale price were below some lot costs, choosing those lots could produce a deductible loss instead of a gain.
Method elections carry rules of their own. Average cost generally has to be applied to all shares of that fund in the account, and changing away from it typically applies only to shares acquired afterward. Specific identification only works if the lots are designated by the time the trade settles, not reassigned at tax time.
Cost Basis for Gifted and Inherited Assets
Gifts. If someone gives you shares or property, you generally take over the donor’s adjusted basis (a carryover basis). An exception applies when the asset’s fair market value on the date of the gift is below the donor’s basis. In that case, two bases apply:
- To figure a gain, use the donor’s basis.
- To figure a loss, use the fair market value at the date of the gift.
- If you sell for a price between those two figures, you report neither a gain nor a loss.
Hypothetical example: the donor’s basis is $10,000 and the shares are worth $7,000 when gifted. Sell for $12,000 and you report a $2,000 gain. Sell for $5,000 and you report a $2,000 loss. Sell for $8,000 and there is no gain or loss.
Inheritances. Inherited assets generally take a basis equal to fair market value on the date of the owner’s death (or an alternate valuation date, if the estate elects one). When the asset has appreciated, this step-up in basis means gains built up during the original owner’s lifetime are not taxed to the heir. If the asset had fallen in value, the basis steps down instead. Inherited property is also generally treated as held long-term regardless of how long the heir owns it.
Reporting Cost Basis on Your Tax Return
In the U.S., brokers report sales on Form 1099-B. For covered securities, broadly stocks bought from 2011 onward and mutual fund and dividend reinvestment plan shares bought from 2012 onward, the broker must report your cost basis to you and to the IRS. For noncovered securities, such as older holdings or shares transferred without records, the broker may not report basis, and supplying it is your responsibility.
Sales go on Form 8949, separated into short-term and long-term and by whether basis was reported to the IRS, and the totals flow to Schedule D. If the basis on your 1099-B is wrong or missing, report the correct figure on Form 8949 with the appropriate adjustment code, backed by your records.
Useful documentation includes trade confirmations, statements showing reinvested dividends, return of capital records, corporate action notices for splits and mergers, and, for gifts or inheritances, the donor’s records or a date-of-death valuation. For real estate, keep the closing statement, receipts for capital improvements and records of any depreciation claimed.
Cost Basis vs. Related Terms
Cost basis vs. tax basis or adjusted basis. The terms are often used interchangeably. Strictly, cost basis is the original cost of acquiring the asset, while tax basis or adjusted basis reflects all additions and reductions up to the date of sale. The adjusted figure is the one used to compute gain or loss.
Cost basis vs. market value. Market value is what the asset is worth today. The gap between the two is unrealized gain or loss, which doesn’t become taxable until you sell.
Cost basis vs. basis in futures markets. In commodities trading, “basis” means the difference between a commodity’s local spot (cash) price and the price of a related futures contract. It has nothing to do with the tax basis of a futures position.
Limitations of Cost Basis
Cost basis is only as accurate as the records behind it. Long-held positions, broker transfers, years of reinvested dividends, mergers and spin-offs can leave gaps, particularly for noncovered securities, and a broker-reported figure can still mishandle a wash sale adjustment or corporate action for your situation.
Cost basis is also a tax measure, not a performance measure. Because reinvested dividends raise basis, comparing basis with market value understates the total return those dividends generated. It ignores inflation too: a gain measured against a decades-old basis may be partly or entirely inflation, yet it is taxed in full.
Finally, the rules described here are U.S. federal rules. Other countries use different methods; Canada, for instance, uses an adjusted cost base averaged across identical properties, administered by the CRA.
FAQs
What if I can't find my original cost basis?
Check old brokerage statements, trade confirmations, or the transfer agent or fund company, which may hold historical records, and use historical price data for the approximate purchase date to reconstruct a figure. If basis can't be supported, the IRS may treat it as zero, making the entire sale proceeds taxable, so a documented reconstruction is generally better than none.
The Bottom Line
Cost basis matters to anyone who sells stocks, funds or property, especially investors who reinvest dividends or hold several lots of the same security. Keeping trade confirmations, dividend statements and corporate action notices lets you report the correct adjusted basis on Form 8949, even when a broker's 1099-B figure is wrong or missing. Choosing a basis method with your tax bracket in mind can also reduce the tax on a partial sale.















