What is cost basis?

Cost basis is the amount the IRS treats as your investment in an asset: usually the purchase price plus commissions and fees, adjusted for splits, reinvested dividends, return of capital and wash sales. A sale's capital gain or loss is the net proceeds minus that figure.

By Sonic Wallet Editorial Team· Updated · 8 min read

Key takeaways

  • Cost basis is the amount the IRS counts as your investment in an asset, and the capital gain or loss on a sale is the net proceeds minus it. For shares bought for cash it starts as the price plus commissions and transfer fees, then moves with splits, return-of-capital payments, reinvested dividends and wash sales. Gifts and inheritances follow their own starting rules.
  • A split leaves total basis unchanged: 40 shares bought for $2,506.95, including a $6.95 commission, become 120 shares at $20.89 each after a 3-for-1 split, and keep the original purchase date.
  • A nondividend distribution, shown in box 3 of Form 1099-DIV, is not taxed when paid but lowers basis; once basis reaches zero, any further distribution is a capital gain.
  • Inherited shares take their market value at death as basis, which can be a step down as well as a step up. Gifted shares keep the giver's basis, except that a loss is measured from a lower market value on the day of the gift.
  • Brokers report basis in box 1e of Form 1099-B for covered shares: stock bought for cash after 2010, and fund or reinvestment-plan shares bought after 2011. Older shares are noncovered, and their records are yours to keep.

Cost basis is the dollar figure the tax system treats as your investment in an asset, and it is what gets subtracted from a sale's proceeds to find a capital gain or loss. For shares bought for cash it starts as the price paid plus the costs of buying, which IRS Topic 703 lists as commissions and recording or transfer fees; later events move it up or down, and the running total is called adjusted basis. This entry follows the US federal rules in IRS Publications 550 and 551, which change from time to time, so check your own return with a tax professional. The stocks hub covers owning shares more broadly.

How do you calculate cost basis?

Add the buying costs to the purchase price, apply every adjustment since, and subtract the result from the net sale proceeds to get the gain or loss.

Adjusted basis = purchase price + buying costs + later increases − later decreases
Gain or loss = (sale price − selling costs) − adjusted basis

Selling costs reduce the proceeds instead of adding to basis: the Form 1099-B instructions tell brokers to report proceeds after commissions and transfer taxes, and sales also carry the SEC's Section 31 fee of $20.60 per $1 million of sales. Basis is kept lot by lot, so every purchase, reinvested dividend and share received in a corporate action has its own date and cost. Publication 550's simplest case is 100 fund shares bought at $10 with a $50 commission, a basis of $10.50 a share. The crypto profit calculator applies the same logic to a single coin trade, fees on both sides included.

What changes cost basis after you buy?

Corporate actions, fund distributions and the wash sale rule move basis after the purchase, and each leaves a form or notice to check against your records.

EventEffect on basisWhere it shows up
Dividend or fund distribution reinvestedA new lot, with the reinvested amount as its basisForm 1099-DIV and the reinvestment confirmation
Stock split or nontaxable stock dividendSame total basis, spread across the new share countThe issuer's Form 8937
Nondividend distribution (return of capital)Basis falls by the amount paid; once it reaches zero, the excess is a capital gainForm 1099-DIV, box 3
Loss disallowed as a wash saleAdded to the basis of the replacement sharesForm 1099-B, box 1g
Gains a fund keeps and pays tax onBasis rises by the gain you report minus the tax the fund paid for youForm 2439
Merger or spin-offBasis is divided between the old and new holdingsThe issuer's Form 8937

Reinvested dividends are taxed in the year paid and then become basis, so leaving them out taxes the same money twice. Dividend reinvestment plans cover that record keeping, stock splits explained the split ratios and the wash sale rule guide the deferred loss. A capital gains distribution taken in cash is taxed but leaves the basis of existing shares alone.

Worked example: One position's basis from purchase to sale

  • March 2021: you buy 40 shares at $62.50 and pay a $6.95 commission. Basis: $2,500.00 + $6.95 = $2,506.95, or $62.67 a share.
  • June 2024: a 3-for-1 split leaves you 120 shares. Basis is still $2,506.95, now $20.89 a share, and the March 2021 purchase date carries over.
  • March 2025: a $0.25-a-share special distribution, taken in cash, is reported in box 3 of Form 1099-DIV. It is not taxed; it cuts basis by $30.00 to $2,476.95, or $20.64 a share.
  • December 2025: you turn on dividend reinvestment, and a $96.00 dividend buys 1.6 shares at $60. That is a second lot with a $96.00 basis and its own start date.
  • October 2026: you sell all 121.6 shares at $66.
