How to Calculate Your Home’s Cost Basis for Taxes

To calculate your house’s cost basis for taxes, start with what you paid for the home, add qualifying closing costs and every capital improvement you’ve made, then subtract any depreciation claimed for business or rental use, any casualty-loss deductions or insurance reimbursements, and any residential energy credits you took. The result is your adjusted basis, and it’s the number you subtract from the net sale price to figure your taxable gain.

Get this number wrong in either direction and it costs you: overstate the basis and you risk penalties for underreporting; understate it and you overpay the IRS.

Your Starting Basis When You Bought the Home

Starting basis is more than the contract price. You add the settlement costs tied to acquiring the property, but not the costs of getting the mortgage. The rough test: would you have paid this even if you’d bought the house in cash? If yes, it goes into basis.

Closing costs you add to basis:1Internal Revenue Service. Publication 551 (12/2025), Basis of Assets

  • 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

Loan-related charges are out. Points, loan origination fees, mortgage insurance premiums, and lender-required appraisals don’t increase your basis. Points get their own tax treatment: generally deducted over the life of the loan, or deducted in the year paid when a main-home purchase meets certain requirements.1Internal Revenue Service. Publication 551 (12/2025), Basis of Assets

One trap worth flagging: 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

If the home came to you some other way, the starting number is set by a different rule, and the difference can be tens of thousands of dollars.

Inherited

Inherited property gets a stepped-up basis equal to the home’s fair market value on the date of the previous owner’s death. What the original owner paid decades ago no longer matters.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. The same step-up applies to property held in a revocable living trust, because the trust’s assets are treated as part of the grantor’s estate.

Gifted

A gifted home carries the donor’s adjusted basis over to you: their cost plus their improvements, minus any depreciation they claimed. You inherit their built-in gain.4Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust

A parent who bought a house for $80,000 that’s now worth $400,000 leaves an heir with a $400,000 basis and no gain on immediate sale. Gift the same house during life and the recipient has an $80,000 basis and a $320,000 gain waiting.

Special rule: if the home’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 figure any gain but the lower fair market value to figure any loss. Sell for a price between the two 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 Transfer

Transfers between spouses as part of a divorce are tax-free at the time of transfer, and the receiving spouse takes the other’s adjusted basis, just like a gift. The transfer must occur within one year of the divorce or be directly related to its ending.5Office of the Law Revision Counsel. 26 USC 1041 – Transfers of Property Between Spouses or Incident to Divorce

In a buyout, the buying spouse’s new basis is their existing half of the adjusted basis plus the buyout amount. If the home’s adjusted basis is $300,000 and you pay your ex $250,000 for their half, your basis becomes $150,000 plus $250,000, or $400,000.

Built Yourself

For a home you built, basis equals the land cost plus what you actually spent to build: contractors, materials, architect fees, permits, utility connections, construction-related legal fees, and interest on construction loans during the build.6Internal Revenue Service. Publication 523 (2025), Selling Your Home The value of your own labor doesn’t count. Hours you spent framing walls or running plumbing add nothing to basis; only cash out the door does.1Internal Revenue Service. Publication 551 (12/2025), Basis of Assets

Improvements That Raise Basis

Every capital improvement you make while you own the home adds to your basis. A capital improvement adds value, extends the home’s useful life, or adapts it to a new use. A repair just keeps the home in the condition it’s already in.

Improvements the IRS accepts include:6Internal Revenue Service. Publication 523 (2025), Selling Your Home

  • Additions such as bedrooms, bathrooms, decks, garages, and porches
  • Systems: central air, heating, wiring, security, water filtration
  • Exterior work: new roof, siding, storm windows, satellite dish
  • Grounds: landscaping, driveways, fences, retaining walls, pools
  • Interior: kitchen modernization, flooring, built-in appliances, fireplaces
  • Insulation and plumbing: attic or wall insulation, septic systems, water heaters

Ordinary repairs (painting, patching, fixing leaks, replacing broken hardware) don’t count on their own. But if the repair happens as part of a larger renovation, the whole job counts. Replacing a few cracked panes is a repair; replacing those same panes as part of a whole-house window replacement is an improvement.6Internal Revenue Service. Publication 523 (2025), Selling Your Home

An improvement that’s no longer part of the home also drops out. Wall-to-wall carpet you installed ten years ago and then ripped out to install hardwood no longer counts. Only the hardwood is in your basis now.

Events That Lower Basis

Three things force your basis down, whether you tracked them or not.

Depreciation on business or rental use. If 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 your basis by the amount you could have deducted, not just what you did.7Internal Revenue Service. Publication 551 (12/2025), Basis of Assets – Section: Decreases to Basis Skipping the deduction doesn’t save the basis.

The simplified home office method is an exception. Because it doesn’t generate a depreciation deduction, there’s no basis reduction and nothing to recapture when you sell.8Internal Revenue Service. Simplified Option for Home Office Deduction

When you sell, the depreciation you claimed (or could have) comes back as unrecaptured Section 1250 gain, taxed at a maximum rate of 25%.9Office of the Law Revision Counsel. 26 USC 1(h)(1)(E) – Maximum Capital Gains Rate The home sale exclusion does not shelter that portion.10Internal Revenue Service. Publication 587, Business Use of Your Home

Casualty losses. If your home was damaged and you took a casualty-loss deduction, reduce your basis by the amount deducted plus any insurance reimbursement. You’ve already recovered that value, so it can’t reduce your gain a second time.7Internal Revenue Service. Publication 551 (12/2025), Basis of Assets – Section: Decreases to Basis

Energy credits. If you claimed the Residential Clean Energy Credit for solar panels, a geothermal heat pump, or similar equipment, reduce your basis by the credit amount.11Office of the Law Revision Counsel. 26 USC 25D – Residential Clean Energy Credit Nontaxable utility subsidies for energy conservation reduce basis the same way.

Putting the Numbers Together

Once basis is settled, the gain calculation is straightforward. Take the selling price, subtract selling costs (commissions, attorney fees, title costs, seller-paid staging and advertising), and you have the net sale price. Subtract your adjusted basis. What’s left is your capital gain.

An example. You bought for $300,000 and paid $6,000 in qualifying closing costs. Later you spent $45,000 remodeling the kitchen 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. Net sale price is $515,000. Gain is $149,000.

Why Basis Still Matters When the Sale Is Excluded

Most homeowners won’t owe capital gains tax on a primary residence because Section 121 lets single filers exclude up to $250,000 of gain and joint filers up to $500,000, if the ownership and use tests are met.12Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence That doesn’t make basis optional. Gain above the exclusion is taxable, depreciation recapture is taxable regardless, and if the IRS ever questions your reported gain the burden of proving basis is yours. A pristine set of records is what makes the exclusion work in practice.

Records to Keep

Basis falls apart without documentation. Keep the closing disclosure or settlement statement from your purchase for as long as you own the home. For every improvement, save the invoice or receipt with the date, amount, and description of the work. Digital scans and photos are fine as long as they meet the usual recordkeeping standards.13Internal Revenue Service. What Kind of Records Should I Keep

Property records must be kept until the statute of limitations runs on the tax year of the sale, which in practice means at least three years after filing that return, or six years if income was underreported by more than 25%.14Internal Revenue Service. How Long Should I Keep Records Since most people own their home for years or decades before selling, the safe move is to hold improvement records until well after the sale closes. A shoebox from a $40,000 renovation can easily be worth $6,000 in tax savings.