Capital Gains Cost Basis: Adjustments, Step-Up, and Carryover Rules

Your capital gains cost basis is what you have invested in an asset for tax purposes, and it is the number you subtract from your sale proceeds to figure your taxable gain or loss. Start with what you paid, add the costs of acquiring the asset and any later capital investments, subtract depreciation and returned capital, and the result is your adjusted basis at the time of sale. The IRS uses Form 8949 to reconcile the basis you report against what your broker reported, so any mismatch can trigger questions or adjustments.1Internal Revenue Service. Instructions for Form 8949 Get the basis wrong and you can end up paying capital gains tax on money that was never actually a gain.

Starting Basis When You Buy the Asset

Your starting basis is what you paid, including any debt you took on such as a mortgage. Costs paid to acquire the asset and put it into service get added on top, which lowers your eventual taxable gain.

Stocks and Bonds

For stocks and bonds, basis is the purchase price plus commissions, recording fees, and transfer fees paid at purchase.2Internal Revenue Service. Topic No. 703, Basis of Assets Pay $5,000 for shares and $50 in commissions, and your basis is $5,050.

Real Estate

Real estate closings come with a stack of fees, and many of them go into basis. IRS Publication 551 lists the closing costs you can add: abstract and title search fees, legal fees, recording fees, surveys, transfer taxes, and owner’s title insurance.3Internal Revenue Service. Publication 551 – Basis of Assets You can also include any seller obligations you agreed to pay, such as back taxes or repair charges.

Financing costs are the main exception. Points paid to secure a lower interest rate are not added to your basis. They are treated as deductible interest instead, either in the year paid on a principal residence bought with cash-method accounting or spread over the life of the loan.4Internal Revenue Service. Topic No. 504, Home Mortgage Points

Business Property

For equipment, machinery, and other business assets, basis includes freight, installation, and any other expense needed to make the asset operational. Land improvements like grading or clearing get capitalized into the land’s basis, but land itself is never depreciated.

Adjustments That Raise Your Basis

Starting basis is not permanent. Certain later events push it up, and each increase means less taxable gain when you sell.

Capital improvements are the most common upward adjustment for real estate. An improvement adds value, extends the property’s useful life, or adapts it to a new purpose. Adding a deck, replacing the entire roof, or finishing a basement all qualify, and the full cost gets added to basis.5Internal Revenue Service. Publication 523, Selling Your Home Routine maintenance and minor repairs do not. Patching a few shingles is a repair; replacing the whole roof is an improvement. Repairs are deductible in the year paid, but they do nothing for basis.

Reinvested dividends and capital gains distributions in a mutual fund increase your basis in the fund shares, as long as you already paid tax on those distributions. Each reinvestment is treated as a new share purchase at the reinvestment price, and the cost of those additional shares becomes part of your total basis.

Pass-through income from S corporations and partnerships raises a shareholder’s or partner’s basis. When the entity earns income that flows through to your return, your ownership basis goes up by your share of that income, including separately stated items and tax-exempt income.6Internal Revenue Service. S Corporation Stock and Debt Basis The step-up prevents double taxation: you pay tax on the income when it flows through, and the higher basis keeps you from paying again when you sell your interest.

Adjustments That Lower Your Basis

Downward adjustments cut your basis, which increases your eventual taxable gain. They reflect tax benefits you have already received or capital that has already been returned to you.

Depreciation is the biggest downward adjustment for business and rental real estate. Federal law requires you to reduce basis by depreciation “allowed or allowable,” whichever is greater.7Office of the Law Revision Counsel. 26 USC 1016 – Adjustments to Basis In plain English: even if you never claimed depreciation deductions during the years you owned the property, your basis still gets reduced as though you had. Skipping depreciation does not preserve basis; it just costs you a deduction you were entitled to.

There is a sting on the back end too. When you sell depreciated real estate, the portion of your gain attributable to depreciation is taxed as “unrecaptured Section 1250 gain” at a maximum rate of 25%, higher than the standard long-term capital gains rate for most taxpayers.8eCFR. 26 CFR 1.453-12 – Allocation of Unrecaptured Section 1250 Gain Many rental property owners are caught by surprise at sale time.

