Guides

Cost Basis Explained: How to Calculate It and Why It Matters

Cost basis is what you paid for an asset, adjusted over time, and it sets the taxable gain or loss when you sell. The formula is simple: sale price minus cost basis equals your capital gain (or loss). Get the basis wrong and you can overpay tax on a gain that was never yours, or understate one and draw an IRS notice. Under IRC Section 1012, basis generally starts at cost, including commissions and acquisition fees.

This guide covers original versus adjusted basis, the three methods for tracking basis across multiple purchases (FIFO, specific identification, and average cost), the step-up in basis at death under Section 1014, and the carryover rules for gifted property under Section 1015.

What is cost basis?

Cost basis is the total dollar amount invested in an asset for tax purposes, starting with the purchase price plus costs to acquire it, such as brokerage commissions, transfer fees, or closing costs on real estate. When you sell, you subtract basis from the sale proceeds to compute the taxable gain or loss reported on Form 8949 and Schedule D.

The starting rule under IRC Section 1012 is that basis equals cost. If you buy 100 shares at $40 and pay a $10 commission, your basis is $4,010, or $40.10 per share. That number, not the $40 quote, is what the IRS measures your gain against.

Basis is not the same as market value or the amount you paid out of pocket after margin. It is your after-tax investment in the property, tracked per lot or per asset.

Original basis vs adjusted basis

Original basis is the starting cost of an asset. Adjusted basis is that figure after events that raise or lower it over the holding period, and it is the number you actually use to compute gain or loss. Common upward adjustments include reinvested dividends and capital improvements; common downward adjustments include depreciation and returns of capital.

Original (cost) basis is fixed at acquisition. For a stock, it is price plus commission. For a rental building, it is the purchase price plus closing costs and capital improvements.

Adjusted basis changes over time. If you own a mutual fund and reinvest $1,200 of dividends, that $1,200 was already taxed as income, so it adds to your basis and prevents double taxation when you sell. On real estate, a $30,000 kitchen renovation raises basis, while depreciation claimed on a rental lowers it.

Examples of adjustments (see IRS Publication 551):

Cost basis methods compared

When you buy the same security in multiple lots at different prices, you choose which shares you are selling using a cost basis method. The three IRS-recognized methods are first in, first out (FIFO), specific identification, and average cost. The method changes your reported gain, so it changes your tax, even though your economic profit is identical.

FIFO assumes the oldest shares sell first. Specific identification lets you name the exact lot, which usually gives the most control over the tax result. Average cost pools all shares at one blended basis and is generally limited to mutual funds and certain dividend reinvestment plans.

Method How basis is assigned Typical tax effect Allowed for Best when
FIFO (first in, first out) Oldest lots sold first Often larger gain if early shares were cheap; the broker default for stocks Stocks, funds, most securities You want simplicity or shares are all similar cost
Specific identification You name the exact lot at sale Most control; sell high-basis lots to cut gains, or low-basis to harvest Stocks, funds, bonds, options You track lots and want to manage each year’s gain
Average cost Total cost divided by total shares (blended per-share basis) Middle-ground; simplifies recordkeeping Mutual funds and some DRIPs only You hold one fund bought over many dates

Specific identification is generally the most tax-efficient because you can sell the highest-basis lots first to minimize the reported gain, but it requires you to identify the shares with the broker at or before settlement and keep confirmation records. Once you elect average cost for a covered mutual fund position, changing methods can be restricted, so the choice matters.

Covered vs noncovered shares

Brokers must report basis to the IRS on Form 1099-B only for “covered” securities: stock acquired on or after January 1, 2011, mutual fund and dividend reinvestment shares acquired on or after January 1, 2012, and most bonds and options acquired on or after January 1, 2014. Basis for older “noncovered” shares appears on your statement but is not reported to the IRS, so the recordkeeping burden falls on you.

Step-up in basis at death

When you inherit property, its basis is generally reset to fair market value on the decedent’s date of death under IRC Section 1014. This “step-up” (or step-down, if the asset fell in value) can erase decades of unrealized gain, because the heir’s basis becomes the date-of-death value rather than what the original owner paid.

Suppose a parent bought stock for $20,000 that is worth $150,000 at death. The heir’s basis steps up to $150,000. If the heir sells at $155,000, the taxable gain is $5,000, not $135,000. The built-in appreciation during the parent’s life escapes income tax entirely.

