GLOSSARY DEEP DIVE

Cost Basis: The Number That Decides Your Tax Bill When You Sell

Every sale of stock, a mutual fund, or a bond triggers a tax calculation that depends entirely on one number you are personally responsible for tracking accurately over the life of the investment: what you actually paid. Get cost basis wrong, and you either hand the IRS more than you legally owe or invite a mismatch that draws unwanted attention on an otherwise routine filing, and the mistake is far more common than most investors would assume.

Deep dive9 min readUpdated 2026

The core principle

Cost basis is the value assigned to an investment for tax purposes, generally what you paid for it, including any commissions, plus any dividends or capital gains distributions you reinvested along the way. When you sell, the formula is exactly capital gain = sale proceeds − cost basis. Only that difference, and never the full sale amount, is subject to capital gains tax in a taxable brokerage account.

The detail investors miss most often is that reinvested dividends increase your basis. A dividend paid in cash and immediately used to buy more shares of the same fund is already taxed as ordinary income or qualified dividend income in the year you received it. That reinvested amount then becomes part of your basis, because you effectively used already-taxed money to buy more of the investment. Fail to add it, and you will pay capital gains tax on that same dollar a second time when you eventually sell.

Key idea Basis is not a static number set once at purchase. It moves every time you reinvest a distribution, receive a stock split, or make certain corporate action adjustments, which is exactly why relying on memory instead of records leads to overpaid tax.

Corporate actions add another layer of complexity worth understanding before you ever need it. A 2-for-1 stock split doubles your share count and halves your per-share basis, leaving your total basis unchanged; a spin-off, where a company distributes shares of a subsidiary to existing shareholders, requires allocating a portion of your original basis to the new spin-off shares based on their relative value at the time of the transaction, a calculation your broker's automated cost basis reporting does not always handle correctly on its own, especially for less common or foreign corporate actions. None of these adjustments change how much tax you ultimately owe across the life of the investment, but getting them wrong can shift a taxable gain into the wrong year or attach it to the wrong holding entirely, which matters enormously if the error also changes whether a gain qualifies for favorable long-term treatment.

How the math works

Example 1: the cost of forgetting reinvested dividends. You buy 100 shares at $40 each, a $4,000 basis. Over three years, the fund pays $600 in dividends, all automatically reinvested into more shares. That $600 was already taxed as income in the years you received it, and it adds directly to your basis, bringing it to $4,000 + $600 = $4,600. Three years later, you then sell the entire position for $7,000. The correct taxable gain is $7,000 − $4,600 = $2,400. An investor who forgot to add the reinvested dividends would instead calculate a gain of $7,000 − $4,000 = $3,000, overstating the gain by $600 and, at a 15% long-term capital gains rate, paying an unnecessary extra $600 × 0.15 = $90 in tax on money that was already taxed once as dividend income.

Example 2: choosing which shares to sell. You bought the same stock in three separate lots: Lot A, 100 shares at $30 ($3,000 basis); Lot B, 100 shares at $60 ($6,000 basis); Lot C, 100 shares at $90 ($9,000 basis). The stock now trades at $100, and you want to sell exactly 100 shares for $10,000. Under the default FIFO (first in, first out) method, your broker sells Lot A first: taxable gain is $10,000 − $3,000 = $7,000, taxed at 15% for a bill of $1,050. If instead you use specific identification and choose to sell Lot C, the highest-basis lot: taxable gain is only $10,000 − $9,000 = $1,000, taxed at 15% for a bill of just $150. The identical sale, at the identical price, costs $900 less in tax purely because of which lot you chose to sell.

Key idea The default lot method your broker uses is not necessarily the one that minimizes your tax bill. Specific identification takes one extra click at the time of sale and, as the example above shows, can be worth hundreds or thousands of dollars depending on how spread out your purchase prices are.

How it shows up in real portfolios

Since 2011, brokers have generally been required to report cost basis to the IRS for shares purchased after that date, known as covered securities, which has reduced but not eliminated the record-keeping burden. Shares purchased before that rule took effect, or transferred in from another broker without complete records, can still show up as basis unknown, leaving you responsible for reconstructing the purchase history yourself, sometimes years after the fact, from old statements, trade confirmations, or year-end tax summaries buried in a filing cabinet or an old email account.

A high-earning professional actively managing a taxable brokerage account alongside tax-advantaged retirement accounts often relies on specific identification and disciplined basis tracking to run tax-loss harvesting and to control which capital gains realize in a given year, particularly useful in years with unusually high income, a large bonus or a significant equity vesting event, where an unplanned large capital gain could push them into a higher marginal bracket or trigger the additional net investment income tax on top of it. A separate, distinct situation involves inherited assets, which generally receive a step-up in basis to the fair market value on the date of death, erasing any embedded gain the original owner had accumulated, in sharp contrast to gifted assets, which typically carry over the original giver's basis rather than resetting it.

That contrast has real planning consequences. An elderly parent holding a stock with a large embedded gain is often better off leaving the stock to a child at death, so the child receives a stepped-up basis and can sell immediately with little or no capital gains tax, than gifting the same stock during their lifetime, which passes along the parent's original, often much lower basis and the full embedded tax liability along with it. A family that understands this distinction, and plans around it deliberately rather than by accident, can in some cases save the recipient a genuinely substantial tax bill purely by choosing the timing and method of transfer rather than changing the amount transferred at all.

Actionable breakdown

  • Track every reinvested dividend and distribution
    • Each one adds to your basis over time
    • Missing this causes double taxation on sale
  • Choose specific identification over default FIFO
    • Select the lot that minimizes your tax bill
    • Do this before, not after, placing the sale order
  • Keep your own records for pre-2011 or transferred shares
    • Broker-reported basis may be missing or wrong
    • Old statements are the backup source of truth
  • Adjust basis correctly for splits and spin-offs
    • Splits change per-share basis, not total basis
    • Spin-offs require allocating basis between two holdings
  • Know the difference between inherited and gifted basis
    • Inherited assets generally step up to date-of-death value
    • Gifted assets typically carry over the giver's basis

Common pitfalls

  • Forgetting that reinvested dividends were added to basis, and paying capital gains tax on the same dollar of income twice.
  • Accepting a broker's default lot method without checking whether specific identification would meaningfully lower the tax bill on a given sale.
  • Losing track of basis on old certificates or accounts transferred between brokers, where historical purchase records can go missing entirely.
  • Assuming inherited and gifted assets are taxed the same way, when the basis rules for each are fundamentally different.
  • Not adjusting basis for stock splits or spin-offs, which can misstate your gain and, in rarer cases, your holding period on the resulting shares.

See step up in basis for the specific rule governing inherited assets, and average cost basis for the alternative method most commonly used automatically with mutual funds. Related reading includes wash sale, which limits how basis and losses interact, and our tax efficiency guide and stock analysis guide, both of which walk through basis tracking in the context of an actual, full portfolio.

The bottom line

Your cost basis is the anchor for every capital gains calculation you will ever make, so track it carefully, adjust it correctly for corporate actions, and choose your lots deliberately rather than accepting whatever your broker defaults to.

Back to the full glossary