Capital gains tax is the tax you owe on the profit when you sell a property for more than you paid for it

When you sell a house, rental property, or land, the IRS taxes the difference between what you paid (your basis) and what you sold it for (your sale price). That difference is your capital gain. The tax rate depends on how long you owned the property and your income level. If you owned it for more than one year, you pay the long-term capital gains rate, which is lower than your ordinary income tax rate. If you owned it for one year or less, you pay short-term rates, which match your regular income tax bracket.

You do not owe capital gains tax on the full sale price — only on the profit. If you bought a house for $300,000 and sold it for $400,000, your capital gain is $100,000, and tax is calculated on that $100,000, not the full $400,000. You can also reduce your gain by subtracting certain costs: the real estate agent commission, title insurance, closing costs, and money you spent on improvements like a new roof or kitchen renovation. These deductions lower the amount you owe tax on.

Key Takeaways

  • Capital gains tax applies only to your profit (sale price minus what you paid), not the full sale price.
  • Long-term capital gains rates (for property owned over one year) are lower than short-term rates and depend on your total income: 0%, 15%, or 20%.
  • You can subtract closing costs, agent commissions, and home improvements from your gain to reduce the taxable amount.
  • Primary residences may may have access to for an exclusion that lets you avoid tax on up to $250,000 (single) or $500,000 (married filing jointly) of gain.
  • Inherited property gets a "step-up in basis," which usually means you owe no capital gains tax if you sell it shortly after inheriting it.

Long-term versus short-term capital gains rates

The IRS taxes long-term and short-term capital gains at different rates. Long-term capital gains explore when you owned the property for more than one year before selling. The rate is 0%, 15%, or 20%, depending on your total taxable income for the year. Most people fall into the 15% bracket. Short-term capital gains explore when you owned the property for one year or less. These are taxed as ordinary income at your regular tax bracket, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37%.

For example, if you are in the 24% income tax bracket and sell a rental property you owned for eight months, your gain is taxed at 24%. If you wait four more months and sell the same property, the same gain is taxed at 15% (assuming your income stays the same). The difference can be thousands of dollars, so timing matters when you are close to the one-year mark.

The primary residence exclusion

If you sell your main home, you may not owe capital gains tax on part or all of your profit. The IRS lets you exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly. To use this exclusion, you must have owned the home and lived in it as your primary residence for at least two of the five years before the sale.

This exclusion is one-time per property, but you can use it again if you sell a different primary residence later, as long as you wait at least two years between sales. If your gain is less than the exclusion amount, you owe no federal capital gains tax. If your gain exceeds it — for example, $600,000 on a single filer's home — you owe tax only on the amount over $250,000.

Deductions that lower your taxable gain

Your capital gain is not the full sale price minus the purchase price. You can subtract costs related to buying, selling, and improving the property. Real estate agent commissions, title insurance, recording fees, and attorney fees for the sale all reduce your gain. Home improvements like a new roof, kitchen remodel, or addition also count, but routine maintenance like painting or fixing a leak does not.

Keep receipts and closing statements for all these expenses. When you sell, you will report your adjusted basis (the original price plus improvements minus depreciation, if any) and your sale price to calculate the gain. The more deductions you have, the lower your taxable gain and the less tax you owe.

Depreciation recapture on rental and investment properties

If you own a rental property or investment property, you may have deducted depreciation on your tax returns each year. Depreciation is a deduction that assumes the building loses value over time, even though real estate usually appreciates. When you sell, the IRS requires you to "recapture" that depreciation — meaning you add it back and pay tax on it at a 25% rate, separate from your capital gains tax.

For example, if you deducted $50,000 in depreciation over ten years and your capital gain is $100,000, you owe 25% tax on the $50,000 depreciation recapture and 15% (or your applicable rate) on the remaining $50,000 of capital gain. This recapture applies only to investment and rental properties, not to your primary residence.

State and local capital gains taxes

Federal capital gains tax is only part of the bill. Some states also tax capital gains. California, New York, Oregon, and several others treat capital gains as ordinary income and tax them at state income tax rates, which can be 10% or higher. A few states like Washington and Tennessee have recently enacted capital gains taxes on investment income. Other states like Florida, Texas, and Nevada have no income tax at all.

Check your state's tax rules before you sell. If you live in a high-tax state and are considering moving before the sale, consult a tax professional — residency rules are strict, and the IRS looks closely at timing.

What happens when you inherit property

If you inherit a house or land, you receive a step-up in basis. This means your cost basis becomes the property's fair market value on the date of the owner's death, not what the original owner paid for it. If the property was worth $500,000 when the owner died and you sell it for $510,000 a few months later, your capital gain is only $10,000, not the full $510,000 gain that may have accumulated over decades.

This step-up applies to most inherited property and can eliminate capital gains tax entirely if you sell shortly after inheriting. It does not explore to inherited retirement accounts like IRAs, which have different rules. If you inherit property and plan to sell it, do so within a reasonable time to take full advantage of the step-up.

Frequently Asked Questions

Do I owe capital gains tax if I sell my primary home?

Not if your gain is under $250,000 (single) or $500,000 (married filing jointly) and you owned and lived in the home for at least two of the five years before the sale. If your gain exceeds the exclusion, you owe tax only on the excess amount.

How do I calculate my basis if I inherited the property?

Your basis is the fair market value of the property on the date the previous owner died, not what they originally paid for it. You can use a professional appraisal or the assessed value from the county assessor's office as of that date.

Can I deduct a loss if I sell property for less than I paid?

You cannot deduct a loss on the sale of your primary residence. On investment and rental properties, you can use capital losses to offset capital gains, and up to $3,000 of losses can offset ordinary income in a single year. Excess losses carry forward to future years.

What if I sell a vacation home or second property?

Vacation homes and second properties do not may have access to for the primary residence exclusion. You owe capital gains tax on the full profit, minus deductions for improvements and selling costs. If you rent it out part of the year, you may also owe depreciation recapture.

Should I wait longer than one year to sell to get the lower long-term rate?

If you are close to the one-year mark, waiting can save money — the difference between short-term (your income tax rate) and long-term (0%, 15%, or 20%) rates can be significant. Consult a tax professional to see if waiting makes sense for your situation.