What is cost basis?
Last updated August 2026
Short answer
Cost basis is the least interesting number in investing and one of the easiest to overpay tax on. It is worth ten minutes of understanding, particularly before a large sale.
What goes into it
The purchase price, plus commissions and transaction fees. If you bought 100 shares at $50 with a $5 commission, your basis is $5,005.
Reinvested dividends add to it. Every reinvested dividend was taxed as income in the year received and then bought more shares, so those purchases are part of what you paid. A position held for twenty years with dividends reinvested can have a basis far above the original purchase.
Return of capital distributions reduce it. Some funds, and many REITs and MLPs, distribute money classified as a return of your own capital rather than income. It is not taxed when received, and instead lowers your basis, which increases the eventual gain.
Choosing which shares you sell
If you bought the same holding at several prices, selling part of the position means choosing which lots go. That choice changes your tax bill.
FIFO, first in first out, is the default at most brokers and sells your oldest shares first. In a long-held rising position those are usually the lowest-basis shares, producing the largest gain.
Specific identification lets you nominate the exact lots. Selling high-basis shares realises a smaller gain; selling low-basis shares realises a larger one, which is occasionally what you want in a low-income year.
Average cost is available for mutual funds and once elected is generally binding for that holding.
The election has to be made at or before the sale, not afterwards on your return, so the default matters. Checking what your broker uses is worth doing before you need it.
Where the number goes wrong
Brokers have been required to report basis to the IRS on most holdings acquired after 2011, and for those the figure on your 1099-B is usually reliable.
The gaps are older holdings, shares transferred in from another broker, shares from an employer plan, inherited shares, and gifts. In those cases the broker may report the basis as unknown, leaving you to establish it from your own records.
Inherited shares generally receive a stepped-up basis to the value at the date of death, which frequently wipes out decades of unrealised gain. Reporting the original purchase price instead is an expensive and common error.
Gifted shares usually carry the giver's original basis, with a separate rule if the shares had fallen in value.
Try it in Walnut
Walnut reads your connected brokerage positions so you can see what you hold and what it is worth before you decide which lots to sell.
Why this compounds
A basis understated by $10,000 means a gain overstated by $10,000, which at the 15% rate is $1,500 of tax you did not owe. Nobody sends a correction.
The record keeping is unglamorous and cheap: keep purchase confirmations, note transfers, and check the basis shown on a position before selling it rather than after.
Covered and non-covered shares
The 1099-B splits your sales into covered and non-covered lots, and the distinction decides who is responsible for the number.
Covered shares were acquired after the reporting rules took effect, generally 2011 for stocks, 2012 for mutual funds and ETFs, and 2014 for certain bonds and options. Your broker reports the basis to the IRS and it is usually right.
Non-covered shares predate those dates or were transferred in without basis information. The broker may show nothing, and the burden of establishing the figure falls entirely on you. Old confirmations, statements or even the company transfer agent are where that evidence comes from.
Corporate actions change the number
A stock split does not change your total basis, it spreads it across more shares. Two hundred shares at $25 after a 2-for-1 split carry the same $5,000 total as 100 shares at $50 did.
A spin-off divides your original basis between the parent and the new company, usually by relative market value, and the company publishes the ratio. A merger paid in stock generally carries basis across; one paid in cash is a sale.
Brokers usually handle these automatically, but they are a frequent source of error on transferred positions, and they are worth checking on any holding that has been through one.
Sources
Dividend classification, the wash sale rule, cost basis and 1099 reporting are covered in IRS Publication 550. Walnut is informational and is not an investment adviser. This guide is educational and not personalized tax or investment advice; anything with a tax consequence is worth confirming with a tax professional.
FAQ
What is cost basis?
+
What you paid for an investment, including commissions and reinvested dividends. Your taxable gain when you sell is the sale price minus the cost basis, so an accurate basis directly reduces the tax you owe.
Do reinvested dividends increase my cost basis?
+
Yes. Each reinvested dividend was already taxed as income and then used to buy more shares, so it counts as money you paid. Failing to include reinvested dividends means paying tax twice on the same money, once as income and again as capital gain.