Companies cannot pay for placement in our rankings. DollarVisor is funded by advertising, never by commissions on what we recommend.

Investing Q&A

What Is Cost Basis? How to Track and Report It

Cost basis is what you paid for an investment, adjusted for everything that happened while you held it. Sale price minus that number is your taxable gain. Our verdict: it is worth real money…

TL;DR: Cost basis is what you paid for an investment, adjusted for everything that happened while you held it. Sale price minus that number is your taxable gain. Our verdict: it is worth real money. On one 100-share sale, the method you pick moves the federal bill from $825 to nothing, and a figure you forgot to update can cost $456 in tax you never owed.

1. What cost basis actually is

Quick Answer: Cost basis is the money you have already been taxed on or paid out of pocket. It is the purchase price plus buying fees, adjusted up or down by events while you hold. Your capital gain is the sale price minus that number.

The starting point is simple. Per IRS Publication 551, the basis of stocks or bonds is the purchase price plus costs such as commissions and transfer fees. Buy 100 shares at $40 with a $10 commission and your basis is $4,010.

The word people miss is “adjusted.” Basis is not frozen at purchase. Reinvested dividends push it up, return-of-capital distributions push it down, and a disallowed wash sale loss gets bolted onto the replacement shares.

  • Basis is per lot, not per holding. Every purchase creates its own tax lot with its own basis and holding period.
  • It is not market value. One is history, the other is today. Only the gap is taxed.
  • It only matters in taxable accounts. Inside an IRA, a 401(k) or an HSA, nobody tracks it.
Key takeaway: Your basis is the part of a sale that is already yours. Everything above it is what the IRS gets to tax, which is why an accurate number is worth more than a good stock pick some years.

Here is a plain-English walkthrough before the numbers.

Video: What Is Cost Basis and Why Does It Matter for Taxes & Retirement?

2. How to calculate cost basis in three lines

Quick Answer: Start with what you paid, add the costs of buying, then apply every adjustment that happened while you owned it. That gives adjusted basis. Sale proceeds minus adjusted basis equals your gain or loss, and the holding period decides which tax rate applies to it.

  1. Purchase price. Shares bought times the price paid, for that lot.
  2. Plus acquisition costs. Commissions, transfer fees and any sales load in a fund purchase.
  3. Plus or minus adjustments. Reinvested dividends, return of capital, wash sale add-backs, splits and spin-offs.

A worked example. Buy 100 shares at $40 with a $10 commission and basis is $4,010. Four years of reinvested dividends add $600, lifting it to $4,610. A $150 return-of-capital distribution drops it to $4,460. Sell at $9,500 and the taxable gain is $5,040, not the $5,500 a quick subtraction gives.

Key takeaway: The gap between purchase price and adjusted basis is where the money hides. In the example above it is $460 of gain that was never really gain.

Not sure your broker is tracking lots properly?

Lot-level reporting varies a lot between platforms, and it is easier to check before you have twenty years of history. Compare broker basis tracking →


3. The same sale, three cost basis methods

Quick Answer: Selling 100 shares out of a 400-share position is not one transaction, it is a choice of which lot to sell. On the position below, the default method produces a $5,500 gain and an $825 federal tax bill. Choosing the highest-cost lot instead produces a $1,500 loss.

Four purchases of the same index fund, then a sale of 100 shares at $95 in June 2026. Every lot is over a year old.

Same 100-Share Sale, Three Basis Methods
Gain and federal tax on the same one hundred share sale under three basis methods.
Method Lot sold Basis used Gain or loss Federal tax at 15% Versus FIFO
FIFO (the default) Mar 2019, $40 $4,000 +$5,500 $825 :
Average cost Blend of all four $7,500 +$2,000 $300 −$525
Specific identification Feb 2025, $110 $11,000 −$1,500 $0 −$1,050

Illustrative scenario, DollarVisor calculation. Lots of 100 shares at $40, $62, $88 and $110. Rate per IRS Publication 550.

