# Taxes on Selling a House: What You Owe and How to Minimize It

By Opendoor Editorial Team | 2026-05-04


Understanding the taxes on selling a house can mean the difference between keeping thousands of dollars and handing them over to the IRS unnecessarily. Whether you're selling your primary residence, a rental, or an inherited property, the rules are different — and knowing which ones apply to you is the first step.

> \*\*Disclaimer:\*\* This article provides general information only and is not tax advice. Consult a CPA or tax professional for guidance specific to your situation.

The short answer: most homeowners selling a long-held primary residence owe little to no federal capital gains tax, thanks to a powerful IRS exclusion. But if you've owned the home for less than two years, held it as a rental, or made a very large profit, you could owe real money. Here's how it all works.

---

## Do You Pay Taxes When You Sell Your House?

It depends on two things: how much profit you made and whether you qualify for the primary residence exclusion.

If you sell your home for more than you paid for it, the profit is considered a **capital gain**. The IRS taxes capital gains — but not always. For most homeowners who have lived in their home for at least two of the past five years, the federal government allows you to exclude a substantial portion of that profit from taxation.

**The quick-answer checklist:**

- Owned the home for 2+ years? Check.
- Lived in it as your primary residence for 2 of the last 5 years? Check.
- Profit under $250,000 (single) or $500,000 (married filing jointly)? You likely owe zero federal capital gains tax.
- Profit exceeds those amounts, or you don't meet the ownership/use test? You may owe capital gains tax on the excess.

There's also a difference between **short-term** and **long-term** gains. Sell within a year of buying and your gain is taxed like ordinary income — potentially at 37%. Hold for more than a year and you qualify for much lower long-term capital gains rates.

---

## The Primary Residence Exclusion: $250,000/$500,000 Explained ([IRS Section 121](https://www.irs.gov/taxtopics/tc701))

