Calculating Basis and Capital Gain on Property Sales and Exchanges

How do you calculate basis and capital gain on a property sale or exchange?

Calculating basis and capital gain on a property sale or exchange means determining the property’s adjusted basis (purchase price plus allowable increases, minus allowable decreases such as depreciation) and subtracting it from the sale proceeds. The result is the capital gain or loss, which determines tax treatment, reporting, and potential exclusions or deferral options.

Overview

When you sell or exchange real estate, the taxable amount usually depends on two numbers: the property’s adjusted basis and the sales proceeds. Basis establishes what portion of the sale is return of investment (non‑taxable) and what portion is gain (taxable). Getting the basis right is often the single most important step in minimizing capital gains tax and avoiding IRS adjustments (see IRS Topic No. 703 and Publication 551).

Author note: In my 15+ years advising clients on property transactions, the biggest practical win comes from early and disciplined recordkeeping—receipts for improvements, closing statements, and depreciation schedules save taxes and reduce audit risk.

Sources: IRS, “Capital Gains and Losses” and “Topic No. 703—Basis of Assets” (irs.gov); “Like-Kind Exchanges” guidance for 1031 rules (irs.gov). See the IRS pages for the latest forms and examples.


Step-by-step: How to calculate adjusted basis

  1. Start with the original basis
  • For purchases: original basis = purchase price + certain acquisition costs (e.g., non-deductible closing costs, title fees). Routine mortgage fees that are deductible at the time of purchase are not added to basis — consult the settlement statement.
  • For gifted property: basis generally equals donor’s adjusted basis (carryover basis), with some exceptions. Special rules apply for gifts with a fair market value (FMV) lower than donor basis.
  • For inherited property: basis is typically stepped up (or down) to the FMV at the decedent’s date of death or alternate valuation date (see IRS guidance on inherited property and “Step-Up in Basis”).
  1. Add increases to basis
  • Capital improvements that add value, prolong useful life, or adapt the property to new uses increase basis (examples: room additions, new roof, major HVAC replacement). Routine repairs and maintenance do not increase basis.
  • Fees and costs that are capitalized (some closing costs, legal fees for acquisition) can be added.
  1. Subtract allowable decreases
  • Depreciation taken for rental or business use reduces basis. When you sell, depreciation recapture rules may tax part of the gain as ordinary income (see Depreciation Recapture discussion below).
  • Casualty losses previously deducted and certain credits can reduce basis.
  1. The adjusted basis formula (simple)
  • Adjusted basis = Original basis + Capital improvements + Certain acquisition costs – Accumulated depreciation – Other basis reductions

Example:

  • Purchase price: $250,000
  • Closing costs added to basis: $3,000
  • Qualified improvements over ownership: $50,000
  • Accumulated depreciation (rental use): $20,000

Adjusted basis = $250,000 + $3,000 + $50,000 – $20,000 = $283,000


Calculate capital gain or loss

Capital gain (or loss) = Amount realized – Adjusted basis

  • Amount realized = selling price minus selling expenses (agent commissions, certain closing costs). If you exchange property in a 1031-like exchange, the amount realized and recognized gain rules differ (see below).

Example (continued):

  • Sale price: $400,000
  • Sales costs (agent commission, closing): $24,000
  • Amount realized = $400,000 – $24,000 = $376,000
  • Adjusted basis (from example) = $283,000
  • Capital gain = $376,000 – $283,000 = $93,000

The recognized gain for tax reporting may differ from the theoretical gain when special provisions apply (home sale exclusion, 1031 exchanges, casualty loss carryovers).