The last column is the one to sit with. Picking the lot is not a loophole, it is a choice the code gives you. Skipping it hands $1,050 to the IRS.

One sale, one position, three legal answers: an $825 tax bill, a $300 bill, or a $1,500 loss you can use elsewhere.

Key takeaway: The lot you sell is worth more than the day you sell. On a position built over several years, the spread between the cheapest and priciest lot is usually the biggest lever you have.

4. Which method your broker is using right now

Quick Answer: Unless you changed a setting, stocks default to FIFO and many fund accounts default to average cost. Specific identification is the flexible option, but only if you identify the lot at or before settlement. Telling your accountant in April does not work.

The three methods in IRS Publication 550 behave very differently in practice.

  • FIFO. Oldest shares go first. In a rising market that means the lowest basis and the largest gain, which is backwards from what most sellers want.
  • Specific identification. You name the lot before settlement and the broker confirms in writing. Best for harvesting losses or trimming without a big bill.
  • Average cost. One blended figure across the fund. Available for mutual funds and reinvestment plans, and the IRS mutual fund guidance says you must elect it.

Average cost is the quiet trap. Once you use it on a sale, the remaining covered shares in that fund stay averaged. If you buy through regular monthly purchases, you create dozens of lots a year and averaging throws that flexibility away.

Key takeaway: Check your default setting today, not on the day you sell. The method is applied at trade time, and it is very hard to unwind afterwards.

5. Six events that move your basis

Quick Answer: Adjusted basis changes for six common reasons. On a $10,000 position, a disallowed wash sale loss is usually the largest single move, followed by return of capital. Splits look dramatic on a statement but change total basis by nothing at all.

The bars show the typical size of each adjustment on a $10,000 holding over one year.

Typical Basis Adjustment on a $10,000 Position
Six events that adjust basis, with direction and typical size on a ten thousand dollar position.
Event Direction Relative size Typical amount
Wash sale loss added back Raises basis +$400
Return of capital distribution Lowers basis −$300
Reinvested dividends, 2% yield Raises basis +$200
Front-end sales load Raises basis +$100
Commission to buy shares Raises basis +$0 to $15
Two-for-one stock split Total unchanged $0

Illustrative scenario, DollarVisor calculation. Adjustment rules per IRS Publication 551.

The split row deserves a note. A two-for-one split doubles your shares and halves the per-share figure, leaving the total untouched. Keep using the old per-share number and you report roughly double the real gain.

Key takeaway: Adjustments are not rounding errors. Two or three of them on a long-held position routinely move basis by several hundred dollars in each direction.

6. Covered versus noncovered: what your broker actually reports

Quick Answer: Brokers only report basis to the IRS on securities bought after set dates: stock from January 1, 2011, mutual funds and reinvestment plans from January 1, 2012, most options and debt instruments from January 1, 2014. Older lots are your job.

The Form 1099-B instructions split every sale into two camps. Covered lots arrive with basis filled in and reported to the IRS. Noncovered lots arrive with proceeds only, or a courtesy estimate your broker will not stand behind.

  • Covered. Basis sits in box 1e and box 3 is checked. The IRS sees the same number you do.
  • Noncovered. Box 5 is checked. You supply the figure and keep the records behind it.
  • Transferred accounts. Moving between brokers is where basis most often goes missing. The new firm gets what the old one sends, nothing more.
Key takeaway: Sort your holdings into covered and noncovered once, then focus your record-keeping entirely on the noncovered pile. That is the only part where nobody is checking your work for you.

Holding shares older than 2011?

Those lots carry no reported basis, so the reconstruction work falls to you before you sell. Read our investing guides →


7. Reinvested dividends quietly raise your basis

Quick Answer: Every reinvested dividend is money you already paid tax on, so it adds to basis. On a $10,000 fund yielding 2%, basis climbs to about $13,039 after ten years. Reporting the original $10,000 overstates your gain by $3,039.