Community property can receive a full step-up on both halves in community property states, while jointly held property in other states may step up only the decedent’s share. Because rules vary by state and by how title is held, confirm treatment before selling. For the mechanics and a worked example, see our guide to the Section 1014 step-up in basis.

Cost basis of gifted property

Gifted property generally takes a carryover basis under IRC Section 1015: the recipient keeps the donor’s adjusted basis, plus a portion of any gift tax the donor paid on the appreciation. Unlike inheritance, a lifetime gift does not get a step-up, so built-in gain transfers to the recipient.

If a donor’s basis is below fair market value at the gift date, the recipient simply carries over the donor’s basis for both gain and loss.

A special “dual basis” rule applies when the asset has lost value, meaning fair market value at the gift date is below the donor’s basis. In that case the recipient uses the donor’s basis to figure a gain and the lower gift-date value to figure a loss. If the later sale price lands between those two figures, there is neither a taxable gain nor a deductible loss.

Worked example of the dual basis rule: a donor’s basis is $10,000 and gift-date value is $7,000.

Why cost basis matters

Cost basis determines the size of your capital gain and therefore your tax bill. A higher accurate basis means a smaller taxable gain; a basis of zero (common when records are lost) means the entire sale price is taxed. Accurate basis tracking also drives holding-period decisions, tax-loss harvesting, and estate planning.

Long-term gains on assets held more than one year are taxed at 0%, 15%, or 20% depending on income, while short-term gains are taxed at ordinary rates. Basis sets the amount subject to whichever rate applies. For the broader data picture, see our Capital Gains Tax Report 2026.

Basis errors are a frequent source of overpayment. If you cannot document basis, the IRS may treat it as zero, taxing the full proceeds. Reinvested dividends already taxed as income are the most commonly missed upward adjustment. Report each sale on Form 8949, carrying totals to Schedule D. For digital assets, which follow their own lot-tracking and reporting path, see our crypto tax accounting guide.

Frequently asked questions

What is cost basis in simple terms?

Cost basis is what you paid for an asset for tax purposes, including the purchase price plus commissions or fees to acquire it. When you sell, you subtract basis from the sale price to find your taxable capital gain or loss. Under IRC Section 1012, basis generally starts at cost and is then adjusted over time for items like reinvested dividends, improvements, or depreciation.

How do I calculate adjusted cost basis?

Start with original cost (price plus acquisition fees), then add upward adjustments and subtract downward ones. Add reinvested dividends, capital improvements, and gift tax paid on appreciation. Subtract depreciation, returns of capital, and casualty losses. The result is your adjusted basis, the figure you subtract from sale proceeds. IRS Publication 551 lists the qualifying adjustments in detail.

Which cost basis method saves the most tax?

Specific identification usually saves the most because you can choose to sell your highest-basis lots first, which reports the smallest gain in a given year. It requires identifying the exact shares with your broker and keeping confirmations. FIFO, the default for stocks, often reports larger gains when early shares were the cheapest. Average cost applies mainly to mutual funds.

What happens to cost basis when I inherit stock?

Inherited stock generally receives a stepped-up basis to its fair market value on the decedent’s date of death under IRC Section 1014. That can eliminate income tax on gains that built up during the original owner’s lifetime. If the asset had dropped in value, the basis steps down instead. Community property and jointly titled assets may follow different rules by state.

What is the cost basis of a gift?

Gifted property generally takes a carryover basis under IRC Section 1015, meaning the recipient keeps the donor’s adjusted basis rather than getting a step-up. A dual basis rule applies when the gift-date value is below the donor’s basis: you use the donor’s basis to figure gain and the lower value to figure loss, and a sale between those amounts produces neither.

What is the difference between covered and noncovered shares?

Covered shares are those a broker must report cost basis for on Form 1099-B: stock bought on or after January 1, 2011, mutual funds on or after January 1, 2012, and most bonds and options on or after January 1, 2014. For noncovered shares bought earlier, the broker may show basis on your statement but does not report it to the IRS, so you carry the recordkeeping responsibility.

What if I do not know my cost basis?

If you cannot document basis, the IRS may treat it as zero, taxing the entire sale price. Reconstruct it from old brokerage statements, confirmations, dividend reinvestment records, or the broker’s historical data. For inherited assets, use the date-of-death value; for gifts, obtain the donor’s records. Reasonable, documented estimates are better than a zero basis.

Reviewed by The Ledgerism Editorial Team. Last reviewed: July 2026.

Related guides