Special situations and tax outcomes

  1. Primary residence exclusion
  • If you meet the ownership and use test (owned and used the home as your principal residence for at least 2 of the last 5 years), you may exclude up to $250,000 of gain ($500,000 for married filing jointly). Partial exclusions are available in certain involuntary conversions or qualifying moves. See IRS Publication 523 for details.
  1. Inherited property (step‑up in basis)
  • Most inherited property receives a stepped-up (or down) basis to the FMV on the date of death (or alternate valuation date), which often eliminates taxable gain on appreciation that occurred before the decedent’s death. Exceptions exist for community property and certain estate planning constructs — see IRS Topic No. 703 and finhelp.io’s “Basis of Inherited Property Explained” for context.
  1. Gifts (carryover basis)
  • Generally, a donee inherits the donor’s basis. If the donor’s basis exceeds FMV at the gift date and the donee later sells at a loss, complex rules determine deductible loss vs gain recognition. Good recordkeeping of donor basis and gift date FMV is essential.
  1. 1031 like‑kind exchanges
  • For qualifying business or investment real estate, a Section 1031 exchange can defer gain if proceeds are reinvested in “like‑kind” property and timing/identification rules are met. You won’t recognize gain when the exchange qualifies, but your basis in the replacement property is adjusted (carryover basis). Working with a qualified intermediary and reading IRS 1031 guidance is necessary. See our detailed pages on “1031 Exchange” and related nuances.
  • Internal link examples: “1031 Exchange” (https://finhelp.io/glossary/1031-exchange/) and “Qualified Intermediary in a 1031 Exchange” (https://finhelp.io/glossary/qualified-intermediary-in-a-1031-exchange/).
  1. Depreciation recapture (rental/business property)
  • Depreciation claimed during ownership reduces basis and can trigger depreciation recapture at sale. For real property, the unrecaptured Section 1250 gain is taxed at a maximum rate of 25% for individuals; some portion may be ordinary income depending on facts and prior depreciation methods. See finhelp.io’s “Depreciation Recapture” article and IRS Publication 544 for mechanics.
  • Internal link: “Depreciation Recapture” (https://finhelp.io/glossary/depreciation-recapture/).
  1. Exchanges with boot
  • If you receive non‑like property or cash (“boot”) in a 1031 exchange, that portion becomes recognized gain in the year of the exchange.

Reporting the sale to the IRS

  • Sale of capital assets: report on Form 8949 and Schedule D (Form 1040) unless an exception applies.
  • Business property dispositions: use Form 4797 for gains subject to ordinary treatment (e.g., certain recaptured depreciation treated as ordinary income may be reported here).
  • Home sale exclusion: report even if exclusion applies if you received Form 1099-S or meet certain conditions; review Publication 523 for exceptions.

Always match figures to your closing statements and Form 1099-S (if issued). Keep documented calculations should the IRS request substantiation.


Practical recordkeeping checklist (what to save)

  • Purchase closing statement (settlement statement / HUD-1 / Closing Disclosure)
  • Receipts and invoices for capital improvements (with dates and descriptions)
  • Depreciation schedules (for rental/business use)
  • Settlement statement for the sale and any Form 1099-S
  • Records of casualty or theft loss claims and insurance proceeds
  • Gift documentation (gift tax returns if filed) and valuations for inherited property

Good records are your best defense against errors and audits.


Common mistakes and audit triggers

  • Treating repairs as improvements. Repairs are deductible when incurred (for rental property) or not added to basis for personal residences; only capital improvements increase basis.
  • Losing track of basis for properties held many years or passed through estates—without documentation you may forfeit legitimate basis adjustments.
  • Forgetting depreciation taken on a rental when computing basis—this often leads to underpaying taxes and large recapture when caught.
  • Misapplying the home sale exclusion when the property was used partly for business or rental.

Tax planning tips I use with clients

  1. Track improvements in real time. A small folder or digital folder with photos, invoices, and dates pays off.
  2. Consider timing sales to qualify for long‑term capital gains rates (hold > 1 year) or to use the primary residence exclusion.
  3. For investors, evaluate whether a 1031 exchange makes sense versus paying tax and reallocating — work with a qualified intermediary early.
  4. If you depreciated property, plan for recapture — sometimes partial sales or installment sales spread the tax impact.
  5. Consult your CPA before closing: a quick pre‑closing call can clarify reporting, withholding (for nonresident sellers), and whether estimated taxes or Form 6038/6252 apply.

Where to read official guidance


Professional disclaimer: This article is educational and does not replace personalized tax or legal advice. Rules and rates change; consult a qualified CPA, tax attorney, or financial advisor about your specific transaction.

Related finhelp.io resources:

If you want, I can convert the examples into a downloadable worksheet to track basis and calculate gain for a specific property.

FINHelp - Understand Money. Make Better Decisions.

One Application. 20+ Loan Offers.
No Credit Hit

Compare real rates from top lenders - in under 2 minutes

Recommended for You

Closing Costs and Tax Basis

Closing costs and tax basis are crucial for understanding how much tax you’ll owe on property sales. Properly accounting for these can save you significant money when you sell a home or investment.

Investment Cost Basis

Investment cost basis is the original purchase value of an asset used to calculate capital gains or losses when you sell. Understanding it is essential for accurate tax reporting and effective financial planning.
FINHelp - Understand Money. Make Better Decisions.

One Application. 20+ Loan Offers.
No Credit Hit

Compare real rates from top lenders - in under 2 minutes