What Are Capital Gains and How Do They Work in Real Estate?

Capital gains are the profits you make when you sell an asset for more than you paid for it. In real estate, this means the difference between your purchase price and your sale price. If you bought a house for $300,000 and sold it for $400,000, you have a $100,000 capital gain. This is the amount the Internal Revenue Service (IRS) considers taxable income.

Get Your Free Paycheck Tax Calculation Guide →

The IRS divides capital gains into two categories: short-term and long-term. Short-term capital gains occur when you own the property for one year or less before selling it. These gains are taxed at your ordinary income tax rate, which can range from 10% to 37% depending on your total income. Long-term capital gains apply when you own the property for more than one year. These gains receive preferential tax treatment, with rates of 0%, 15%, or 20% for most taxpayers, depending on your income level.

Understanding the difference matters significantly for your tax bill. According to 2023 tax data, long-term capital gains rates have saved taxpayers billions of dollars compared to short-term rates. For example, if you're in the 24% ordinary income tax bracket and have a $100,000 long-term gain, you might pay only $15,000 in federal tax instead of $24,000.

Your cost basis is another key concept. This is what you originally paid for the property, plus certain improvements you made. If you paid $300,000 for a home and spent $50,000 on a new roof and addition, your basis is $350,000. Improvements that add value to the home count toward basis. Regular maintenance like painting or roof repairs typically do not.

Practical Takeaway: Calculate your gain by subtracting your cost basis from your sale price. Keep all documentation of your purchase price and home improvements, as these records directly affect how much tax you owe. Organize receipts, contractor invoices, and closing documents in one place.

The Primary Residence Exclusion: A Major Tax Break

The IRS offers one of the largest tax breaks for homeowners through the primary residence exclusion. If you meet certain requirements, you can exclude up to $250,000 of capital gains from taxation if you're single, or $500,000 if you're married filing jointly. This means you don't pay any federal tax on this portion of your gain.

Pay Your Banana Republic Credit Card Bill Guide →

To use this exclusion, you must meet three tests. First, ownership test: you must have owned the home for at least two of the five years before the sale. Second, use test: you must have lived in the home as your primary residence for at least two of the five years before the sale. These two years don't need to be consecutive or the same years. Third, frequency test: you haven't used this exclusion on another home in the past two years. If you sold another home and claimed the exclusion within two years of this sale, you cannot claim it again.

This exclusion is powerful because it applies to most people who sell their primary home. A married couple who bought a house for $400,000 and sold it for $750,000 has a $350,000 gain. With the $500,000 exclusion, they owe zero federal capital gains tax on this sale. According to IRS statistics, over 90% of primary residence sales result in either no tax owed or significantly reduced tax because of this exclusion.

However, certain situations limit or eliminate this exclusion. If you've used the exclusion within the past two years, you generally cannot use it again. If you didn't live in the home for the required time period, you may not qualify. Some taxpayers who take advantage of the exclusion multiple times in a short period may face restrictions.

Practical Takeaway: If you're selling your primary residence, check whether you meet all three tests before calculating your tax liability. Keep a record of when you bought the home and how long you lived there. If you meet the requirements, this exclusion can eliminate most or all of your capital gains tax.

Investment Properties and the Difference in Tax Treatment

Capital gains taxes work very differently for investment properties like rental homes or vacation homes. You cannot use the primary residence exclusion for these properties, regardless of how much profit you make. Every dollar of gain is subject to capital gains tax. This is one of the biggest tax differences between selling your main home and selling an investment property.

Learn What Roadside Assistance Insurance Covers →

For investment properties, you must also account for depreciation recapture. This is a special tax calculation that applies to rental properties. When you own a rental property, the IRS allows you to deduct depreciation each year, which reduces your taxable rental income. Depreciation is a deduction of roughly 3.6% of the building's value annually over 27.5 years. If you claimed $100,000 in depreciation deductions over ten years of ownership, you must "recapture" that $100,000 when you sell. This means you add it back to your income and pay tax on it at a 25% rate, regardless of your ordinary income tax bracket.

Let's walk through an example. You bought a rental house for $300,000 and claimed $80,000 in depreciation over eight years. You sell it for $420,000. Your capital gain is $120,000 ($420,000 sale price minus $300,000 basis). However, $80,000 of this gain is depreciation recapture, which is taxed at 25%. The remaining $40,000 is long-term capital gain, taxed at 15% or 20% depending on your income. Your total tax could be around $27,000 ([$80,000 × 25%] + [$40,000 × 15%]).

Second homes and vacation properties that you occasionally use but don't rent out do not receive the primary residence exclusion either. The IRS considers these investment properties for tax purposes, even if you don't generate rental income from them.

Practical Takeaway: For investment properties, calculate the total depreciation you claimed during ownership. Add this back to your gain and apply the 25% recapture rate. Separate the remaining gain and apply long-term capital gains rates. Consider consulting with a tax professional about these calculations before selling a rental property.

State and Local Taxes on Real Estate Capital Gains

Federal capital gains tax is only part of your total tax bill. Most states also tax capital gains, and rates vary significantly by location. Nine states—Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire—do not tax capital gains or have limited capital gains taxes. If you live in one of these states or are moving to one, you avoid state capital gains tax entirely.

Best Buy Credit Card Customer Service Contact Guide →

Other states have rates that range from 1% to over 13%. California taxes capital gains at ordinary income rates, with a top rate of 13.3%. New York's rate tops out at 10.9%. Oregon reaches 9.9%. These state taxes are applied on top of federal taxes, significantly increasing your total tax burden. A $100,000 capital gain in California could result in $28,300 in combined federal and state taxes, compared to $15,000 in federal tax alone.

Some states offer their own exclusions or reduced rates for primary residences, though these are less common than the federal exclusion. A few states also have preferential capital gains rates for certain situations. Washington State, for example, has a capital gains tax of 7% on long-term gains from the sale of certain assets, but this doesn't apply to real estate sales currently, though laws change periodically.

Local taxes in some cities and counties add another layer. New York City, for example, has a local income tax that applies to capital gains. Some counties impose transfer taxes or excise taxes on real estate sales, which are different from capital gains taxes but still reduce your proceeds.

If you're considering relocating before selling a property, understanding state tax implications could save you substantial money. Some people establish residency in a low-tax state before selling a high-value property. However, this strategy requires genuine residency and can be complicated. The IRS and state tax authorities examine whether moves are legitimate based on factors like driver's license, voter registration, bank accounts, and where you actually spend time.

Practical Takeaway: Research your state's capital gains tax rate and any applicable local taxes before selling.