What Expenses Can Be Deducted from Capital Gains Tax?

The expenses that can be deducted from capital gains tax fall into three buckets: costs you paid to acquire the asset, capital improvements you made while you owned it, and expenses you paid to sell it. Acquisition costs and improvements increase your cost basis; selling expenses reduce the proceeds. Both moves shrink the taxable gain by the same dollar. If the asset is your primary home, a separate exclusion can wipe out up to $250,000 of gain ($500,000 for married couples filing jointly) on top of any basis adjustments.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

How the Taxable Gain Is Calculated

The formula is simple: sale proceeds, minus selling expenses, minus your adjusted basis, equals the taxable gain.2Office of the Law Revision Counsel. 26 U.S. Code 1001 – Determination of Amount of and Recognition of Gain or Loss Your adjusted basis starts with what you paid, goes up for qualifying costs added over the years, and goes down for items like depreciation you claimed.3Office of the Law Revision Counsel. 26 U.S. Code 1016 – Adjustments to Basis

Holding period sets the rate. Own the asset more than a year and the gain is long-term, taxed at 0%, 15%, or 20% depending on your income. Sell within a year and you pay ordinary income rates instead.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses The rate matters, but so does everything you can legitimately add to basis or subtract from proceeds before the rate is applied.

Purchase Costs That Get Added to Basis

Federal law defines basis as the cost of the property, meaning the full amount paid to complete the transaction.5Office of the Law Revision Counsel. 26 USC 1012 – Basis of Property-Cost For real estate, that reaches well past the purchase price. Costs at closing that increase basis include:

  • Title search fees and title insurance
  • Recording fees to document the deed
  • Transfer taxes you paid as the buyer
  • Legal fees for reviewing or defending title
  • Survey costs to map boundaries

If you reimbursed the seller for property taxes that were legally imposed on them, that reimbursement is also part of your basis. For stocks and other securities, brokerage commissions and transaction fees paid on the buy side get added to basis the same way.6eCFR. 26 CFR 1.1012-1 – Basis of Property

Special assessments from local government for permanent infrastructure — new sidewalks, water hookups, road paving — also increase basis rather than being deductible in the year paid. Maintenance or interest components of the same assessment can be deducted as taxes instead.7Internal Revenue Service. Publication 551 – Basis of Assets

Capital Improvements Made During Ownership

Improvements are usually the largest basis adjustment for anyone who has owned a home for years. To qualify, the work must add value, extend the property’s useful life, or adapt it to a new use, and its useful life must be more than one year.7Internal Revenue Service. Publication 551 – Basis of Assets Because federal law treats these as capital expenditures rather than current expenses, the cost cannot be deducted in the year paid; it is capitalized into basis and recovered when you sell.8Office of the Law Revision Counsel. 26 USC 263 – Capital Expenditures

The IRS lists concrete examples of qualifying work:7Internal Revenue Service. Publication 551 – Basis of Assets

  • Putting an addition on your home
  • Replacing an entire roof
  • Rewiring the house
  • Installing central air conditioning
  • Paving the driveway

Adding a deck, replacing plumbing systems, and major landscaping fit the same test.

Repairs Do Not Count

Routine repairs and maintenance keep the property in its current condition rather than adding value or extending life, so they do not adjust basis. Painting a room, fixing a faucet, patching cracks: none of these help you at sale time. The IRS is explicit that amounts paid for incidental repairs or maintenance deductible as business expenses cannot be added to basis.7Internal Revenue Service. Publication 551 – Basis of Assets For a personal residence, repair costs typically produce no tax benefit at all, since they are neither deductible currently nor added to basis.

De Minimis Safe Harbor for Rental and Business Property

If the property is rental or business use, a de minimis safe harbor election lets you deduct small purchases outright instead of capitalizing them. The ceiling is $5,000 per item with audited financial statements, or $2,500 per item without.9Internal Revenue Service. Tangible Property Final Regulations Amounts deducted under the safe harbor are not added to basis.

Selling Expenses That Reduce Your Proceeds

At the sale end, certain costs come off the sale price to determine the amount realized. The IRS spells them out for home sales:10Internal Revenue Service. Publication 523 – Selling Your Home

  • Sales commissions, usually the biggest single item
  • Advertising costs to market the property
  • Legal fees tied to closing
  • Seller-paid loan charges or points that would normally be the buyer’s
  • Transfer and stamp taxes paid by the seller

Staging, escrow fees, and other charges directly tied to completing the sale reduce the amount realized as well. For securities, the commission on the sell side plays the same role, lowering the proceeds figure you report.

The Primary Residence Exclusion

If the asset is your home, the biggest tax break is not a basis adjustment at all. Under Section 121, a single filer can exclude up to $250,000 of gain and a married couple filing jointly up to $500,000.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence To qualify, you must have owned and used the property as your main home for at least two of the five years before the sale, and you cannot have used the exclusion on another sale within the past two years. For the full $500,000, at least one spouse must meet the ownership test and both must meet the use test.

Selling before hitting two years because of a job move, health issue, or certain unforeseen circumstances triggers a prorated exclusion based on the fraction of the two-year period you actually met the tests.11Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence Gain attributable to periods when the property was not your primary residence — for example, years you rented it out before moving in — is not eligible for the exclusion.

Depreciation Recapture Cuts the Other Way

Rental and business property owners face a mirror-image adjustment. Depreciation you claimed during ownership reduced your basis year after year, so at sale the gain is larger than it looks against the original purchase price.3Office of the Law Revision Counsel. 26 U.S. Code 1016 – Adjustments to Basis The portion of gain equal to prior depreciation is unrecaptured Section 1250 gain on real property, taxed at up to 25% rather than the standard long-term rates. Anything above that is taxed at the usual 0%, 15%, or 20%. The recapture is reported in Part III of Form 4797.12Internal Revenue Service. Instructions for Form 4797 – Sales of Business Property

A rental bought for $300,000, with $50,000 in claimed depreciation, and sold for $400,000, has an adjusted basis of $250,000 and a total gain of $150,000. The first $50,000 is taxed at the 25% recapture rate; the remaining $100,000 gets long-term capital gains treatment.

Documentation You Need to Keep

Every deduction depends on records. Hold onto:

  • The closing disclosure or HUD-1 from the original purchase, showing price and acquisition fees
  • Invoices, contracts, and canceled checks for each capital improvement, with dates and descriptions
  • The closing statement from the sale, showing commissions, transfer taxes, and other seller-paid costs

Keep property records until the statute of limitations runs on the return that reports the sale. The general period is three years from filing, extending to six if you underreported income by more than 25% of gross income. If you received the property in a tax-free exchange, keep records on both the old and the replacement property until you eventually sell the replacement.13Internal Revenue Service. How Long Should I Keep Records Without the paperwork, the deductions on paper are the deductions you lose in an audit.