This is the most common cost basis error we see, because the money never touches your bank account. You were taxed the year it was paid, under the rules in our guide to how dividends are taxed. Paying again at sale is paying twice.

Basis Growth From Reinvested Dividends, Years 1–10
Value, dividends reinvested, adjusted basis and overstated gain across ten years.
Year Position value Dividends reinvested Adjusted basis Gain overstated if ignored
Year 1 $10,900 $200 $10,200 $200
Year 3 $12,950 $238 $10,656 $656
Year 5 $15,386 $282 $11,197 $1,197
Year 7 $18,280 $335 $11,840 $1,840
Year 10 $23,674 $434 $13,039 $3,039

Modeled projection, DollarVisor calculation. Assumes 7% price growth and a 2% yield reinvested.

At year ten that is $3,039 of phantom gain. At the 15% long-term rate it costs $456 in federal tax on money that was never profit, before any state tax.

Key takeaway: If you have ever ticked the reinvest box, your basis is higher than the amount you originally invested. Check the number before you sell, not after.

8. What an understated basis costs in ten states

Quick Answer: Understating basis by $5,000 costs $750 in Texas or Florida and $1,215 in California. The federal share is the same everywhere. Your state decides how much worse the mistake gets, because almost no state gives capital gains a discount.

Same sale in every row: $40,000 of proceeds, a true basis of $25,000, and a filer who reports $20,000 because the records vanished.

Extra Tax on $5,000 of Overstated Gain, Ten States (2026)
Combined federal and state tax on five thousand dollars of overstated gain in ten states.
State treatment State State rate All-in rate Extra tax paid
Taxes capital gains as ordinary income California 9.30% 24.30% $1,215
New York 5.90% 20.90% $1,045
Georgia 5.19% 20.19% $1,010
Illinois 4.95% 19.95% $998
Michigan 4.25% 19.25% $963
Ohio 3.99% 18.99% $950
Pennsylvania 3.07% 18.07% $904
North Carolina 2.75% 17.75% $888
No state income tax Texas 0% 15.00% $750
Florida 0% 15.00% $750

DollarVisor calculation. State rates at $120,000 of income from the Tax Foundation 2026 state rate tables. Local city taxes excluded.

Notice the range: $465 separates the best and worst outcome on the same mistake. An hour spent finding an old confirmation slip is well paid in California.

Key takeaway: Where you live changes the price of sloppy records by more than 60%. High-tax states should treat basis documentation as a priority, not paperwork.

9. How to rebuild a cost basis you cannot trace

Quick Answer: A missing record is not a lost cause. Old statements, the transfer agent, historical prices and your own bank records can rebuild a defensible basis. Reporting zero always costs the most.

Work through these in order, stopping when one produces a documented number.

  • Old brokerage statements. Most firms keep seven to ten years online. Confirmation slips beat year-end summaries, because they show the fee.
  • The transfer agent. For directly held shares, the agent has the full purchase and reinvestment history, often further back than any broker.
  • Company investor relations. Split ratios, spin-off allocations and merger terms are published there permanently.
  • Historical price data. Know the month but not the day? A documented month-average price beats a guess.
  • Bank and check records. The amount that left your account on a given date is strong evidence.

What you must not do is enter zero because it feels safe. Zero means the whole sale price is taxed as gain, which is nearly always wrong. A documented estimate is the accepted approach, and the same care applies when a wash sale shifted basis between lots.

Key takeaway: Reconstruct, document, and keep the workings with your tax file. A defensible estimate protects you far better than a blank field or a zero.

10. Inherited and gifted shares play by different rules

Quick Answer: Inherited shares get a new basis equal to market value on the date of death, so decades of gain can disappear. Gifted shares do the opposite: you take the giver’s original basis and their built-in gain.

Publication 551 sets out both rules. The gap between them is enormous.

