How to Calculate Property Capital Gains Tax: Basis and Exclusions

To calculate property capital gains tax, subtract your adjusted cost basis from your net sale proceeds, apply any exclusion you qualify for, and multiply what remains by the tax rate that matches your holding period and taxable income. For a home sold in 2026, a single filer pays 0% on long-term gains if total taxable income stays below $49,450, and a married couple filing jointly gets the 0% rate up to $98,900. The math is short. Gathering the right numbers is the work.

Step 1: Build Your Adjusted Cost Basis

Your basis starts with the original purchase price plus certain closing costs. IRS Publication 523 lets you fold in legal fees, recording fees, survey fees, transfer taxes, title insurance, and charges for installing utility services.1Internal Revenue Service. Publication 523 – Selling Your Home

Add the cost of capital improvements from there. An improvement adds meaningful value, extends the home’s useful life, or adapts it to a new use. A kitchen remodel, a new roof, an added bathroom — those count. Routine maintenance like patching drywall or snaking a drain does not.1Internal Revenue Service. Publication 523 – Selling Your Home Federal tax law allows the upward adjustment for expenditures properly chargeable to your capital account.2Office of the Law Revision Counsel. 26 U.S. Code 1016 – Adjustments to Basis

One reduction catches people off guard. If you claimed the federal residential clean energy credit for solar panels or similar upgrades, reduce your basis by the credit amount.3Office of the Law Revision Counsel. 26 U.S.C. 25D – Residential Clean Energy Credit Spent $30,000 on solar and received a $9,000 credit? Only $21,000 gets added.

Keep receipts for every improvement. A higher basis means a smaller taxable gain, and a folder of documented renovations can save you thousands at closing time.

Step 2: Calculate Your Net Proceeds

Net proceeds are the sale price minus every cost you paid to complete the transaction. Start with the gross figure on your closing statement and subtract the selling expenses Publication 523 allows:

  • Sales commissions paid to the listing or buyer’s agent
  • Advertising fees you covered directly
  • Legal fees for document preparation and closing
  • Transfer or stamp taxes you paid as the seller
  • Other closing costs, including mortgage points or loan charges you covered on the buyer’s behalf
1Internal Revenue Service. Publication 523 – Selling Your Home

These matter more than most sellers realize. On a $500,000 sale, commissions alone can run $25,000. Every dollar documented here comes off before the IRS sees a gain.

Step 3: Subtract Basis From Proceeds

Net proceeds minus adjusted basis equals your capital gain. Say you bought for $250,000, added $40,000 in improvements, and sold for $450,000 with $30,000 in selling expenses. Net proceeds are $420,000. Adjusted basis is $290,000. The gain is $130,000.

If the number goes negative, you have a capital loss. Investors selling rental or business property can generally use that loss against other gains. On a personal residence, though, the IRS does not allow a deduction.4Internal Revenue Service. Topic No. 409 – Capital Gains and Losses Federal law limits individuals to business losses, investment losses, and certain casualty or theft losses.5Office of the Law Revision Counsel. 26 U.S.C. 165 – Losses A loss on a home you lived in falls outside those categories and simply disappears.

Step 4: Apply the Primary Residence Exclusion

This is where most homeowners see the bill shrink or disappear. If you owned and lived in the home as your primary residence for at least two of the five years before the sale, you can exclude up to $250,000 of gain from your income. Married couples filing jointly can exclude up to $500,000, as long as both spouses meet the use requirement and at least one meets the ownership requirement.6Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence

Applied to the example above, a single filer with a $130,000 gain owes nothing. A married couple with a $600,000 gain subtracts the $500,000 exclusion and pays tax on only $100,000.

The two years of use do not have to be continuous. Twelve months in the home, a year away, then another twelve months back before selling still qualifies. The exclusion is available only once every two years.

Partial Exclusion When You Sell Early

Selling before hitting the two-year mark can still qualify for a reduced exclusion if the sale was driven by a job move, a health condition, or certain unforeseen events. Publication 523 lists the qualifying triggers:

  • A job relocation where the new workplace is at least 50 miles farther from the home than the previous workplace was
  • A health-related move recommended by a doctor, or a move to get or provide medical care for yourself or a qualifying family member
  • Unforeseen events, including death, divorce, natural disaster, job loss, or multiple births from the same pregnancy
1Internal Revenue Service. Publication 523 – Selling Your Home

The partial exclusion is prorated. Divide the months or days you used the home as your primary residence by 24 months or 730 days, and multiply that fraction by the full $250,000 or $500,000. A single filer who lived in the home 15 months before a qualifying job move gets 15/24 × $250,000, or $156,250.

Step 5: Apply the Capital Gains Tax Rate

How long you owned the property controls the rate schedule. Property held for one year or less produces a short-term gain, taxed at ordinary income rates that can reach 37%. Property held more than a year produces a long-term gain, taxed at the lower rates set by federal law.7Office of the Law Revision Counsel. 26 U.S.C. 1 – Tax Imposed