The biggest tax break available to home sellers is the [**Section 121 exclusion**](https://www.irs.gov/taxtopics/tc701), sometimes called the home sale exclusion or primary residence exclusion. Under IRS rules, you can exclude up to:

- **$250,000** in profit if you file as single, head of household, or married filing separately
- **$500,000** in profit if you're married and file jointly

This exclusion does not mean you receive a deduction from your taxable income — it means that portion of your gain is simply not taxed at all.

### The 2-of-5 Year Rule: Ownership and Use Tests

To qualify, you must pass two separate tests:

1. **Ownership test:** You must have owned the home for at least 24 months (2 years) during the 5-year period ending on the sale date.
2. **Use test:** You must have lived in the home as your **principal residence** for at least 24 months during that same 5-year window.

The two years do **not** have to be consecutive. You could live in the home for 18 months, rent it out, move back in for 6 months, and still meet the use test — as long as the total reaches 24 months within the 5-year lookback period.

**Important timing rule:** You can only use this exclusion once every two years. If you claimed the [Section 121 exclusion](https://www.irs.gov/taxtopics/tc701) on a prior home sale within the past two years, you cannot use it again on a new sale.

### Partial Exclusion (Pro-Rated)

If you don't fully meet the 2-of-5 rule but had to sell due to specific qualifying reasons — a job relocation, health issues, or certain unforeseen circumstances — you may qualify for a **reduced (partial) exclusion** based on the fraction of the two-year requirement you did meet.

**Example:** If you lived in the home for 12 of the required 24 months before a job relocation forced a sale, you'd qualify for 50% of the exclusion — $125,000 single or $250,000 married filing jointly.

### Members of the Military and Intelligence Community

Active-duty military members and certain government employees can suspend the 5-year test period for up to 10 years while on qualified official extended duty. This means you may still qualify for the exclusion even after a long deployment that kept you away from the home.

---

## Capital Gains Tax Rates on Home Sales

When a taxable gain does exist — either because it exceeds the exclusion or you don't qualify — the rate you pay depends on how long you owned the home and your total taxable income.

### Short-Term Capital Gains (Held 1 Year or Less)

If you sell a property you owned for 12 months or fewer, the profit is taxed as **ordinary income**. That means your federal rate could be anywhere from 10% to 37%, depending on your income bracket. This is typically the most expensive tax scenario for home sellers.

### Long-Term Capital Gains (Held More Than 1 Year)

Hold the property for more than 12 months and you qualify for lower [**long-term capital gains rates**](https://www.irs.gov/taxtopics/tc409): 0%, 15%, or 20%, based on your taxable income.

**2025 Long-Term Capital Gains Tax Rates:**

**2026 Long-Term Capital Gains Tax Rates (inflation-adjusted):**

\*Sources: [IRS Rev. Proc. 2025-32](https://www.irs.gov/taxtopics/tc409); CNBC/Kiplinger 2026 inflation adjustments.\*

### The Net Investment Income Tax (NIIT)

High-income sellers may owe an additional **3.8% Net Investment Income Tax** on top of their capital gains rate. This applies if your modified adjusted gross income (MAGI) exceeds $200,000 (single) or $250,000 (married filing jointly). The NIIT applies to the lesser of your net investment income or the amount your MAGI exceeds the threshold.

---

## How to Calculate Your Taxable Gain

The taxable gain is not simply "what you sold it for minus what you paid." The IRS uses a more nuanced calculation based on your **adjusted cost basis**.

### The Formula

`Taxable Gain = Sale Price − Adjusted Cost Basis − Selling Costs`

And your adjusted cost basis is:

`Adjusted Cost Basis = Original Purchase Price + Capital Improvements − Depreciation Taken`

### Step-by-Step Example

Let's say:

- You bought your home in 2018 for **$300,000**
- You added a new kitchen and deck costing **$50,000**
- You sold in 2026 for **$680,000**
- Selling costs (agent commission, closing costs, staging) totaled **$30,000**

**Adjusted cost basis:** $300,000 + $50,000 = **$350,000**

**Net sale proceeds:** $680,000 − $30,000 = **$650,000**

**Gross gain:** $650,000 − $350,000 = **$300,000**

**If single:** $300,000 − $250,000 exclusion = **$50,000 taxable gain**

**If married filing jointly:** $300,000 − $500,000 exclusion = **$0 taxable gain** (fully excluded)

In the single-filer scenario, you'd owe long-term capital gains tax on $50,000. At a 15% rate, that's $7,500 in federal tax.

### What Counts as Your "Basis"?

Your original basis is typically the purchase price plus closing costs you paid at the time of purchase. This includes:

- Purchase price
- Title insurance
- Recording fees
- Legal fees paid at closing
- Transfer taxes you paid as the buyer

If you inherited the home, your basis is typically the **fair market value at the time of the decedent's death** (called a stepped-up basis — more on this in the FAQ). If you received it as a gift, your basis is generally the donor's original basis.

---

## What Selling Costs Can You Deduct?

Selling costs reduce your net proceeds, effectively lowering your taxable gain. These are deductible from the sale price — not from your income directly, but they shrink the gain dollar for dollar.

**Deductible selling costs include:**

- **Real estate agent commission** — typically 2.5%–3% of the sale price. This is usually the largest selling cost. (See our guide on the [agent commission you can deduct](/do-i-need-a-realtor-to-sell-my-house) when working with an agent.)
- **Closing costs paid by the seller** — such as escrow fees, settlement charges, deed preparation fees, and pro-rated property taxes
- **Home staging and professional photography** — if incurred specifically to sell the property
- **Advertising costs** — including listing fees on platforms
- **Legal fees** — attorney fees directly related to the sale
- **Title insurance** paid by the seller

**What is NOT deductible as a selling cost:**

- Routine maintenance (lawn care, cleaning) — these are not capital improvements
- Mortgage payoff — repaying your loan is not a cost of sale
- Moving expenses

Note the difference between **selling costs** (deducted from proceeds) and **capital improvements** (added to your basis). Both reduce your taxable gain, but they work differently in the calculation.

For a complete breakdown of what it costs to close a deal, see our guide on the [cost of selling by owner](/how-to-sell-a-house-by-owner).

---

## When Do You Actually Owe Taxes?

Most primary residence sellers owe nothing federally. Here are the scenarios where a tax bill does arise:

### 1. Your Profit Exceeds the Exclusion Amount

Single filers are exposed once gains exceed $250,000. Married couples are exposed above $500,000. In high-appreciation markets — San Francisco, Seattle, Miami — this is more common than many sellers expect.

**Example:** A couple bought in Los Angeles for $400,000 in 2012 and sell in 2026 for $1,200,000. Their gain is $800,000. After the $500,000 exclusion, $300,000 is taxable. At a 15% long-term rate, that's $45,000 in federal taxes.

### 2. You Haven't Met the 2-of-5 Year Rule

If you sell after owning for only 14 months and never qualified it as your primary residence, the entire gain is taxable — and at short-term rates if you've owned it less than a year.

### 3. You're Selling an Investment Property or Rental

Rental properties do not qualify for the Section 121 exclusion (unless you convert them to a primary residence first — see below). Additionally, you may owe [**depreciation recapture**](https://www.irs.gov/publications/p544) at a 25% tax rate on the portion of gain that corresponds to depreciation deductions you've taken over the years.

### 4. You're Selling a Second Home or Vacation Property

A second home that was never your primary residence is not eligible for the exclusion and is treated as a capital asset. Long-term rates apply if held more than a year.

### 5. You Sell at a Loss

If you sell your home for less than you paid (plus improvements), you generally **cannot** deduct that loss on your federal taxes for a personal residence. This is a personal loss, not a business loss. Investment property losses, however, may be deductible — consult a tax professional.

---

## State-Specific Capital Gains Taxes on Home Sales

Federal taxes are only part of the picture. Many states impose their own capital gains taxes. Here's how it looks in key Opendoor markets:

### Arizona

Arizona taxes capital gains as ordinary income at the state level. The top rate is **2.5%** (Arizona reduced its flat income tax rate significantly in recent years). The federal exclusion reduces your federal gain but Arizona calculates gain somewhat similarly, allowing adjustments.

### California

California is the most aggressive. The state **does not recognize a special long-term capital gains rate** — all capital gains are taxed as ordinary income at rates up to **13.3%** (the highest marginal rate). The federal $250k/$500k exclusion applies for federal purposes, but California follows the same exclusion for state purposes. However, any gain above the exclusion is taxed at your ordinary California income tax rate.

**Example:** A married couple in San Jose with $300,000 in taxable gain (after the $500k exclusion) could owe up to $39,900 in California state taxes alone (at 13.3%).

### Texas

**No state income tax.** Texas does not tax capital gains. Property taxes are high, but there is no state-level capital gains tax on home sales.

### Florida

**No state income tax.** Florida has no capital gains tax on home sales. Federal rules apply only.

### Georgia

Georgia taxes long-term capital gains at a flat **5.49%** rate (reduced from 5.75% as part of recent tax cuts). This applies to any gain not excluded under the federal Section 121 rules.

### Other Notable States

- **Oregon:** Up to 9.9% on capital gains taxed as ordinary income
- **Minnesota:** Up to 9.85%
- **New Jersey:** Up to 10.75%
- **Nevada, Wyoming, South Dakota:** No state income tax

Always confirm current state tax rates with a CPA or your state's department of revenue, as rates change.

---

## How to Minimize Taxes When Selling

### 1. Track Every Capital Improvement

Every dollar you add to your basis reduces your taxable gain. Keep records of major renovations: kitchen remodels, bathroom upgrades, roof replacements, additions, HVAC systems, landscaping, and similar capital improvements. Don't confuse improvements with repairs — a fresh coat of paint is maintenance; replacing all the windows is an improvement.

Pro tip: Ask your contractor for itemized receipts and file them in a dedicated folder for your home. When you sell years from now, this documentation directly reduces your tax bill.

### 2. Time Your Ownership to Cross the 2-Year Mark

If you're approaching the 2-year anniversary of moving in and are considering selling, waiting until that date passes can qualify you for the full Section 121 exclusion — potentially eliminating $250,000 to $500,000 in taxable gain entirely.

### 3. Coordinate the Sale With a Low-Income Year

If you're retiring, taking unpaid leave, or expect significantly lower income in a coming year, timing your sale to coincide can drop you into the 0% long-term capital gains bracket. In 2026, a married couple needs to keep taxable income below $98,900 to pay nothing on long-term gains.

### 4. Consider Converting a Rental to a Primary Residence

If you own a rental property with significant appreciation, moving into it as your primary residence for at least two years can eventually qualify you for the Section 121 exclusion — but watch for depreciation recapture, which is not eliminated by the exclusion. This strategy requires careful planning and ideally a tax advisor.

### 5. Use a 1031 Exchange for Investment Properties

If you're selling a rental or investment property, a **1031 like-kind exchange** allows you to defer capital gains taxes by reinvesting the proceeds into a new investment property of equal or greater value. The key rules:

- Must identify a replacement property within **45 days** of sale
- Must close on the replacement property within **180 days**
- A qualified intermediary must hold the funds — you cannot touch the money directly
- The new property must be "like-kind" (generally any real property held for investment or business use)

This is one of the most powerful tax deferral tools available for investors looking to sell a rental property without paying taxes immediately — a strategy frequently searched by investors. Note that 1031 exchanges defer tax, they do not eliminate it. When you eventually sell the replacement property without exchanging again, the accumulated deferred gain becomes taxable.

### 6. Selling Below Market Value: Know the Tax Implications

Selling a home below fair market value (e.g., to a family member) can trigger gift tax rules. The IRS may consider the difference between the sale price and fair market value as a gift, which counts against your lifetime gift tax exclusion. The buyer also inherits a lower basis, which could affect their taxes when they later sell.

### 7. If You Have a Tax Lien

You **can** sell a house with a tax lien, but the lien must typically be satisfied at or before closing. Federal and state tax liens attach to the property, and most buyers and title companies require a clear title. The proceeds from your sale can be used to pay off the lien, and any remaining equity is yours. Work with a title company experienced in lien resolution. (See our FAQ below for more on this topic.)

---

**Frequently asked questions**

---
*Originally published at [https://www.opendoor.com/articles/taxes-on-selling-a-house](https://www.opendoor.com/articles/taxes-on-selling-a-house)*

<!-- structured-data
{
  "@context": "https://schema.org",
  "@type": "Article",
  "@id": "https://www.opendoor.com/articles/taxes-on-selling-a-house",
  "mainEntityOfPage": "https://www.opendoor.com/articles/taxes-on-selling-a-house",
  "dateModified": "2026-05-07T13:19:12.339Z",
  "datePublished": "2026-05-04T00:00:00.000Z",
  "image": [
    "https://assets.ctfassets.net/bjlp9d7o6h1o/KW2nS8Byt6uYkj9xmfwYP/7ef8e2c4d7b3ad79ebbe6f08be32648a/Opendoor_Home_Move_Tax_Report_2024.pdf",
    "https://images.opendoor.com/source/s3/imgdrop-production/1afd9b4404c54cd5bd4d3737eec0d70d.jpg?preset=square-2048"
  ],
  "inLanguage": "en-US",
  "headline": "Taxes on Selling a House: What You Owe and How to Minimize It",
  "description": "Understand capital gains taxes when selling a house. Learn the $250k/$500k exclusion, how to calculate your gain, and strategies to minimize what you owe.",
  "author": [
    {
      "@type": "Person",
      "name": "Opendoor Editorial Team"
    }
  ]
}
-->