How you got the shares Your basis Holding period
Inherited Market value on the date of death, or the alternate valuation date Always long-term
Gifted, worth more than the giver paid The giver’s adjusted basis, carried over to you Includes the giver’s time
Gifted, worth less than the giver paid Dual: the giver’s figure for a gain, market value for a loss Depends which basis applies

Put numbers on it. Shares bought for $8,000 and worth $60,000 at death pass to an heir with a $60,000 basis, so selling the next week costs almost nothing. Gifted during life, the same shares carry the $8,000 figure and a $52,000 gain in waiting.

Key takeaway: Timing decides the basis on family transfers. Highly appreciated shares are usually worth more to heirs than to recipients of a lifetime gift.

Planning a transfer or a large sale?

Basis rules and account type usually matter more than market timing here. See our retirement planning guides →


11. How to report cost basis on Form 8949

Quick Answer: Every sale goes on Form 8949, sorted by short-term or long-term and by whether basis was reported to the IRS. Corrections go in the adjustment columns, not over the reported figure. Totals flow to Schedule D.

How to report a stock sale with the right basis

Five steps take you from a stack of tax forms to a filed Schedule D.

  1. Collect every 1099-B. One per broker, including accounts you barely use and any closed mid-year.
  2. Split the sales four ways. Short-term with basis reported, short-term without, long-term with, long-term without. That decides which box you tick.
  3. Enter each sale. Description, both dates, proceeds in column (d), and your basis in column (e).
  4. Put corrections in columns (f) and (g). If the reported figure is wrong, leave column (e) as reported, enter code B or O, and show the adjustment.
  5. Carry the totals to Schedule D. The subtotals transfer across, net against each other, and produce the figure that reaches your return.

Keep the supporting documents at least three years after filing, longer for noncovered lots. If the IRS questions a figure years later, the confirmation slip is the whole argument.

Key takeaway: Never quietly overwrite a reported basis. Use the adjustment columns so the IRS can match your figure to the broker’s and see exactly why they differ.

12. Our verdict, by situation

Quick Answer: Most people need three things once: switch the default to specific identification, confirm reinvested dividends are counted, and separate the pre-2011 lots. After that the number takes care of itself.

If this is you Do this
Index investor, one taxable account Switch the default to specific identification before your first sale
Reinvesting dividends for years Check that the figure on your statement exceeds what you deposited
Holding shares bought before 2011 Rebuild those lots now, while statements and transfer agents can still help
Inheriting a taxable portfolio Get a written date-of-death valuation before anything is sold or moved

The bottom line: this is admin that pays better than most investing decisions. DollarVisor publishes the state-level math because the same mistake costs a Californian 62% more than a Texan, and our investing guides cover the accounts behind it.


13. Frequently Asked Questions

1. What happens if I don’t know my cost basis?

You still have to report a figure, so rebuild one from old statements, the transfer agent or historical prices, and keep your workings. Entering zero is legal but expensive, because the whole sale price then counts as gain. A documented estimate is the standard approach when records are gone.

2. Does cost basis reset when a stock splits?

No. A split changes the per-share figure, not the total. After a two-for-one split you own twice the shares at half the basis each. Using the pre-split number afterwards is a common reporting error.

3. Do I need to track cost basis in an IRA or 401(k)?

Generally no. Trades inside a traditional IRA, Roth IRA or 401(k) are not taxed as they happen, so the figure has no effect on your bill. Traditional withdrawals are taxed as income whatever you paid. The exception is after-tax contributions.

4. Can I change my cost basis method after I sell?

Not for a settled sale. The method locks in at trade time, which is why specific identification only works if you name the lot at or before settlement. You can change the default for future sales at any time.

Want the real number before you sell, not after?

DollarVisor shows the math on every investing decision, with state-level figures and no paid placements. Tell us what you are working through.

Get in touch →

Educational information, not tax or investment advice. Your outcome depends on your own facts, and state rules change. See our disclaimer.