Searching ...
Real Estate Information
Sunday, January 12, 2025

How to Sell Your Home Without Losing to Capital Gains Taxes

Selling your primary residence is a significant milestone—emotionally, financially, and, yes, even tax-wise. If you’ve been nervously Googling questions like, “Do I pay tax if I sell my primary residence?” or “How does the section 121 home sale exclusion work?”—rest assured, you’re not alone. Figuring out capital gains taxes on real estate can feel like trying to crack a safe without the code. Good news, though—this guide has the code.

Understanding capital gains tax (and how to avoid it) starts with knowing the tax exclusions available to you. We’ll also tackle some special cases, like inherited homes and properties in trusts, to help ensure your sale doesn’t lead to an unexpected tax bill. This article not for second properties used for rental purposes or vacation homes, but principal residences.

A large brick suburban house with a well-maintained lawn is in the background. In the foreground, a red sign reads "Under Contract." There is a logo with "ez" on the left side of the image.

What is the 121 Home Sale Exclusion?

Here’s your golden ticket to keeping Uncle Sam at bay! The Section 121 home sale exclusion allows homeowners to exclude a significant portion of their capital gains on the sale of their principal residence. Maximum exclusion on profits depends on how you file.

  • For Single Filers: Up to $250,000 of your profit can be excluded from capital gains tax. 
  • For Married Couples Filing Jointly: That exclusion rises to $500,000

This exclusion means less money spent on your annual income taxes and more to reinvest, save, or just celebrate your next chapter.

Do I Qualify for the 121 Home Sale Exclusion?

This exclusion generally applies if you meet specific criteria. To unlock this exclusion, pass these three tests:

  1. Ownership Test: You must have owned the home for at least two years out of the last five years before selling.
  2. Use Test: You must have lived in the home as your primary residence for at least two of those five years.
  3. Frequency Test: You can’t have claimed the home sale exclusion on another property within the past two years.

These rules limit the exclusion benefits for people using the property as their primary home—not those flipping houses for profit. That’s why there are ownership requirements and use.

However, what if you are a service personnel or involved with another governmental assignment like foreign intelligence that has caused you to live away from your principal residence? The five-year test can be suspended if the duty station was over 50 miles from your main home and you lived in government housing under government orders.

A person in business attire uses a calculator on a table covered with financial documents. A pen rests nearby. The image features a hexagonal logo with "ez" on the left side.

Calculating Capital Gains on a Primary Residence 

Now, about that all-important profit. Here’s how you calculate your gain and potentially your tax liability:

  1. Start With Your Sale Price. This is the total amount your home sold for. 
  2. Add to Your Adjusted Basis. Your basis includes the original purchase price plus the cost of any significant home improvements.

For example:

  • Purchase Price: $200,000 
  • Major Improvements: $50,000 (new roof, kitchen upgrade, etc.) 
  • Adjusted Basis: $250,000 

Now, subtract the sale price plus any real estate commissions and closing costs paid at the time of sale.

  • Sale Price: $400,000 
  • Total Closing Costs: 8% ($32,000)
  • Gain: $400,000 – $250,000-$32,000 = $118,000 

For single and married filing, that $118,000 stays within the $250,000 exclusion limit. Congratulations—you owe zero taxes on the sale!

The only caveat is capital gains taxes are cumulative. If you’ve profited from other investment sales, it could lead you to owe Uncle Sam some money. That’s when consulting a tax professional and certified public accountant (CPA) becomes very helpful and a wise step.

It also doesn’t matter if the home carries a mortgage, as that is paid off as part of the home sale.

Special Cases and Situations That Trigger Taxes

Not everyone qualifies for the exclusion, and there are certain situations where capital gains tax might apply. Here are some scenarios that could mean part (or all) of your gain is taxable:

  • Your Gain Exceeds the Exclusion Limit: If your profit exceeds the $250,000/$500,000 thresholds, you’ll pay capital gains tax on the amount above the limit. 
  • It Wasn’t Your Primary Residence: If you didn’t live in the home for two of the past five years, you’re unlikely to qualify for the exclusion, though some special exemptions may apply (more on below). 
  • You Rented the Property or Claimed Depreciation: If you used your home as a rental or home office and claimed depreciation deductions, the IRS will tax the depreciation portion. 
  • You’ve Used the Exclusion Recently: If you claimed the home sale exclusion in the last two years, you’re not eligible again—at least not yet.

What If I Sold an Inherited Home? 

When selling an inherited home, the tax rules change a bit. While the Section 121 home sale exclusion of gain generally doesn’t apply, there’s a silver lining called the stepped-up basis.

