To calculate the cost basis for real estate, start with what you paid for the property, add qualifying closing costs and the cost of any capital improvements, then subtract depreciation you claimed (or were allowed to claim), casualty-loss reimbursements, easement payments, and any residential energy credits. The result is your adjusted basis, and it’s the number the IRS subtracts from your sale price to figure your taxable gain. If you inherited the property, received it as a gift, or acquired it in a 1031 exchange, the starting point changes before you run the rest of the math.
The formula itself:
Adjusted Basis = Purchase Price + Closing Costs + Capital Improvements − Depreciation − Casualty Loss Reductions − Easement Payments − Energy Credit Reductions
Starting Point: Purchase Price and Closing Costs
Your initial basis is what you paid for the property, plus specific settlement costs shown on your Closing Disclosure. IRS Publication 551 lists the closing costs that get folded into basis: legal fees for the title search, owner’s title insurance, recording fees, transfer taxes, survey fees, and charges for installing utility services that weren’t previously available.1Internal Revenue Service. Publication 551 (12/2025), Basis of Assets
Plenty of what’s on a settlement statement doesn’t qualify. Costs tied to financing belong somewhere else on your return. Points, loan origination fees, mortgage insurance premiums, lender-ordered appraisal fees, and credit report charges cannot be added to your basis.1Internal Revenue Service. Publication 551 (12/2025), Basis of Assets Hazard insurance premiums and prepaid property taxes are also excluded.
Save the settlement statement permanently. It’s the single most important document in the entire basis calculation, and you may need it decades later.
Capital Improvements That Add to Basis
Every dollar you spend on a capital improvement increases your basis. The IRS draws a hard line between improvements and repairs. A repair keeps the property in its current condition — patching drywall, fixing a leaky pipe, replacing a broken window — and those costs don’t touch your basis. An improvement makes the property more valuable, extends its useful life, or adapts it to a new use.
The IRS applies three tests: an expenditure qualifies as an improvement if it fixes a pre-existing defect, makes a material addition, or materially increases the property’s capacity, efficiency, or quality.2Internal Revenue Service. Tangible Property Regulations – Frequently Asked Questions Projects that typically clear those tests include:
- Structural additions: a new garage, extra bedroom, deck, or finished basement
- Major system replacements: a full HVAC system, complete re-plumbing, a new electrical panel, or a roof replacement
- Exterior work: paving a driveway, building a fence, installing a retaining wall or an in-ground sprinkler system
- Adaptations: converting a manufacturing building into retail space, or turning a garage into a rental unit
One rule catches people off guard. If you did the work yourself, only the cost of materials adds to your basis. The value of your own labor doesn’t count.1Internal Revenue Service. Publication 551 (12/2025), Basis of Assets Keep every receipt, contractor invoice, and proof of payment. A running spreadsheet with the date, description, and cost of each project is enough.
What You Have to Subtract
Section 1016 of the tax code requires you to reduce basis for certain deductions and reimbursements you’ve received.3Office of the Law Revision Counsel. 26 U.S. Code 1016 – Adjustments to Basis Four categories cover almost every situation.
Depreciation
If you used the property for business or as a rental, annual depreciation deductions reduce your basis year by year. Sections 167 and 168 govern the deductions, and here’s the trap: even if you never claimed depreciation, the IRS reduces your basis by the amount you were allowed to deduct, not just what you actually took.4Office of the Law Revision Counsel. 26 USC 167 – Depreciation That “allowed or allowable” rule is one of the most overlooked pieces of real estate tax law. Pull Form 4562 from each prior year’s return to track the running total.
Casualty Losses and Insurance Proceeds
When a fire, storm, or other casualty damages the property, the loss is the smaller of your adjusted basis or the drop in fair market value, minus any insurance reimbursement.5Internal Revenue Service. Publication 547 (2025), Casualties, Disasters, and Thefts If insurance pays out more than your adjusted basis in the damaged portion, the excess is a gain rather than a loss. Either way, the reimbursement reduces your basis going forward.
Easement Payments
If you granted a utility company or neighbor the right to use part of your land, the payment reduces your basis rather than counting as ordinary income. The buyer is effectively purchasing a slice of your original investment. Keep the settlement agreement as documentation.
Residential Energy Credits
Federal residential energy credits claimed on Form 5695 reduce your basis by the credit amount. If you install solar panels and claim a credit, the improvement still adds to basis, just not by the full amount you spent — the credit is subtracted.6Internal Revenue Service. Instructions for Form 5695
When the Starting Point Isn’t What You Paid
Three situations override the purchase-price starting point. Read the one that applies to you and skip the others.
Inherited Property
Under Section 1014, the basis of inherited real estate generally steps up to the fair market value on the date of the previous owner’s death. If your parent bought a house for $80,000 and it was worth $400,000 when they died, your basis is $400,000. All the appreciation during their lifetime is never taxed. To document the stepped-up value, get a formal appraisal from a qualified professional dated as close to the death as possible. If an estate tax return was filed, the value reported there sets a ceiling on your basis.7Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent
Married couples in community property states get an extra benefit. When one spouse dies, the surviving spouse’s half of the property also steps up, not just the decedent’s half.8Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent If a couple bought a home for $200,000 and it’s worth $600,000 when one spouse dies, the survivor’s new basis is the full $600,000. In a common-law state, only the deceased spouse’s half steps up, leaving the survivor at $400,000. The community property states are Arizona, California, Idaho, Louisiana, Nevada, New Mexico, Texas, Washington, and Wisconsin.
Gifted Property
Gifts don’t get a step-up. Under Section 1015, you generally take over the donor’s basis, including their adjustments for improvements and depreciation.9Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust If your aunt bought a rental property for $150,000, put $50,000 into improvements, and claimed $30,000 in depreciation before gifting it to you, your basis is $170,000. You inherit her entire financial history with the property.
There’s a wrinkle when the property has lost value. If the fair market value on the gift date is lower than the donor’s basis, you use fair market value when calculating a loss on a later sale. This prevents donors from shifting paper losses to relatives.9Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust
If the donor paid gift tax on the transfer, your basis increases by the portion of that tax attributable to the property’s appreciation at the time of the gift. The increase can’t push your basis above fair market value on the gift date.9Office 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 a copy of Form 709 if one was filed.
Property Acquired in a 1031 Exchange
If you acquired investment or business real estate through a Section 1031 like-kind exchange, your basis in the replacement property carries over from the property you gave up.10Office of the Law Revision Counsel. 26 U.S. Code 1031 – Exchange of Real Property Held for Productive Use or Investment That’s the point of the exchange: the gain is deferred, and the deferred gain lives inside the lower basis of the new property.
If you received cash or other non-like-kind property (called “boot”), your basis adjusts for the gain you recognized on that boot. After several exchanges over a career, a property with a $2 million market value might still carry a basis of $300,000 from decades of deferred gains. When you eventually sell without doing another exchange, all of that deferred gain becomes taxable at once. Keep records from every property in the chain; the IRS specifically requires it.11Internal Revenue Service. How Long Should I Keep Records
Why the Basis Number Matters at Sale
For a primary residence, Section 121 lets you exclude up to $250,000 of gain from income if you’re single, or up to $500,000 if you’re married filing jointly, provided you owned and lived in the home for at least two of the five years before the sale.12Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence Sale price minus selling expenses minus adjusted basis equals your gain. Every dollar of closing cost and capital improvement you properly tracked shrinks that gain.13Internal Revenue Service. Publication 523 (2024), Selling Your Home
Rental and business property owners face a second layer. All the depreciation you deducted (or were allowed to deduct) is “recaptured” at sale and taxed at a maximum rate of 25%, regardless of your regular bracket.14Internal Revenue Service. Topic No. 409, Capital Gains and Losses Say you bought a rental for $300,000 (with $50,000 allocated to non-depreciable land) and claimed $80,000 in depreciation. Your adjusted basis is $220,000. Sell for $400,000 and your total gain is $180,000. The first $80,000 is taxed at up to 25% as recapture; the remaining $100,000 is taxed at long-term capital gains rates.15Internal Revenue Service. Sale or Trade of Business, Depreciation, Rentals
One boundary worth flagging on the Section 121 exclusion: if you ever claimed depreciation on part of the home, such as a home office, the portion of gain equal to depreciation taken after May 6, 1997, cannot be excluded and is subject to recapture instead.15Internal Revenue Service. Sale or Trade of Business, Depreciation, Rentals
Records to Keep
The IRS requires you to keep property records until the statute of limitations expires for the tax year in which you dispose of the property.11Internal Revenue Service. How Long Should I Keep Records In most cases that means at least three years after you file the return reporting the sale, which works out to roughly four years from closing.
For 1031-exchange property, the horizon is much longer. You need records from every property in the chain, going back to the original purchase, because your basis traces through each swap.11Internal Revenue Service. How Long Should I Keep Records Digital copies of settlement statements, improvement receipts, and depreciation schedules, stored with a backup, make twenty years of records manageable without a filing cabinet.