Your home sale cost basis is what you have invested in the property for tax purposes: generally your purchase price plus qualifying acquisition costs, increased by capital improvements and reduced by items like depreciation, casualty reimbursements, and certain credits. Subtract that adjusted basis from what you net on the sale to find your taxable gain. Getting the number right matters because the Section 121 exclusion shelters up to $250,000 of gain for single filers and $500,000 for joint filers, and your basis determines whether the exclusion covers everything or leaves a taxable remainder.1Internal Revenue Service. Publication 523 (2025), Selling Your Home
Start With What You Paid
The foundation is the price you paid for the home, including your down payment and the amount you borrowed. If you assumed any of the seller’s debts on the property, or paid real estate taxes the seller owed and were never reimbursed, add those too.1Internal Revenue Service. Publication 523 (2025), Selling Your Home
Certain closing costs from the original purchase also fold into basis. These are expenses tied to acquiring the property itself, not to financing it. The IRS lists the following:1Internal Revenue Service. Publication 523 (2025), Selling Your Home
- Abstract of title fees, title search costs, and owner’s title insurance premiums
- Attorney charges for the sales contract, deed, and closing documents
- Recording fees, transfer taxes, and stamp taxes
- Survey fees
- Charges for installing utility service connections to the property
All of these appear on the settlement statement from your original closing. Older transactions used a HUD-1; purchases after October 2015 typically used a Closing Disclosure. Either is your primary record.
Seller-Paid Points Come Off
If the seller paid mortgage discount points for you at closing, subtract those points from your basis. For homes purchased after April 3, 1994, the reduction applies whether or not you deducted the points on your return.2Internal Revenue Service. Publication 523 (2025), Selling Your Home – Section: Basis Adjustments It’s easy to miss, so check the original settlement statement.
What Doesn’t Count
Costs tied to your mortgage are excluded entirely. Points you paid for the loan, lender-required appraisal fees, and mortgage insurance premiums all relate to the debt, not the property.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets
Prepaid items placed in escrow at closing are also out. Property taxes, homeowner’s insurance, and utility charges covering the period after you take ownership are ongoing costs of living in the home, not costs of acquiring it.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets
If You Built the Home
If you constructed the home rather than buying an existing one, your basis is the total cost of construction plus the price of the land. That includes materials, labor you paid for, architect’s fees, building permits, contractor payments, inspection fees, and equipment rental. You cannot include the value of your own labor. Weekends you spent framing or wiring add zero. Only amounts actually paid to other people or companies count. If you demolished an existing structure before building, the demolition costs get added to the basis of the land.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets
Capital Improvements Push Basis Up
Once the starting basis is set, capital improvements you make during ownership raise it. The IRS treats an expenditure as a capital improvement if it produces a betterment to the property, restores a major component, or adapts the property to a new use.4Internal Revenue Service. Tangible Property Regulations – Frequently Asked Questions The improvement must be permanent and expected to last beyond the current tax year.
Typical examples: replacing the entire roof or HVAC system, adding a bathroom or bedroom, building a deck or garage, installing new insulation, putting in a swimming pool. Each adds measurable value or extends the life of the structure, so the full cost goes into basis.
Repairs Don’t Count, With One Wrinkle
A repair keeps the home in its current operating condition without materially adding value. Repainting a room, patching a gutter, fixing a leaky faucet, or replacing a broken window pane are repairs. You can’t deduct them on a personal residence, and they don’t increase basis.5Internal Revenue Service. Publication 530 (2025), Tax Information for Homeowners
The line comes down to scope. Swapping one cracked window is a repair; replacing every window in the house with energy-efficient models is an improvement. Repairs done as part of a larger remodeling project get treated as improvements and added to basis.5Internal Revenue Service. Publication 530 (2025), Tax Information for Homeowners That matters when you renovate a kitchen or bathroom, because the incidental repairs folded into the project become part of the improvement cost.
Events That Pull Basis Down
Certain events and prior deductions reduce basis. Missing them causes you to understate your gain.
Depreciation From Rental or Business Use
If you ever rented out the home or used part of it for business, any depreciation you claimed reduces your basis. The IRS goes further: even if you were entitled to depreciation but never took it, your basis is reduced by the “allowable” amount anyway.6Internal Revenue Service. Publication 946 (2025), How To Depreciate Property There is no benefit to skipping the deduction.
When you sell, cumulative depreciation is subject to recapture. Unrecaptured Section 1250 gain is taxed at a maximum rate of 25%, typically higher than the long-term capital gains rate on the rest of the profit. Recapture applies even if part of your gain qualifies for the Section 121 exclusion.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets
Casualty Losses and Insurance
If the home suffered damage from a fire, storm, or other casualty and you received insurance reimbursement, that payment reduces basis. The same applies if you claimed a casualty loss deduction for damage that wasn’t covered. Basis goes down by the amount of the deduction you actually took.7Internal Revenue Service. Publication 547 (2025), Casualties, Disasters, and Thefts
Easement Payments
Money received for granting an easement reduces basis. If only part of the property is affected, only that portion’s basis is reduced. When it’s impractical to separate the basis of the affected part, the basis of the whole property goes down by the amount received. Any payment exceeding your remaining basis is a taxable gain.8Internal Revenue Service. Publication 544, Sales and Other Dispositions of Assets
Federal Energy Credits You Claimed
If you claimed federal energy credits for improvements like solar panels, insulation, or efficient windows, the credit amount reduced your basis at the time you claimed it. Both the Section 25C energy efficient home improvement credit and the Section 25D residential clean energy credit carried basis-reduction provisions.9Office of the Law Revision Counsel. 26 USC 25C – Energy Efficient Home Improvement Credit Both credits terminated for property placed in service after December 31, 2025.10Internal Revenue Service. FAQs for Modification of Sections 25C, 25D, 25E, 30C, 30D, 45L, 45W, and 179D If you claimed either in a prior year, the basis reduction still affects your gain when you sell.
When You Didn’t Buy the Home
How you acquired the property changes the starting basis.
Inherited Homes
If you inherited the home, you don’t use the previous owner’s purchase price. Your basis is the property’s fair market value on the date of death, either stepped up or, less commonly, stepped down.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets That erases the appreciation that built up during the decedent’s lifetime and can sharply reduce the taxable gain when you sell.
The executor can elect an alternate valuation date six months after death, but only if doing so decreases both the total value of the estate and the estate tax owed.3Internal Revenue Service. Publication 551 (12/2025), Basis of Assets In a declining market that could produce a lower basis for the heir, so the election is not automatically good news.
In community property states, the surviving spouse can receive a full step-up on the entire property, not just the decedent’s half, so long as at least half the community interest was included in the decedent’s gross estate.11Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent
Gifted Homes
If the home was a gift, you generally take over the donor’s adjusted basis, including their improvements. This is a “carryover basis,” and you’ll need the donor’s purchase records and improvement receipts.12Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust
There is a wrinkle when the fair market value at the time of the gift was lower than the donor’s basis. If you later sell at a loss, you must use the lower fair market value as your basis for figuring that loss, not the donor’s higher basis.12Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust Holding period follows the basis rule: when you use the donor’s carryover basis for a gain, you tack on the donor’s holding period; when you use the date-of-gift fair market value for a loss, your holding period starts on the date of the gift.13Office of the Law Revision Counsel. 26 U.S. Code 1223 – Holding Period of Property
Homes Received in a Divorce
A home transferred between spouses as part of a divorce is treated as a gift for tax purposes. No gain or loss is recognized at the transfer, and the receiving spouse takes over the transferring spouse’s adjusted basis.14Office of the Law Revision Counsel. 26 U.S. Code 1041 – Transfers of Property Between Spouses or Incident to Divorce The rule applies to transfers within one year of the marriage ending, or within six years if required under the divorce or separation agreement.15Internal Revenue Service. Publication 504 (2025), Divorced or Separated Individuals
The practical consequence: if your ex-spouse bought the home for $200,000 and added $50,000 in improvements, your basis is $250,000 even if the home is worth $400,000 on the day it comes to you. When you sell, you’ll owe tax on any gain above $250,000 after applying the Section 121 exclusion if you qualify. The spouse who keeps the home inherits the full future tax liability.
Running the Final Numbers
Once you’ve added improvements and subtracted reductions, you have your adjusted basis. The gain formula:
Amount Realized − Adjusted Basis = Capital Gain (or Loss)
The amount realized is not the sticker price. Subtract selling expenses first: real estate commissions, title fees, transfer taxes paid by the seller, legal fees, and any other costs directly tied to the sale. What’s left is your amount realized.1Internal Revenue Service. Publication 523 (2025), Selling Your Home A gain on a primary residence gets reported on Schedule D of Form 1040 and potentially Form 8949.16Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040)
One boundary worth knowing. If your adjusted basis is higher than your amount realized, you have a loss, and the IRS does not let you deduct it. Losses on personal-use property, including your home, cannot be claimed on your return, offset against other income, or carried forward.17Internal Revenue Service. Capital Gains, Losses, and Sale of Home A loss is only deductible when the property was used in a trade or business or held for investment. That’s why an accurate basis calculation matters in both directions: if you have a gain, a higher basis reduces your tax; if you have a loss, knowing it won’t help you at tax time might affect how you approach the sale.
Keep the Records That Prove the Number
Every dollar of basis is a dollar off your taxable gain, but only if you can prove it. Hold on to your original closing statement, receipts and invoices for every capital improvement, records of casualty losses and insurance reimbursements, and depreciation schedules for any rental or business use.
The general rule is to keep these records for at least three years after the due date of the return on which you report the sale.1Internal Revenue Service. Publication 523 (2025), Selling Your Home Many tax professionals recommend longer. If you excluded the full gain under Section 121, the IRS can still question whether you qualified, and you’d need the underlying records to support the basis behind the exclusion.
Losing paperwork for a $15,000 kitchen remodel or a $25,000 roof replacement directly raises your tax bill. If you can’t substantiate an improvement, the IRS is not required to accept it. Bank and credit card statements can serve as backup, but the strongest evidence is the original contractor invoice paired with proof of payment.