Return-of-capital distributions on corporate stock reduce basis when the distribution exceeds the corporation’s earnings and profits. The distribution is not taxed when you receive it, but your basis drops dollar for dollar. If cumulative return-of-capital distributions exceed your entire basis, the excess becomes a taxable capital gain.7Office of the Law Revision Counsel. 26 USC 1016 – Adjustments to Basis

Stock Splits and Wash Sales

Two common events change your per-share basis without changing the economic substance of your investment.

Stock Splits

A stock split increases the number of shares you own but does not change your total basis. You spread the same total cost across more shares. Own 100 shares with a total basis of $1,500 and the company runs a 2-for-1 split, and you own 200 shares with a basis of $7.50 each.9Internal Revenue Service. Stocks (Options, Splits, Traders) 7 A reverse split works the same way in the other direction: fewer shares, higher per-share basis, same total.

Wash Sales

Sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, and the loss is disallowed for the current tax year. The disallowed loss is not lost. It gets added to the cost basis of the replacement shares, deferring the tax benefit rather than eliminating it.10Internal Revenue Service. Case Study 1 – Wash Sales If you sold shares at a $250 loss and bought replacement shares for $800, your new basis in the replacement shares is $1,050. The holding period of the original shares also tacks onto the replacement shares.

Inherited Assets and the Stepped-Up Basis

When you inherit property, your basis is not what the deceased person paid. It resets to the asset’s fair market value on the date of death.11Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent That “stepped-up basis” wipes out all appreciation during the decedent’s lifetime. A parent who bought stock for $10,000 decades ago that was worth $200,000 at death leaves you with a basis of $200,000. You would owe capital gains tax only on appreciation after you inherited it.

The executor can elect an alternate valuation date exactly six months after the date of death.12Office of the Law Revision Counsel. 26 USC 2032 – Alternate Valuation If chosen, fair market value on that later date becomes your basis. The election is only available if it reduces both the gross estate’s value and the estate tax owed, so it typically shows up when assets have fallen in value after the death.

Inherited assets are automatically treated as long-term regardless of how long you or the decedent held them. Any gain qualifies for the lower long-term capital gains rate even if you sell the day after inheriting.

Community Property Double Step-Up

Married couples in community property states (roughly nine states follow these rules) get an extra benefit. When one spouse dies, both halves of community property receive a stepped-up basis, not just the decedent’s half.11Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent In a common-law state, only the decedent’s half steps up while the survivor keeps their original basis in the other half.

Gifted Assets and the Carryover Basis

Gifts work differently. When you receive property as a gift, your basis is generally the same as the donor’s basis, carrying over unchanged.13Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust If your uncle paid $30,000 for stock and gifted it to you when it was worth $80,000, your basis is $30,000. The built-in gain transfers with the gift.

The Dual Basis Rule for Depreciated Gifts

A special rule kicks in when the gift’s fair market value at the time of the gift is lower than the donor’s basis. In that case, you carry two different basis figures and use one or the other depending on how you eventually sell.14Internal Revenue Service. Property (Basis, Sale of Home, Etc.)

  • Sell at a gain: use the donor’s higher carryover basis.
  • Sell at a loss: use the lower fair market value at the time of the gift.
  • Sell for a price between those two figures: no gain or loss is recognized.

The gap between the two figures exists to keep people from transferring depreciated assets to family members solely to generate a tax loss. Your holding period for gifted property includes the donor’s holding period, so long-term treatment is often available immediately.

Gift Tax Paid by the Donor

If the donor paid federal gift tax on the transfer, a portion of that tax can raise your basis. The increase is limited to the share of gift tax that corresponds to the net appreciation in the property at the time of the gift.15eCFR. 26 CFR 1.1015-5 – Increased Basis for Gift Tax Paid In practice, this only matters for very large gifts that exceed the annual exclusion and the donor’s remaining lifetime exemption.

Basis in a Section 1031 Like-Kind Exchange

