Cost Basis Explained: How It Is Calculated, Reported and Adjusted
Cost basis decides how much of a sale is taxable gain, yet many investors never check the number their broker reports. This explainer covers how basis is calculated, the lot-selection methods, covered versus noncovered shares, and the adjustments for reinvested dividends, wash sales, gifts and inheritances.
When you sell an investment in a taxable account, you are not taxed on the sale price. You are taxed on the difference between the sale price and your cost basis. Get the basis wrong and you can overpay tax on gains you never made, or underpay and invite a letter from the IRS. It is one of the least glamorous numbers in investing and one of the most consequential.
This is an explainer, not a recommendation. Tax treatment depends on your circumstances, and the IRS publications linked below are the authoritative source.
What cost basis is
For a simple purchase, basis is what you paid for the investment plus certain costs of acquiring it, such as commissions. Buy 10 shares at $50 with a $5 fee, and your basis is $505. Sell later for $700 after a $5 fee, and your gain is $190.
Basis then moves over time. Some events raise it, some lower it, and some replace it entirely. The rest of this guide covers those changes, because that is where most errors happen.
Tax lots and why the method matters
If you buy the same stock or fund more than once, each purchase is a separate tax lot with its own date and price. When you sell only part of a position, the lot-selection method decides which shares you sold, and therefore both the size of the gain and whether it is short-term or long-term.
| Method | How it works | What it tends to do |
|---|---|---|
| First in, first out (FIFO) | Oldest shares are sold first | In a rising market, often realizes larger gains, but more likely long-term |
| Specific identification | You choose the exact lots at the time of sale | Most control over gains, losses and holding periods |
| Average cost | Basis is the average of all shares held | Available for mutual funds and certain dividend reinvestment plans; simple, less flexible |
| Highest cost or tax-efficient options | Broker selects lots by rule | Offered by many brokers as a form of specific identification |
FIFO is the default if you do nothing for most stocks. Many brokers default to average cost for mutual funds. You can usually change the default in your account settings, but for specific identification the choice must be made by the time the trade settles, not after the year ends. Changing from average cost to another method for a fund you already hold has its own rules, so check with your broker before switching.
Covered versus noncovered securities
Since the cost-basis reporting rules phased in, starting with stocks acquired in 2011 and extending to mutual funds, ETFs and later to bonds and options, brokers must track and report basis to the IRS for "covered" securities. Shares bought before those dates are "noncovered," and the broker may show the basis to you without reporting it to the IRS, or may not have it at all.
This matters in two ways:
- Covered lots: the basis on your Form 1099-B is also sent to the IRS. If it is wrong, you correct it on Form 8949 with an adjustment code rather than simply ignoring it.
- Noncovered lots: the responsibility for proving basis is yours. Old statements, transfer agent records and dividend reinvestment histories are the evidence.
Shares transferred between brokers should carry their basis with them for covered lots. It is worth checking after any transfer that the new broker shows the correct purchase dates and amounts.
How sales are reported
Your broker sends Form 1099-B after year-end, listing each sale, the proceeds, the basis where known, and whether the gain is short-term or long-term. You then report sales on Form 8949, which feeds the totals into Schedule D of your return. Sales of covered securities with correct basis can often be summarized; anything needing an adjustment is listed individually.
Short-term gains, on assets held one year or less, are taxed at ordinary income rates. Long-term gains on assets held more than one year get lower rates. The IRS publishes the current rate thresholds each year at irs.gov. For more on how those rates work, see our guide to capital gains tax.
Events that raise basis
- Reinvested dividends and capital gain distributions. Each reinvestment buys new shares at a new basis. Leaving them out is the most common way investors overpay.
- Additional purchase costs. Commissions and certain fees paid to buy are added to basis.
- Wash-sale adjustments. If you sell at a loss and buy substantially identical shares within 30 days before or after the sale, the loss is disallowed for now and added to the basis of the replacement shares. The loss is deferred, not lost. Our explainer on tax-loss harvesting and the wash-sale rule walks through examples.
Events that lower basis
- Return of capital distributions. Some funds and companies pay distributions that are a return of your own money rather than income. These reduce basis, and once basis reaches zero, further distributions are generally taxed as gains.
- Certain corporate actions. Spinoffs split your original basis between the parent and the new company, according to an allocation the company typically publishes.
Stock splits do not change your total basis; they spread it across more shares, lowering basis per share.
Inherited and gifted investments
The rules for shares you did not buy yourself are very different.
Inherited shares generally receive a new basis equal to their fair market value on the date of the owner's death, often called a step-up in basis. Gains that built up during the original owner's life are generally not taxed to the heir. Inherited property is also generally treated as held long-term, regardless of how long you own it.
Gifted shares generally keep the giver's original basis, known as carryover basis, and the giver's holding period. There is a twist when the shares have fallen in value: if the market value at the time of the gift was below the giver's basis, a different basis may apply for calculating a loss. Ask the giver for their purchase records when you receive the gift, because reconstructing them years later is harder.
Keeping clean records
A few habits prevent most cost-basis headaches:
- Download annual statements and trade confirmations, and keep them for as long as you own the investment plus several years after you sell.
- Check that reinvested dividends are reflected in basis, especially for older holdings.
- Review your account's default lot-selection method once and decide whether it suits you.
- After any broker transfer, compare lot details with your old statements.
- Before filing, compare your 1099-B with your own records and note anything missing or marked noncovered.
The practical takeaway
Cost basis is the starting point for every capital gain or loss you report. The broker's number is a good start, but it is not automatically right, particularly for old shares, gifts, inheritances and positions moved between firms. A short review before tax season, or a conversation with a tax professional for complex situations, can keep you from paying tax on money that was never a gain.
Frequently asked questions
What happens if I can't find the cost basis for old shares?
Start with old brokerage statements, trade confirmations, the company's transfer agent or historical price data for the purchase date. The IRS expects you to be able to support the basis you report, and if you cannot, it may treat the basis as zero, making the whole sale taxable. Reconstructing it from reasonable records is far better than leaving it blank.
Do reinvested dividends count toward cost basis?
Yes. Each reinvested dividend buys new shares, and the amount reinvested becomes the basis of those shares. Because you were already taxed on the dividend in a taxable account, forgetting to include it means paying tax on the same money twice when you sell.
Does cost basis matter in a 401(k) or IRA?
Generally not for day-to-day trades, because gains inside those accounts are not taxed when you sell. Basis can still matter for nondeductible contributions to a traditional IRA, which are tracked separately on Form 8606 so they are not taxed again when withdrawn.