How to Calculate Cost Basis for Real Estate Taxes

To calculate the cost basis for real estate, start with what you paid for the property, add the closing costs tied to acquiring it, add every capital improvement you made while you owned it, and subtract any depreciation, insurance reimbursements, easement payments, or energy credits that reduce basis. The result is your adjusted basis, and the IRS subtracts it from your amount realized on sale to determine your taxable gain.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Every dollar of basis you can document is a dollar that escapes capital gains tax, so accuracy matters in both directions: understate basis and you overpay; overstate it and you can face a 20% accuracy-related penalty on the underpayment.2Internal Revenue Service. Accuracy-Related Penalty

Step 1: Start With the Purchase Price and Qualifying Closing Costs

Your initial basis is the price you paid, including any mortgage proceeds you used to finance the purchase. Federal tax rules then let you add certain settlement fees, provided those costs are tied to acquiring the property rather than borrowing to buy it.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets

Costs you can add to basis include:

  • Owner’s title insurance
  • Legal fees for title searches, sales contracts, and deed preparation
  • Recording fees and transfer taxes
  • Abstract and survey fees
  • Charges for installing utility services
  • Amounts the seller owed that you agreed to pay, such as back taxes or sales commissions

Costs you cannot add include anything related to getting a loan (mortgage application fees, points paid solely for borrowing, mortgage insurance premiums) and costs for insuring or occupying the property before closing.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets

Pull these numbers from your Closing Disclosure. Page 2 groups costs under lettered sections: Section E covers taxes and government fees like recording charges and transfer taxes; Section H lists items like title insurance and inspection fees.4Consumer Financial Protection Bureau. Closing Disclosure If you bought before October 2015, use the HUD-1 settlement statement instead. Whichever form you have is the foundation of the entire calculation, so keep it.

Step 2: Add Capital Improvements

Money you spend improving the property after closing gets added to basis. The IRS draws a clear line: a capital improvement must add value, extend the property’s useful life, or adapt it to a new use. Routine maintenance does not qualify.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets

Publication 551 gives specific examples of qualifying improvements:

  • Additions such as a new room, garage, deck, or porch
  • Major systems such as a full roof replacement, rewiring, or central air conditioning
  • Exterior work such as paving a driveway, building a fence, or adding a pool
  • Infrastructure such as new plumbing, water connections, or a septic system

Fixing a leaky faucet, repainting a room, or patching drywall are repairs. They keep the property in its current condition and do not increase basis. When a project falls somewhere in between — replacing 80% of a roof, for example — lean toward whatever characterization you can defend with paperwork. Keep every invoice showing the date, contractor, description of work, and amount paid. If the IRS questions the return, the burden of proof falls on you.5Internal Revenue Service. Recordkeeping

Step 3: Subtract Everything That Reduces Basis

Several events pull basis back down. Missing any of them means overstating basis and underreporting gain, which is exactly the kind of error that draws penalties.

Depreciation

If the property produces income — rental property, office space, farmland with structures — you are expected to depreciate the building portion over a set recovery period. Residential rental uses 27.5 years; nonresidential real property uses 39 years, both under MACRS.6Internal Revenue Service. Publication 946 (2025), How To Depreciate Property Every year you claim depreciation, basis drops by that year’s deduction. If you forget to claim it, the IRS still reduces your basis by the amount you were allowed to take, so skipping the deduction does not preserve your basis.7Internal Revenue Service. Publication 527 (2025), Residential Rental Property Your running total appears on Form 4562 each year.

Casualty Insurance Reimbursements

If a fire, storm, or other casualty damages the property and an insurer pays a claim, reduce basis by the reimbursement.8Internal Revenue Service. Publication 547 (2025), Casualties, Disasters, and Thefts If you used the money for work that qualifies as a capital improvement, that improvement gets added back separately, but the reimbursement itself still comes off.

Easement Payments

Granting an easement — letting a utility company run power lines across your land, for example — reduces the basis of the affected portion by the payment amount. If the payment exceeds the basis of that portion, the excess is a recognized gain.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets

Residential Clean Energy Credits

