To calculate your house cost basis for taxes, start with what you paid for the home (or the value assigned under special rules if you inherited it, received it as a gift, or got it through a divorce), add the settlement costs that relate to acquiring the property, add every capital improvement you’ve made since, and subtract any depreciation, casualty loss deductions, or energy credits you’ve claimed. The resulting number is your adjusted basis, and it’s what you subtract from your net sale price to figure your taxable gain.
Get this number too low and you overpay tax. Get it too high and you risk penalties for underreporting. The rules below walk through each piece.
Starting Basis for a Home You Purchased
Your starting basis is the contract price plus certain closing costs. The rule of thumb: costs you would have paid even if you bought the house with cash go into basis. Costs tied to getting a mortgage do not.
Closing costs that add to basis:
- Attorney fees for the purchase
- Title insurance premiums
- Title search and abstract fees
- Survey costs
- Transfer taxes
- Recording fees
Any real estate taxes the seller owed but you agreed to pay at closing also become part of your purchase cost rather than a deductible tax payment.1Internal Revenue Service. Publication 551 (12/2025), Basis of Assets
Loan-related charges stay out. Points, loan origination fees, mortgage insurance premiums, and lender-required appraisal fees don’t go into basis. Points are handled separately: generally deducted over the life of the loan, or in the year paid if you meet the requirements for a main home purchase.1Internal Revenue Service. Publication 551 (12/2025), Basis of Assets One easy-to-miss adjustment: if the seller paid points on your behalf, you must reduce your basis by that amount.2Internal Revenue Service. Publication 936 (2025), Home Mortgage Interest Deduction
Starting Basis If You Didn’t Buy the Home
Homes arrive other ways. The starting basis rule depends on how you got the property, and the differences can move your eventual tax bill by tens of thousands of dollars.
Inherited Property
Property you inherit receives a stepped-up basis equal to the home’s fair market value on the date of the previous owner’s death. Whatever the original owner paid decades earlier drops away.3Internal Revenue Service. Gifts and Inheritances If the estate’s executor files a federal estate tax return and elects the alternate valuation date (six months after death), that later value becomes your basis instead.
The step-up also applies to property held in a revocable living trust, because the IRS treats a revocable trust as a disregarded entity during the grantor’s lifetime and includes the assets in the grantor’s estate at death.
Gifted Property
When someone gives you a home, you take over the donor’s adjusted basis: their original cost, plus their improvements, minus any depreciation they claimed. This is a carryover basis, and you inherit the donor’s built-in gain along with the house.4Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust
The gap between inheriting and receiving a gift is real. If a parent bought a house for $80,000 and it’s now worth $400,000, an heir gets a $400,000 basis and owes nothing on an immediate sale. A gift recipient gets an $80,000 basis and faces a $320,000 gain on that same sale.
A dual-basis rule applies when the home’s fair market value at the time of the gift is lower than the donor’s adjusted basis. You then use the donor’s basis to calculate any gain but the lower fair market value to calculate any loss. Sell at a price between those two figures and you have no recognized gain or loss.4Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust
Divorce Transfers
When a home transfers between spouses as part of a divorce, no gain or loss is recognized at the transfer. The receiving spouse takes on the transferring spouse’s adjusted basis, the same carryover treatment used for gifts.5Office 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 divorce becoming final or be directly related to the end of the marriage.
In a buyout, the buying spouse’s new basis is their original half of the adjusted basis plus the buyout amount paid. If the home’s adjusted basis is $300,000 and you pay your ex-spouse $250,000 for their half, your new basis is $400,000 ($150,000 plus $250,000).
Homes You Built Yourself
If you built your home, basis equals the cost of the land plus your total construction expenses: payments to contractors, building materials, architect fees, permit charges, utility meter and connection fees, and legal fees tied to construction.6Internal Revenue Service. Publication 523 (2025), Selling Your Home Interest paid on a construction loan during the build can be added as well.
The value of your own labor cannot. Hours you spent framing walls or running plumbing don’t count; only what you actually spent on materials, equipment, and paid labor.1Internal Revenue Service. Publication 551 (12/2025), Basis of Assets
Capital Improvements That Raise Basis
Once the starting basis is set, every qualifying capital improvement adds to it. An improvement is work that adds value to the home, extends its useful life, or adapts it to a different use. A repair maintains the home in its current condition; an improvement makes it permanently better.
IRS examples of qualifying improvements:6Internal Revenue Service. Publication 523 (2025), Selling Your Home
- Additions: bedrooms, bathrooms, decks, garages, porches
- Systems: central air conditioning, heating, wiring, security systems, water filtration
- Exterior: new roof, siding, storm windows, satellite dish
- Grounds: landscaping, driveways, fences, retaining walls, swimming pools
- Interior: kitchen modernization, flooring, built-in appliances, fireplaces
- Insulation and plumbing: attic or wall insulation, septic systems, water heaters
Ordinary repairs like painting, fixing leaks, patching cracks, or replacing broken hardware don’t count. But repairs done as part of a larger renovation get folded into the improvement. Replacing a few broken windowpanes is a repair; replacing those same panes during a whole-house window replacement is part of the improvement.6Internal Revenue Service. Publication 523 (2025), Selling Your Home
One limit catches people out: improvements that are no longer part of the home don’t count. Wall-to-wall carpet you installed ten years ago and later replaced with hardwood drops out of basis; only the hardwood stays in.
Events That Lower Basis
Certain events force a reduction, whether or not you tracked them at the time.
Depreciation. If any part of your home was used for business or rented out, you must subtract depreciation from your basis, even if you never actually claimed the deduction. The IRS reduces basis by the amount you could have deducted under whatever method applied.7Internal Revenue Service. Publication 551 (12/2025), Basis of Assets – Section: Decreases to Basis You lose the basis either way.
Casualty losses. If your home was damaged and you claimed a casualty loss deduction, reduce basis by the amount deducted plus any insurance reimbursement received. You’ve already recovered that value once and can’t use it again to reduce a later gain.7Internal Revenue Service. Publication 551 (12/2025), Basis of Assets – Section: Decreases to Basis
Energy tax credits. If you claimed the Residential Clean Energy Credit for solar panels, a geothermal heat pump, or similar equipment, basis must drop by the credit amount.8Office of the Law Revision Counsel. 26 USC 25D – Residential Clean Energy Credit Nontaxable subsidies from utility companies for energy conservation measures also reduce basis.
Business or Rental Use
Homes with a dedicated space used regularly for business, or a portion rented out, require a split calculation. You allocate a percentage of basis to the business or rental portion and depreciate that portion over time. The IRS accepts two common methods for the business percentage: square footage of the business area divided by total home square footage, or number of rooms used for business divided by total rooms if the rooms are roughly equal in size.9Internal Revenue Service. Publication 587, Business Use of Your Home
The depreciation you claim, or could have claimed, reduces your overall basis. When you sell, that depreciation comes back as unrecaptured Section 1250 gain, taxed at a maximum rate of 25%.10Office of the Law Revision Counsel. 26 USC 1(h)(1)(E) – Maximum Capital Gains Rate The Section 121 home sale exclusion does not shelter this depreciation recapture, even if your total gain is otherwise below the exclusion limit.9Internal Revenue Service. Publication 587, Business Use of Your Home
If you used the simplified home office deduction (a flat rate per square foot), that method doesn’t generate depreciation, so there is nothing to recapture on sale.11Internal Revenue Service. Simplified Option for Home Office Deduction
Putting the Numbers Together
With every adjustment tracked, the math is straightforward. Take the gross selling price, subtract selling expenses (real estate commissions, attorney fees, title costs, staging and advertising you paid), and you have the net sale price. Subtract your adjusted basis from that. The result is your capital gain or loss.
A worked example. You bought a home for $300,000 and paid $6,000 in qualifying closing costs. You later spent $45,000 on a kitchen renovation and $15,000 on a new roof. Your adjusted basis is $366,000. You sell for $550,000, paying $33,000 in commissions and $2,000 in other selling costs. Your net sale price is $515,000, and your gain is $149,000. For a primary residence owned and used long enough, most or all of that gain may be excluded under Section 121 (up to $250,000 for single filers, $500,000 for joint filers who both meet the use test).12Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Records That Hold the Number Up
Basis calculations fall apart without documentation. The closing disclosure or settlement statement from your purchase is the foundation, listing every cost that fed the starting basis. Keep it as long as you own the home.
For every improvement, save the invoice or receipt showing date, amount, and a description of the work. Digital scans and photos are acceptable if they meet the same standards as paper.13Internal Revenue Service. What Kind of Records Should I Keep
The IRS requires you to keep property records until the statute of limitations expires for the tax year in which you sell. That’s at least three years after filing the return that reports the sale, or six years if you underreported income by more than 25%.14Internal Revenue Service. How Long Should I Keep Records Since most people hold a home for years or decades, the practical answer is to keep every improvement receipt until the sale is done and the statute has run. A shoebox of receipts from a $40,000 renovation can easily save $6,000 or more in capital gains tax.