Tax basis in real estate is the dollar figure the IRS treats as your investment in a property, and it decides how much tax you owe when you sell. The calculation starts with what you paid for the property (including certain closing costs), adds capital improvements you make over the years, and subtracts items like depreciation and insurance reimbursements. The result is your adjusted basis. Subtract it from your net sale proceeds and you have your taxable gain or deductible loss.
Everything below walks through how each piece of that number is built, adjusted, and eventually used.
What Goes Into Your Starting Cost Basis
Your cost basis begins with the purchase price you actually paid.1Office of the Law Revision Counsel. 26 USC 1012 – Basis of Property Cost Several settlement fees get folded in on top of that, so the true starting number is usually higher than the price on the contract. You’ll find these itemized on your Closing Disclosure, or on a HUD-1 settlement statement if your mortgage application predates October 2015.2Consumer Financial Protection Bureau. What Is a HUD-1 Settlement Statement?
IRS Publication 551 identifies the closing costs you can add to basis:3Internal Revenue Service. Publication 551, Basis of Assets
- Abstract fees
- Legal fees for title searches and preparing the sales contract and deed
- Recording fees
- Surveys
- Transfer taxes
- Owner’s title insurance
- Utility installation charges
- Seller obligations you agree to pay, such as back taxes, sales commissions, or repair charges
Save that closing statement permanently. You may not need it for years or even decades, but when you sell it is the strongest proof of your original basis.
Closing Costs That Do Not Count
Charges tied to getting your mortgage stay out of basis. Discount points, loan origination fees, mortgage insurance premiums, lender-required appraisal fees, and credit report charges are all excluded.3Internal Revenue Service. Publication 551, Basis of Assets Prepaid items also stay out: casualty insurance premiums, and any rent or utility charges for occupying the property before closing. Some of these costs may be deductible elsewhere on your return, but they never become part of your basis.
The distinction matters. Loan-related fees can easily run into the thousands on a typical purchase, and folding them into basis by mistake overstates it and creates an audit problem later.
Property Tax Proration at Closing
Property taxes get their own rule. If you reimburse the seller for taxes covering the period after the sale date (taxes the IRS treats as imposed on you), that reimbursement is not added to your basis. If you pay taxes the IRS treats as the seller’s responsibility, those amounts do become part of your cost.4eCFR. 26 CFR 1.1012-1 – Basis of Property
Improvements That Increase Basis After You Buy
Once you own the property, every dollar spent on a capital improvement raises your basis. The IRS draws the line between improvements and ordinary maintenance: an improvement adds value, extends the property’s useful life, or adapts it to a new use, while a repair just keeps things in working order.3Internal Revenue Service. Publication 551, Basis of Assets Fixing a dripping faucet is maintenance. Replacing the plumbing system is an improvement.
Publication 551 lists concrete examples that qualify as improvements: adding a room, replacing an entire roof, paving a driveway, installing central air conditioning, and rewiring the home.3Internal Revenue Service. Publication 551, Basis of Assets The tangible property regulations extend the definition to any material addition, replacement of a major component or substantial structural part, or adaptation to a new use.5Internal Revenue Service. Tangible Property Regulations – Frequently Asked Questions
Recordkeeping is the practical challenge. If you sell twenty years after a kitchen renovation, the IRS will want receipts, contracts, or canceled checks. Keep a dedicated file for every qualifying project. Before-and-after photos help establish that the work went beyond upkeep. Without documentation, you lose the basis increase entirely, even if the improvement plainly happened.
What Reduces Your Basis
Just as improvements push basis up, certain events pull it down. The two biggest are depreciation and casualty reimbursements.
Depreciation on Rental or Business Property
If you use real estate for business or rental income, you are expected to depreciate the building over its recovery period. Residential rental property uses a 27.5-year straight-line schedule; nonresidential real property uses 39 years.6Office of the Law Revision Counsel. 26 USC 168 – Accelerated Cost Recovery System Each year’s depreciation reduces your adjusted basis by the same amount.
Here’s the trap. The IRS reduces your basis by the depreciation you were allowed to take, or the amount that was allowable, whichever is greater.7Office of the Law Revision Counsel. 26 USC 1016 – Adjustments to Basis Your basis shrinks whether or not you actually claimed the deduction. Skipping depreciation on your return does not preserve your basis; it just forfeits a deduction you could have taken.
Splitting Land From Building
You can only depreciate the building. When you buy for a single lump sum, you have to split the price between the land and the structure. The IRS accepts an allocation based on relative fair market values: divide each component’s value by the total and multiply by your cost. Without independent appraisals, assessed values from your local property tax bill work as a reasonable proxy.3Internal Revenue Service. Publication 551, Basis of Assets
Getting this split wrong ripples through every year of ownership. Overallocating to the building overclaims depreciation now and produces a larger recapture tax on sale. Underallocating leaves legitimate deductions on the table for decades.
Casualty Losses and Insurance Payouts
If fire, storm, or other casualty damages the property, insurance reimbursements you receive reduce your basis, as does any deductible casualty loss you claim.8Internal Revenue Service. Publication 547, Casualties, Disasters, and Thefts Those portions of your investment have already been recovered, so they no longer count as unrecovered cost.
Basis When You Didn’t Buy the Property
Buying on the open market is the simplest case. Property that comes to you another way follows different rules.
Inherited Property
When you inherit real estate, your basis is generally the property’s fair market value on the date of the previous owner’s death.9Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired from a Decedent This “step-up” wipes out all the appreciation that built up during the decedent’s lifetime. A parent who bought for $80,000 and died owning a house worth $600,000 passes it on with a $600,000 basis. If the heir sells for $610,000, the taxable gain is just $10,000. The estate can alternatively elect a valuation date six months after death, in which case the heir’s basis matches the six-month value. Either way, the heir needs the estate’s appraisal to substantiate the number.
Gifted Property
Property received as a gift generally carries the donor’s adjusted basis forward.10Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust There is no reset to current market value. If your parent gives you a rental they bought for $150,000 and improved by $50,000, your starting basis is $200,000, minus any depreciation they claimed or should have claimed.
One wrinkle. If the donor’s adjusted basis is higher than the property’s fair market value at the time of the gift, the recipient uses the lower fair market value when calculating a loss on a later sale.11eCFR. 26 CFR 1.1015-1 – Basis of Property Acquired by Gift After December 31, 1920 That creates a “dual basis” where one number figures gain and a lower number figures loss. If the sale price falls between the two, no gain or loss is recognized at all.
The practical takeaway: if someone is giving you property, get their purchase records, improvement receipts, and depreciation schedules before the gift happens. Reconstructing that history later is often impossible.
Divorce Transfers
Real estate transferred between spouses or former spouses as part of a divorce moves without any recognized gain or loss. The receiving spouse takes the transferring spouse’s adjusted basis, as if it were a gift.12Office of the Law Revision Counsel. 26 USC 1041 – Transfers of Property Between Spouses or Incident to Divorce The transfer must occur within one year of the marriage ending, or otherwise be related to the divorce.
The spouse who keeps the house also inherits the built-in gain. A couple who bought for $300,000 and split at a $700,000 valuation leaves the receiving spouse with a $300,000 basis. A later sale at $700,000 produces a $400,000 gain that falls entirely on that spouse. The after-tax value of the house may be well below its market value, and it is worth pricing that in during the divorce itself.
1031 Like-Kind Exchanges
Investors who sell one investment property and buy another of equal or greater value can defer capital gains tax through a like-kind exchange. The tradeoff is that the replacement property inherits the old property’s basis rather than starting fresh at the purchase price.13Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 The deferred gain is baked into the lower basis and surfaces when the replacement property is eventually sold outside another exchange.
If you receive cash or debt relief that doesn’t qualify as like-kind property (commonly called “boot”), that portion is taxed immediately, and the replacement property’s basis reflects the partial recognition. Trading into a property with a smaller mortgage than the one you paid off can trigger mortgage boot that first-time exchangers often overlook.
How Basis Turns Into a Tax Bill
When you sell, the IRS compares two numbers: your amount realized and your adjusted basis. The amount realized is your selling price minus selling expenses like real estate commissions, advertising, and legal fees.14Internal Revenue Service. Publication 523, Selling Your Home
A worked example. You sell a rental for $500,000 and pay $30,000 in commissions and closing costs, leaving an amount realized of $470,000. You paid $250,000 for the property, added $60,000 in improvements, and claimed $80,000 in depreciation. Your adjusted basis is $250,000 + $60,000 − $80,000 = $230,000. The taxable gain is $470,000 − $230,000 = $240,000.
If adjusted basis exceeds amount realized, the difference is a loss. Losses on personal residences are not deductible; losses on rental or investment property generally are.14Internal Revenue Service. Publication 523, Selling Your Home
The Section 121 Exclusion for a Primary Residence
If you owned and used the home as your principal residence for at least two of the five years before the sale, you can exclude up to $250,000 of gain from income, or $500,000 for married couples filing jointly.15Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence The two years don’t need to be consecutive; they just need to total 24 months within that five-year window.16eCFR. 26 CFR 1.121-1 – Exclusion of Gain from Sale or Exchange of a Principal Residence On a joint return, both spouses must meet the use test, but only one has to meet the ownership test.
The exclusion is why basis math feels academic to many homeowners. A couple who bought for $350,000 and sells for $750,000 has a $400,000 gain, well inside the $500,000 joint exclusion. It doesn’t apply to rental or investment property at all, which is where careful basis tracking pays off.
Long-Term Capital Gains Rates
Gains on property held longer than a year are taxed at long-term capital gains rates of 0%, 15%, or 20%, depending on your taxable income.17Internal Revenue Service. Revenue Procedure 2025-32 Property held for one year or less produces a short-term gain, taxed as ordinary income at your regular rate. For higher earners, clearing the one-year mark can mean the difference between a 37% rate and a 15% rate.
Depreciation Recapture
Selling a depreciated rental or business property brings a separate tax layer. The portion of gain attributable to prior depreciation is classified as unrecaptured Section 1250 gain and taxed at a maximum rate of 25%, regardless of your income bracket.18Internal Revenue Service. Treasury Decision 8836 – Section 1(h) Capital Gains Rates The remaining gain above your original cost basis is taxed at the regular long-term capital gains rates.
Back to the earlier example. Of the $240,000 total gain, the first $80,000 is recaptured at up to 25% (up to $20,000 in tax), and the remaining $160,000 is taxed at your long-term rate. High-income taxpayers also owe the 3.8% net investment income tax on the entire gain, which can push the effective combined rate above 28% on the recaptured portion.
This is why skipping depreciation deductions during ownership is so costly. Recapture is based on the depreciation you were entitled to take, not what you actually claimed. You lose the annual deduction and still pay the recapture tax as though you had taken it.