For 2026, single filers pay:

  • 0% on long-term gains with taxable income up to $49,450
  • 15% from $49,451 to $545,500
  • 20% above $545,500

Married couples filing jointly pay:

  • 0% up to $98,900
  • 15% from $98,901 to $613,700
  • 20% above $613,700
8Internal Revenue Service. Revenue Procedure 2025-32

These thresholds run on your total taxable income for the year, not just the gain. Salary, retirement income, and other earnings stack under the gain, so a large sale can push you across a bracket line.

The 3.8% Net Investment Income Tax

Higher earners face an additional 3.8% surtax on investment income, including gains from real estate sales. The tax kicks in when modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly.9Office of the Law Revision Counsel. 26 U.S.C. 1411 – Imposition of Tax The 3.8% applies to the lesser of your net investment income or the amount by which your modified AGI exceeds the threshold. Those thresholds are not indexed for inflation and have not moved since 2013.

Take a married couple with $300,000 in modified AGI and a $100,000 reportable gain. The NIIT applies to the lesser of the $100,000 gain or the $50,000 by which their income exceeds $250,000. The surtax runs 3.8% of $50,000, or $1,900, on top of the regular capital gains tax. Many sellers miss this line when estimating what they owe.

Depreciation Recapture

If you claimed depreciation on the property, whether as a rental, a home office, or a mixed-use property, part of the gain is taxed at a higher rate. The IRS treats previously deducted depreciation as a separate slice of gain taxed at a maximum federal rate of 25%, regardless of the long-term bracket that otherwise applies.7Office of the Law Revision Counsel. 26 U.S.C. 1 – Tax Imposed

The part that surprises people: the IRS reduces your basis by depreciation whether or not you actually deducted it. The standard is depreciation “allowed or allowable.” Skipping the deduction does not protect you from recapture.

For sellers who ran a home office inside the main house, the Section 121 exclusion still applies to the full gain on the home. Depreciation claimed on that office space after May 1997 gets recaptured at the 25% rate anyway, even when the rest of the gain is fully excluded. If the office sat in a separate structure, such as a detached garage, you may also need to allocate a portion of the gain to that business-use space, and the exclusion may not cover the allocated portion.

Different Rules for Inherited and Gifted Property

How you acquired the property changes your starting basis entirely. The purchase-price basis described above does not apply when the home came to you by inheritance or gift.

Inherited Property

When you inherit real estate, your basis is the property’s fair market value on the date of the original owner’s death, not what they originally paid.10Office of the Law Revision Counsel. 26 U.S.C. 1014 – Basis of Property Acquired From a Decedent This “stepped-up basis” can erase decades of appreciation. If a parent bought a home for $80,000 in 1985 and it was worth $500,000 at their death, your basis is $500,000. Selling for $520,000 leaves $20,000 in gain, not $440,000.

Gifted Property

Property received as a gift from a living person uses the donor’s adjusted basis, often called a “carryover basis.” You inherit their embedded gain.11Office of the Law Revision Counsel. 26 U.S.C. 1015 – Basis of Property Acquired by Gifts and Transfers in Trust Same $80,000 purchase, $20,000 in improvements, then a gift to you during the parent’s lifetime: your basis is $100,000, and a sale at $500,000 produces a $400,000 gain.

The tax gap between inheriting and receiving during life can be large. Holding appreciated property until death, rather than gifting it, generally leaves the recipient in a far better position.

Deferring Gains on Investment Property With a 1031 Exchange

If you are selling investment or business property rather than a personal residence, a like-kind exchange under Section 1031 lets you defer the entire capital gains tax by rolling the proceeds into similar real property held for productive use in a business or for investment. Personal residences do not qualify, and property held primarily for resale, such as flipping inventory, does not qualify either.12Office of the Law Revision Counsel. 26 U.S.C. 1031 – Exchange of Real Property Held for Productive Use or Investment You have 45 days from the transfer of the relinquished property to identify replacement property in writing, and 180 days from that same date to close. Miss either deadline and the full gain becomes taxable immediately. The exchange defers the tax rather than eliminating it: basis carries over into the replacement property, so the gain surfaces when that property is later sold without another exchange.

Reporting the Sale

Even a sale fully covered by the Section 121 exclusion may need to be reported. When a settlement agent issues Form 1099-S showing the gross proceeds, the IRS expects to see the transaction on your return. The settlement agent can skip the 1099-S only if you provide a written certification that the sale qualifies for the full exclusion.

Reportable sales go on Form 8949, which lists the sale price, adjusted basis, and any adjustments, including the Section 121 exclusion. Totals flow to Schedule D.13Internal Revenue Service. Instructions for Form 8949 Depreciation recapture is reported on Form 4797. A 1031 exchange goes on Form 8824. Matching the situation to the correct form is one of the more common places sellers slip up.