LotProceedsAdjusted basisGainHolding period
120 split-adjusted shares from 2021120 × $66 = $7,920.00$2,476.95$5,443.05Long-term
1.6 reinvested shares from 20251.6 × $66 = $105.60$96.00$9.60Short-term

The total gain is $5,452.65, less about 17 cents of SEC fee on $8,025.60 of sales. Starting from the bare $2,500 price instead would overstate the gain by $72.95: the $6.95 commission and the $96.00 reinvested dividend left out, partly offset by the $30.00 return of capital ignored.

How do gifts and inheritances set cost basis?

A gift usually hands you the giver's basis, while an inheritance resets basis to the market value on the date of death, whether that value is higher or lower.

Publication 551 gives gifts that have lost value two bases: the giver's basis for measuring a gain and the lower market value at the gift for measuring a loss, so a sale between the two figures gives neither. The holding period follows the basis used, and includes the giver's years only when the giver's basis applies. Part of any gift tax paid on the appreciation is added, though gifts within the giver's lifetime exemption involve no tax to add.

The executor of an estate that files Form 706 can instead value everything six months after death, but only if that lowers both the estate's value and its tax, and heirs who receive Schedule A of Form 8971 may have to use the estate tax value. Inherited shares count as long-term however soon they are sold; Form 8949 takes the word INHERITED in place of a purchase date.

Worked example: The same shares received four ways

Your aunt paid $12,000 for a block of shares. The table shows what happens when you sell them, depending on how they reached you and what they were worth then.

How the shares reached youValue thenYour basisSale priceResult
Gift, worth more than her basis$30,000$12,000$31,000$19,000 gain
Inheritance$30,000$30,000$31,000$1,000 long-term gain
Gift, worth less than her basis$9,000$12,000 for gains, $9,000 for losses$10,500Neither gain nor loss
Inheritance$9,000$9,000$10,500$1,500 long-term gain
  • Row 1: $31,000 − $12,000 = $19,000, and her holding period counts toward yours
  • Row 2: $31,000 − $30,000 = $1,000; the $18,000 rise in her lifetime is never taxed
  • Row 3: a $1,500 loss measured from $12,000 but a $1,500 gain measured from $9,000, so neither
  • Row 4: basis steps down to $9,000, and the $3,000 decline in her lifetime is never deductible by anyone

Crypto follows the same principles, covered in crypto gifts and donations tax and crypto inheritance planning.

Which cost basis method applies when you sell part of a position?

Unless you name specific lots, the shares bought first are treated as sold first; averaging is allowed only for fund shares and reinvestment-plan shares.

MethodHow the basis of the shares sold is foundWhere it can be used
First in, first out (FIFO)The earliest lots leave firstAny security; the fallback when no lots are named
Specific identificationYou name the lots at the time of sale and get written confirmationAny security
Average basisTotal basis of identical shares in the account divided by the shares held, regardless of datesShares of most mutual funds and other regulated investment companies, and shares in a qualifying dividend reinvestment plan

When no lots are named, the 1099-B instructions have brokers treat shares with an unknown purchase date as sold first, then the earliest; averages are figured account by account. Capital gains tax on stocks shows how the choice changes the tax on a sale, and crypto cost basis methods covers the wallet-by-wallet rules for coins.

Where do you see cost basis?

You meet cost basis on trade confirmations, on the positions screen of a brokerage account and on the forms that report each sale.

  • Trade confirmations record the price, quantity and commission of each purchase; FINRA suggests keeping every one.
  • Positions screens set basis beside market value. The gap is a paper gain or loss, taxed only on a sale, the line drawn in realized vs unrealized gains.
  • Form 1099-B. Box 1e is cost or other basis, box 12 is checked when it went to the IRS, box 5 flags a noncovered security whose basis may be left out, and box 1g holds any disallowed wash sale loss.
  • Form 8949. Column (e) carries basis onto the return; a wrong 1099-B figure is corrected with code B in column (f) and an amount in column (g).
  • Form 1099-DA is the crypto counterpart, phased in as follows: Gross proceeds for sales from January 1, 2025; cost basis for covered assets bought from January 1, 2026 in a custodial account. Form 1099-DA explained has the detail.