If you claimed a residential clean energy credit for solar panels, geothermal systems, or similar work, the credit amount reduces the basis increase the installation would otherwise provide. You do not get both the full credit and the full basis addition.9Office of the Law Revision Counsel. 26 USC 25D – Residential Clean Energy Credit

Home Office Depreciation

Taking the home office deduction under the regular method includes a depreciation component, and that component reduces basis. The simplified method ($5 per square foot) claims no depreciation, so there is no basis adjustment for years you used it.10Internal Revenue Service. Simplified Option for Home Office Deduction

When Your Starting Basis Is Not the Purchase Price

Four common situations replace the purchase-price starting point with something else. Get this piece wrong and every later adjustment sits on the wrong foundation.

Inherited Property

When you inherit real estate, your basis is not what the decedent paid. Under IRC Section 1014, basis resets to the property’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 A house a parent bought for $80,000 in 1990 that was worth $400,000 at death gives you a starting basis of $400,000, and all the lifetime appreciation escapes income tax. Get a professional appraisal as close to the date of death as possible; an appraisal done years later invites challenge.

Gifted Property

Gifts work nothing like inheritances. Under IRC Section 1015, you generally take over the donor’s adjusted basis — whatever they paid, plus their improvements, minus their depreciation. If the property’s fair market value at the time of the gift is lower than the donor’s adjusted basis, you use the donor’s basis to compute a gain and the fair market value to compute a loss. Sell between those two numbers and you have no gain or loss.12Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust Ask the donor for original purchase records, improvement receipts, and depreciation history at the time of the gift. Reconstructing someone else’s decades-old basis after the fact is where most gifted-property problems come from.

Property Received in a Divorce

Real estate transferred between spouses, or between former spouses as part of a divorce, triggers no gain or loss on the transfer. The receiving spouse takes over the transferring spouse’s adjusted basis.13Office of the Law Revision Counsel. 26 USC 1041 – Transfers of Property Between Spouses or Incident to Divorce The trap: the spouse who keeps the house inherits the built-in gain. A couple who paid $200,000 for a home now worth $600,000 leaves the receiving spouse with a $200,000 basis and $400,000 of potential taxable gain at sale.

Property Acquired Through a 1031 Exchange

A like-kind exchange under IRC Section 1031 defers, but does not erase, capital gains tax. Your basis in the replacement property carries over from the old one, reduced by any cash you received and increased by any gain you recognized on the exchange.14Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Property Held for Productive Use or Investment Multiple exchanges stack: a property worth $2 million today can carry a basis of $300,000 from a purchase decades earlier, with every deferred gain baked in. Keep the closing documents and exchange agreements from every property in the chain, because losing that paper trail makes proving basis nearly impossible.

Putting It Together at Sale

When you sell, the calculation runs in two lines:

Selling price − selling expenses = amount realized

Amount realized − adjusted basis = gain (or loss)

Selling expenses come off before the basis comparison. Publication 523 lists these as real estate agent commissions, advertising fees, legal fees, transfer taxes paid by the seller, and any loan charges you covered that would normally be the buyer’s responsibility.15Internal Revenue Service. Publication 523 (2025), Selling Your Home On a $400,000 sale with a 5% commission and $2,000 in other closing costs, selling expenses total $22,000, so the amount realized is $378,000. The gain flows to Form 8949 and then to Schedule D.16Internal Revenue Service. Instructions for Form 8949

A Worked Example

Suppose you bought a rental property for $300,000, paid $5,000 in qualifying closing costs, and spent $40,000 on improvements over the years. You also claimed $60,000 in total depreciation. Your adjusted basis is $300,000 + $5,000 + $40,000 − $60,000 = $285,000. Sell for $450,000 with $30,000 in selling expenses and your amount realized is $420,000, producing a $135,000 gain.

Records to Keep

Keep records for as long as they can affect a tax return. The IRS says property records must be retained until the statute of limitations expires for the year of the sale, which is at least three years after that return is filed. Underreporting income by more than 25% of gross income extends the window to six years; not filing or filing fraudulently leaves it open indefinitely. For properties acquired through a 1031 exchange, keep the records from every property in the chain, not just the current one, until the limitations period on the final sale closes.17Internal Revenue Service. How Long Should I Keep Records Closing statements, improvement invoices, depreciation schedules, insurance settlement letters, and exchange agreements all belong in the file.