What Is Cost Basis in Stocks and How Is It Taxed?

Cost basis in stocks is the amount you have invested in a share for tax purposes: what you paid to acquire it, plus certain costs, adjusted for events that happen while you hold it. When you sell, you subtract that adjusted basis from the sale proceeds to find your capital gain or loss.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Get the number right and you pay tax on the real profit; get it wrong and you either overpay the IRS or underreport income. Because holding periods can swing the rate from 0% to 37%, every dollar of basis matters.

What Your Starting Basis Includes

Your initial basis is the price you paid for the shares plus any costs directly tied to the purchase, such as brokerage commissions, transfer fees, and regulatory charges.2Internal Revenue Service. Publication 551 (12/2025), Basis of Assets Most online brokerages now charge zero commissions on stock trades, but per-trade fees and small regulatory costs still apply at some firms and on sales.

An example: you buy 100 shares at $50 each and pay a $5 commission. Your basis is $5,005, not $5,000.2Internal Revenue Service. Publication 551 (12/2025), Basis of Assets That extra $5 reduces your taxable gain when you eventually sell. Investors who bought stock before zero-commission trading may have hundreds of dollars in accumulated fees folded into their basis.

Restricted Stock Units

If you receive stock through your employer as restricted stock units, there is no purchase price. Your basis equals the fair market value on the vesting date, because that amount was already included in your taxable income.2Internal Revenue Service. Publication 551 (12/2025), Basis of Assets If 500 shares vest when the stock trades at $60, your basis is $30,000. Any gain or loss when you later sell is measured from that $60-per-share mark. If the price drops and you sell at $45, you have a real, deductible $15-per-share capital loss, even though nothing came out of your pocket.

Adjustments That Change Your Basis Over Time

Your per-share basis rarely stays frozen at the original purchase price. Corporate actions and reinvestment decisions shift the numbers.

Stock Splits and Reverse Splits

In a stock split, a company issues additional shares without changing the total value of your position. Your overall basis stays the same, but the per-share basis drops proportionally.3Internal Revenue Service. Stocks (Options, Splits, Traders) – Section: How Do I Figure the Cost Basis of Stock That Split If you owned 100 shares with a $15 per-share basis and the company declares a 2-for-1 split, you now own 200 shares at $7.50 each. No taxable event happens at the time of the split. A reverse split works the other way: a 1-for-5 reverse split turns 500 shares into 100, and the per-share basis rises fivefold.

Reinvested Dividends

When you enroll in a dividend reinvestment plan, each dividend payment buys additional shares at the current market price. Every one of those purchases creates a new tax lot with its own basis. Over years, this can produce dozens of small lots at different prices. The reinvested dividends raise your total basis, which matters because those dividends were already taxed as income in the year received. Leaving them out of your basis means being taxed twice on the same money.

Return-of-Capital Distributions

Some stocks, particularly real estate investment trusts and certain funds, pay distributions classified as a return of capital rather than a dividend. These are not taxed when you receive them. Instead, they reduce your cost basis dollar for dollar.4Internal Revenue Service. Mutual Funds (Costs, Distributions, Etc.) If you bought shares with a $40 basis and received $5 in return-of-capital distributions over the years, your adjusted basis drops to $35. Once basis reaches zero, further distributions are taxed as capital gains. Your broker reports these amounts on Form 1099-DIV in box 3.

Spin-Offs and Mergers

When a company spins off a division into a separate publicly traded entity, you allocate a portion of your original basis to the new shares. The parent company typically announces the allocation percentages. If the parent assigns 85% of the pre-spin value to itself and 15% to the new company, you split your basis accordingly.

Mergers add their own complexity. In a tax-free reorganization where you exchange old shares for new ones, your basis in the old shares generally carries over to the replacement stock. If you receive a mix of stock and cash, the cash portion may trigger a taxable gain, and your basis in the new shares is adjusted to account for the gain recognized and the cash received.

Inherited and Gifted Shares

Inherited Stock

Inherited stock gets a stepped-up basis equal to the fair market value on the date of the original owner’s death.5Office of the Law Revision Counsel. 26 USC 1014 Basis of Property Acquired From a Decedent If your parent bought stock at $10 per share decades ago and it was worth $150 on the date of death, your basis is $150. All the accumulated gain effectively disappears for income tax purposes.

Inherited property is also automatically treated as held long-term for capital gains purposes, regardless of how briefly the heir or the decedent actually held it. Even if you sell the week after receiving the shares, any gain qualifies for the lower long-term rate.

Gifted Stock

Gifted shares follow a different rule. The recipient generally takes the donor’s original basis, known as carryover basis.6Office of the Law Revision Counsel. 26 USC 1015 Basis of Property Acquired by Gifts and Transfers in Trust If your uncle paid $20 per share and gifts the stock to you, your basis is $20. The built-in gain doesn’t vanish the way it does with inherited stock.

An exception applies when the fair market value at the time of the gift is lower than the donor’s basis. For figuring a gain, you use the donor’s basis. For figuring a loss, you use the fair market value at the time of the gift. If you sell at a price between those two numbers, you have no gain and no loss.6Office of the Law Revision Counsel. 26 USC 1015 Basis of Property Acquired by Gifts and Transfers in Trust When carryover basis applies, the donor’s holding period tacks onto yours, so stock the donor held for years already qualifies as long-term in your hands.

Choosing Which Shares to Sell