Stock acquired for cash after 2010, and fund or reinvestment-plan shares acquired after 2011, are covered securities whose basis the broker reports to you and the IRS; older shares depend on your records. When shares move between brokers, the sending firm owes a transfer statement within 15 days of settlement, and without a complete one the new broker may treat them as noncovered.

How is cost basis different from market value and average price?

Cost basis is what you put in; market value is what the shares would fetch today, and proceeds are what a sale actually brought in.

TermWhat it measuresWhere you see it
Cost basisYour investment for tax purposes, adjusted over timeForm 1099-B box 1e; Form 8949 column (e)
Market valueShares held × the latest priceStatements and stock price pages
ProceedsWhat a sale brought in, after commissions and feesForm 1099-B box 1d
Average cost on a positions screenTotal cost ÷ shares held, as a display figureBrokerage apps and websites
Book valueA company's assets minus its liabilities, unrelated to your purchaseBalance sheets and the price-to-book ratio

The display average is the one that misleads. For individual stocks the IRS does not allow average basis, so selling part of a position uses the basis of the particular lots sold. Buy 10 shares at $100 and 10 more at $140 and an app may show a $120 average; sell 10 at $125 with no lots named and FIFO sells the $100 shares, for a $250 gain rather than the $50 the average suggests. Mutual fund shares are bought at net asset value plus any front-end sales charge, and that total is their starting basis.

What mistakes do people make with cost basis?

Most basis mistakes overstate the gain, because an adjustment was missed or a record was lost, though a few understate it.

  • Treating a blank box 1e as zero. A noncovered sale still had a cost. Rebuild it from statements, the transfer agent and historical prices; FINRA warns that without records you may be stuck with the broker's figure or with zero.
  • Using the decedent's purchase price for inherited shares. The heir's basis is the value at death, usually higher, which shrinks the gain.
  • Using the gift date's value for a gift that had risen. Appreciated gifts carry the giver's basis, so the giver's records matter.
  • Ignoring return of capital. An uncut basis understates the gain, and distributions after basis reaches zero are taxable gains in the year paid.
  • Leaving pre-split records undivided. The 40 shares at $62.67 in the first example must become 120 shares at $20.89, or the per-share basis is three times too high.
  • Assuming the broker caught everything. Brokers may ignore events outside the account, such as a repurchase elsewhere that creates a wash sale, so your figure can differ from box 1e.

Frequently asked questions

Does cost basis include commissions and fees?+

Yes, on the purchase: commissions and recording or transfer fees paid to buy shares are added to basis. Fees on the sale are handled on the other side, as a reduction of the proceeds, so no fee is counted twice.

What happens if you can't find your cost basis?+

Rebuild it from trade confirmations, old statements, the transfer agent, dividend records and historical prices, as the IRS expects. FINRA warns that without adequate records you may have to rely on the broker's figure, or even a basis of zero, which overstates the gain.

Is cost basis taxed when you sell?+

No. The part of the sale price equal to your basis is a tax-free return of your own money. Only the amount above it is a taxable gain, and any shortfall below it is a capital loss.

Does cost basis matter inside an IRA or 401(k)?+

Not for individual trades, which create no reportable gain or loss inside the account. A traditional IRA can still have basis of its own: nondeductible contributions are reported on Form 8606 so they are not taxed again when withdrawn.

How long should you keep cost basis records?+

For as long as you own the shares, and then until the period of limitations ends for the year you sell them, which is usually three years after filing that year's return, according to the IRS.

Sources

  1. Topic no. 703, Basis of assets, IRS
  2. Publication 551, Basis of Assets, IRS
  3. Publication 550 (2025), Investment Income and Expenses, IRS
  4. Instructions for Form 1099-B (2026), IRS
  5. Instructions for Form 8949 (2025), IRS
  6. Instructions for Form 706 (July 2026): alternate valuation, IRS
  7. Stocks (options, splits, traders) 1, IRS
  8. How long should I keep records?, IRS
  9. About Form 8606, Nondeductible IRAs, IRS
  10. Cost Basis Basics, FINRA
  11. Section 31 Transaction Fee Rate Advisory for Fiscal Year 2026, SEC
  12. Digital assets, IRS

Related guides