The stepped-up basis adjusts the home’s value to its fair market value at the time of inheritance rather than the original purchase price. For example:

  • Inherited Basis (Fair Market Value at Time of Death): $300,000 
  • Sale Price: $320,000 
  • Gain: $320,000 – $300,000 = $20,000 

Instead of owing taxes on decades of appreciation, you’re only taxed on the $20,000 increase since you inherited it. This drastically reduces the potential tax burden on your inheritance!

What If I Rented the Home Part of the Time?

If you rented out your home, even if it’s just a room or the other unit in a duplex or triplex, the tax implications can become a bit more complicated. Although you may still benefit from the Section 121 Exclusion, there are certain factors you need to consider:

Use of the Property

To qualify for the exclusion, you must have used the entire property as your principal personal residence for at least two of the last five-year period before selling it. If you rented the home for an extended period before selling it, you may lose some or all of the exclusion benefits. However, if you lived in the home for at least two years within the five years leading up to the sale, you can still potentially benefit from the exclusion.

Prorating the Exclusion

If you rented the property but also lived in it part-time, you may be able to pro-rate your exclusion based on the time you lived there versus the time it was rented. Here’s how it works:

  • Example Scenario: Suppose you lived in the home for a two-year period and then rented it for three years. If you sell the home for a $300,000 gain, you could potentially exclude a portion of your gain proportionate to the time you occupied the home. In this case, you would exclude $120,000 (40% of $300,000) from taxable income. The remaining $180,000 would be subject to capital gains tax, depending on your total reported income and other factors, such as depreciation recapture if the home was used as a rental property.

Deprecreation Recapture

If the property was used as a rental or business property, any depreciation claimed must be “recaptured” and taxed at a maximum rate of 25%.

How Much Capital Gains Tax Will You Owe?

Let’s say your profits don’t meet the exclusion, and you have taxable gain to report. The actual amount of capital gains tax you’ll owe on the home sale depends on other factors in the individual taxpayer’s filing.

The good news is you’ll pay on the excess profit, not the full amount. So if you’re a married couple filing jointly, and the home sale profits were $600,000, you’ll only owe taxes on the $100,000 over amount.

Long-term capital gain tax rates fell at:

  • 0% for taxpayers in the lowest income brackets.
  • 15% for most middle-income taxpayers.
  • 20% for high-income taxpayers.

Does Putting Your Home in a Trust Avoid Capital Gains Tax? 

It depends on the type of trust. If you place your primary residence in a revocable living trust, the tax treatment typically remains the same—you, as the grantor, maintain ownership for tax purposes and can still qualify for the 121 home sale exclusion. 

However, for irrevocable trusts, ownership transfers to the trust, meaning you may lose eligibility for the home sale exclusion. Before going down the trust route for estate planning, consult a financial advisor or estate attorney to weigh the tax implications.

What About Unforeseen Circumstances? 

Life happens; sometimes, you must sell your home before meeting those two-year thresholds. The IRS allows for partial exclusions in these cases, whether it’s a job relocation, health issue, or another major life change like an extended duty assignment. The reduced exclusion is prorated based on how long you lived in the home.

For example, if you lived in the home for 12 months instead of 24 and met the criteria for a qualifying circumstance, you could exclude 50% of the standard limit amount ($125,000 for singles and $250,000 for couples filing jointly).

Reporting the Home Sale 

Form 1099-S reports all the proceeds from a real estate transaction to the IRS.

If you sell or exchange a residence for $250,000 or less, and provide a written certification confirming that the home was the principal residence, the gain from the sale can typically be excluded from gross income under Section 121. This means the exclusion covers the entire amount of the gain, provided all the requirements of Section 121 are met. For the seller, this certification ensures that the sale proceeds are handled efficiently without unnecessary tax obligations if the criteria for exclusion are satisfied. There’s no need to report the sale to the IRS.

When selling real estate above $250,000, further reporting the sale on your tax return is unnecessary if your entire profit falls within the exclusion thresholds. However, if part of your gain is taxable or the property doesn’t qualify for the exclusion, you’ll need IRS Form 8949 and Schedule D to report the sale for tax purposes.

Understanding Capital Gains Tax With Real Estate

For most homeowners, the Section 121 home sale exclusion means you won’t owe capital gains tax when selling your primary residence. These favorable tax rules are meant to help American homeowners. Still, tricky situations like high-value properties, inherited homes, rental properties, or properties in trusts require extra care. Accurate calculations and understanding real estate deductions can save you thousands.

If you’re planning to sell your home or are just curious about how capital gains affect real estate sales, don’t hesitate to ask a tax professional or financial advisor. You’ll be glad you did!

Start Your Home Search

Preston Guyton