If you’ve bought the same stock at different times and prices, you have multiple tax lots. When you sell only some of your shares, the lot you choose determines your basis and therefore your taxable gain or loss. The IRS recognizes three identification methods.

  • First-in, first-out (FIFO) is the default. Your broker assumes the oldest shares are sold first unless you say otherwise. In a rising market, FIFO usually produces the largest taxable gain because your oldest shares typically have the lowest basis.7Internal Revenue Service. Publication 550, Investment Income and Expenses
  • Specific identification lets you tell your broker exactly which lot to sell, by purchase date and price, before the trade settles. That gives you the most control: sell your highest-cost shares to shrink a gain, or your lowest-cost shares to realize a larger loss.7Internal Revenue Service. Publication 550, Investment Income and Expenses
  • Average cost is available for mutual fund shares and shares acquired through a dividend reinvestment plan. You add up the total cost of all identical shares and divide by the number of shares to get a single average basis. This simplifies record-keeping when you have hundreds of small reinvestment purchases.8Internal Revenue Service. Mutual Funds (Costs, Distributions, Etc.) 1

Selling your “most recently purchased” shares first isn’t a separate IRS method. It’s specific identification where you happen to pick the newest lot, and you still have to instruct your broker before settlement.

The Wash Sale Rule

Selling stock at a loss and buying the same or a substantially identical security within 30 days before or after the sale triggers the wash sale rule.9Internal Revenue Service. Case Study 1: Wash Sales The IRS disallows the loss deduction. The disallowed loss isn’t gone; it’s added to the basis of the replacement shares.

You sell 100 shares for $750 and realize a $250 loss. Within 30 days you buy 100 shares of the same stock for $800. The $250 loss is disallowed, but your basis in the new shares becomes $1,050: $800 purchase price plus the $250 disallowed loss.9Internal Revenue Service. Case Study 1: Wash Sales You recover that loss when you eventually sell the replacement shares, assuming you don’t trigger another wash sale.

Your broker should report the disallowed amount on Form 1099-B, but check it. If the broker’s figure is wrong, report the correct amount on Form 8949 and attach a statement explaining the difference.10Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets

How Holding Period Affects Your Tax Rate

How long you hold a stock before selling determines whether the gain is taxed at ordinary income rates or at the lower long-term capital gains rates. Stock held for more than one year qualifies for long-term treatment. Stock held for one year or less produces a short-term gain, taxed at your ordinary income rate, which can be as high as 37%.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses

Long-term capital gains rates for the 2025 tax year (the return most people file in 2026) are:

  • 0% on taxable income up to $48,350 for single filers, or $96,700 for married couples filing jointly.
  • 15% on taxable income from $48,351 to $533,400 (single) or $96,701 to $600,050 (married filing jointly).
  • 20% on taxable income above those thresholds.

These brackets adjust annually for inflation, so the 2026 tax year thresholds will be slightly higher.

High earners face an additional 3.8% net investment income tax on capital gains when modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly.11Internal Revenue Service. Net Investment Income Tax That surtax stacks on top of the regular capital gains rate, bringing the effective top rate to 23.8%.

Selling a stock at a $10,000 gain after 11 months could cost you $3,700 in federal tax at the 37% bracket. Wait two more months and sell the same stock as a long-term gain, and the tax might drop to $1,500, or to $0 depending on your income. Knowing the basis and holding period for each lot lets you run that calculation before you click “sell.”

Calculating and Reporting the Sale

The math is simple: subtract your adjusted basis from the sale proceeds. Sell for $10,000 with an adjusted basis of $7,500, and you have a $2,500 capital gain.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses If basis exceeds proceeds, you have a capital loss.

You report each sale on Form 8949 and summarize the results on Schedule D of your Form 1040.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Capital losses offset capital gains dollar for dollar. If losses exceed gains, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately).12Office of the Law Revision Counsel. 26 USC 1211 Limitation on Capital Losses Any remaining loss carries forward to future tax years, where it continues to offset gains and up to $3,000 of ordinary income annually until it’s used up.

What Your Broker Tracks and What You Track

Since January 1, 2011, brokers have been required to track and report cost basis to the IRS for most stock purchases. Shares bought on or after that date are called covered securities.13Internal Revenue Service. 2026 Instructions for Form 1099-B – Proceeds From Broker and Barter Exchange Transactions For these shares, your broker reports the acquisition date, sale proceeds, adjusted basis, and whether the gain or loss is short- or long-term on Form 1099-B. The numbers you report on your return need to match.

Shares purchased before 2011, called noncovered securities, are different. Your broker may provide cost basis information for your convenience but is not required to report it to the IRS.13Internal Revenue Service. 2026 Instructions for Form 1099-B – Proceeds From Broker and Barter Exchange Transactions You’re responsible for tracking and reporting the correct basis. If you’ve held stock since before 2011 and don’t have your original purchase confirmations, reconstruct the record now. Your broker may have historical data even if they don’t send it to the IRS, so ask.

Penalties for Inaccurate Basis Reporting

Misstating your cost basis creates an understatement of tax, which can trigger an accuracy-related penalty of 20% of the underpayment.14Office of the Law Revision Counsel. 26 USC 6662A Imposition of Accuracy-Related Penalty on Understatements With Respect to Reportable Transactions The penalty is on top of the additional tax owed plus interest. In cases involving reportable transactions where disclosure requirements aren’t met, the rate rises to 30%.

The most common basis mistake isn’t fraud. It’s forgetting to include reinvested dividends or ignoring return-of-capital adjustments, which inflates the reported gain. Keep records of every dividend reinvestment, corporate action notice, and 1099-DIV. That’s the difference between a clean return and an IRS notice arriving years later.