A Section 1031 exchange lets you swap one piece of investment or business real property for another and defer capital gains tax. The trade-off is that your basis in the replacement property carries over from the property you gave up, reduced by any cash you received and increased by any gain you recognized on the exchange.16Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

Since 2018, like-kind exchange treatment is limited to real property. Personal property such as equipment, vehicles, and artwork no longer qualifies.17Internal Revenue Service. Instructions for Form 8824 The deferral is powerful, but it is not forgiveness. Each successive exchange carries a lower basis forward, building up a larger taxable gain that comes due whenever you finally sell without doing another exchange. Hold the property until death and the stepped-up basis under Section 1014 can wipe out that deferred gain entirely.

How the Home Sale Exclusion Interacts With Basis

Even after calculating your adjusted basis, you may not owe capital gains tax on your home. Federal law lets you exclude up to $250,000 in gain from the sale of your principal residence, or $500,000 if married filing jointly.18Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence To qualify, you must have owned and used the home as your primary residence for at least two of the five years before the sale, and you cannot have used the exclusion on another home sale within the prior two years.

Your basis still matters because the exclusion applies to the gain, not to the sale price. The calculation runs: sale price, minus selling expenses, minus adjusted basis, equals gain. The exclusion then shelters up to $250,000 or $500,000 of that gain.5Internal Revenue Service. Publication 523, Selling Your Home If the gain exceeds the exclusion, a higher basis directly reduces the taxable portion. Every capital improvement you tracked over the years pays off at this point.

Choosing Which Shares You Sold

When you own identical shares of the same stock or fund bought at different times and prices, you need a method to determine which shares you sold. The choice can make a real difference in your tax bill.

First-In, First-Out

FIFO is the default. If you do not specify otherwise, the IRS treats the oldest shares you own as the ones sold first.19Internal Revenue Service. Stocks (Options, Splits, Traders) 3 In a rising market, the oldest shares usually have the lowest basis, which produces the largest taxable gain. Simple, but rarely the most tax-efficient.

Specific Identification

Specific identification gives you control. You tell your broker exactly which lot of shares to sell, and you can pick the shares with the highest basis to minimize your current gain. The IRS requires that you identify the specific shares at the time of sale and receive written confirmation from your broker within a reasonable time.20Internal Revenue Service. Publication 550 – Investment Income and Expenses Most online brokerages now let you pick tax lots at the click of a button.

Average Cost for Mutual Funds

Mutual fund investors have a third option: average cost. Add up the total cost of all shares you own in a fund and divide by the number of shares to get a single average basis per share.21Internal Revenue Service. Mutual Funds (Costs, Distributions, Etc.) 1 It is simpler than tracking dozens of small reinvestment purchases over years of ownership. Average cost has to be elected; it does not apply automatically. The rules for revoking the election differ depending on whether your shares are covered or noncovered securities, so check with your broker before assuming you can switch methods freely.

Records You Need to Prove Your Basis

The burden of proving basis falls entirely on you. If the IRS questions your reported gain and you cannot produce records, you risk having your basis treated as zero, which makes the entire sale price taxable.

The IRS says to keep property records until the statute of limitations expires for the tax year in which you dispose of the property.22Internal Revenue Service. How Long Should I Keep Records? For property held many years, that means the entire holding period plus at least three years after you file the return reporting the sale. If you acquired property in a tax-deferred exchange, you need the records for both the old and new property until you finally sell the replacement.

What to keep depends on the asset type:

  • Real estate: the original closing statement, contractor invoices for every capital improvement, depreciation schedules if the property was rented or used for business, and records of any casualty losses or insurance reimbursements.
  • Stocks and mutual funds: brokerage statements showing purchase dates, prices, and commissions. Your broker reports basis on Form 1099-B for covered securities, but those records are not always complete for shares acquired before reporting rules took effect, reinvested dividends, or corporate actions like mergers and spinoffs.23Internal Revenue Service. About Form 1099-B, Proceeds From Broker and Barter Exchange Transactions
  • Inherited property: the estate’s date-of-death valuation, appraisal reports, or the estate tax return showing the fair market value used.
  • Gifted property: the donor’s original purchase records showing their basis, and any documentation of fair market value at the time of the gift.