Opendoor

Do I Pay Capital Gains When I Sell My House?

Reading Time — 10 minutes

Last updated: July 8, 2026

Author

Opendoor Editorial Team

Our team combines AI-powered research with hands-on expertise from licensed real estate professionals to ensure that every article is accurate, clear, and up-to-date.

Contact: press@opendoor.com

Exterior of a suburban single-family home with a front lawn

Do I Pay Capital Gains When I Sell My House? A Seller's Guide

Most homeowners selling a primary residence do not pay federal capital gains tax on the sale — the answer depends on how long you owned and lived in the home and how much profit you made. Under IRS Section 121, a single filer can exclude up to $250,000 of gain and a married couple filing jointly up to $500,000, as long as they meet the ownership and use tests (IRS Topic 701). If your profit is below the exclusion and you meet the tests, you owe nothing. If it isn't, you owe capital gains tax only on the portion above the exclusion. This article is general information, not tax advice. Consult a CPA for guidance specific to your situation.

Key Takeaways

  • Most sellers of a primary residence pay $0 in federal capital gains tax because of the IRS Section 121 exclusion — up to $250,000 single or $500,000 married filing jointly (IRS Pub 523).
  • To qualify, you must have owned and lived in the home for at least 2 of the past 5 years — the ownership and use tests. The months don't have to be consecutive (IRS Topic 701).
  • If your gain exceeds the exclusion, the excess is taxed at the long-term capital gains rate — 0%, 15%, or 20% — when you owned the home more than a year. Owned a year or less, and the gain is taxed at ordinary-income rates.
  • Partial exclusions apply for job relocation, health reasons, unforeseen circumstances, divorce, and military duty — even when you don't hit the full 2-year use test.
  • Federal is only half the story. State capital gains tax varies: 9 states have no state capital gains tax; California treats all gains as ordinary income. Talk to a CPA who knows your state.

The Section 121 Exclusion: $250,000 / $500,000, Explained

Section 121 of the Internal Revenue Code lets most sellers walk away tax-free. The exclusion is an amount of gain that is not taxed at all — not a deduction, not a deferral (IRS Pub 523). Three conditions apply:

  • Ownership test. You owned the home for at least 24 months during the 5-year period ending on the sale date.
  • Use test. You lived in the home as your main residence for at least 24 months during the same 5-year period.
  • Look-back test. You did not exclude gain from the sale of another home during the 2-year period ending on the sale date.

Meet all three and you can exclude up to $250,000 of gain (single, head of household, married filing separately) or $500,000 (married filing jointly). Miss any one and you either fall back to a partial exclusion or owe capital gains tax on the full gain (IRS Pub 523).

Ownership Test

Did you own the home for at least 24 months during the 5-year window ending on the sale date? The months don't have to be consecutive (IRS Topic 701). For joint filers, only one spouse needs to satisfy the ownership test (IRS Pub 523).

Use Test

Did you live in the home as your main residence for at least 24 months during the same window? Short absences — vacations, work travel — count as periods of use as long as the home remained your primary residence (IRS Pub 523). The IRS defines "main home" by facts and circumstances: the address on your driver's license and tax returns, where your family lives, where you're registered to vote. For joint filers, both spouses must pass the use test to claim the full $500,000 exclusion — otherwise the couple can still claim up to $250,000.

The Once-Every-Two-Years Rule

You can only claim the Section 121 exclusion on one home sale every two years (IRS Pub 523). If you excluded gain from a sale in June 2024, you cannot claim it again until June 2026.

How to Calculate Your Gain (Before You Worry About Tax)

Many sellers assume their gain equals sale price minus purchase price. It doesn't. The IRS formula is more forgiving:

Capital gain = Amount realized − Adjusted basis

  • Amount realized = Sale price minus selling costs (agent commissions, title fees, escrow, transfer taxes, service fees).
  • Adjusted basis = Original purchase price plus qualified capital improvements (kitchen remodel, room addition, new roof, HVAC) minus any depreciation claimed if the home was ever rented (IRS Pub 523).

Selling costs reduce the amount realized. Improvements raise the basis. Both lower the gain — which is why keeping receipts matters. Here's a worked example for a hypothetical joint filer:

Line itemAmount
Sale price$780,000
Minus: agent commission (5%)−$39,000
Minus: title, escrow, transfer taxes−$11,000
Minus: closing service fee−$5,000
Amount realized$725,000
Original purchase price (2011)$310,000
Plus: kitchen remodel (2015)+$42,000
Plus: new roof (2019)+$18,000
Plus: primary bath renovation (2022)+$25,000
Adjusted basis$395,000
Capital gain ($725,000 − $395,000)$330,000

At $330,000 gain, a married joint filer with a $500,000 exclusion pays $0 federal capital gains tax. A single filer with the same numbers has $80,000 of gain above the $250,000 exclusion — that portion is taxable at the long-term rate.

Still setting the sale price? These steps to find out what your home is worth give you a starting number. For deeper mechanics on which selling costs qualify, see the full guide to taxes on selling a house. The guide to selling your house for the most money covers the levers that raise the sale price — and the realized gain.

What Rate Applies If a Gain Is Taxable

If your gain exceeds the Section 121 exclusion, the taxable portion is subject to capital gains rates based on how long you owned the home (IRS Topic 409):

  • Short-term — owned 1 year or less. Taxed at ordinary-income rates, 10% to 37% federal.
  • Long-term — owned more than 1 year. Taxed at 0%, 15%, or 20% depending on taxable income (NerdWallet).

Most home sellers land in the long-term bracket. Exact thresholds change annually — check current IRS tables or Bankrate before running numbers. An additional Net Investment Income Tax of 3.8% may apply for higher-income filers (modified AGI above $200,000 single / $250,000 joint) and stacks on top of the capital gains rate — a CPA should confirm whether your income triggers it.

Partial Exclusion — Job, Health, or Unforeseen Circumstances

If you don't meet the full 2-year test, you may still qualify for a partial exclusion when you sold because of (IRS Pub 523):

  • A change in workplace location — the new job is at least 50 miles farther from the home than the old one.
  • Health reasons — a doctor recommends a move to treat or mitigate a disease, illness, or injury.
  • Unforeseen circumstances — divorce, multiple births from a single pregnancy, involuntary job loss, disaster damage, or other events beyond the seller's reasonable control.

The math: take the shorter of the ownership or use period, divide by 24 months, multiply by the full exclusion. Example: a single filer who lived in the home 12 months before a job-relocation sale gets 12 ÷ 24 × $250,000 = $125,000 partial exclusion. A joint filer gets $250,000. Gain above the partial exclusion is taxable.

If speed matters because of a qualifying life change, the complete guide to selling your house fast covers timing strategies. Talk to a CPA — this is where your situation matters.

Exceptions — Divorce, Death of a Spouse, Military, and Inherited Homes

The Section 121 rules bend for specific life events.

Divorce. If ownership transfers between spouses under a divorce decree, the receiving spouse's ownership period includes the time the transferring spouse owned the home. A spouse who took sole ownership in a divorce isn't starting from zero on the 2-year clock (IRS Pub 523).

Death of a spouse. A surviving spouse can claim the full $500,000 joint exclusion if the sale happens within 2 years of the spouse's death and neither spouse remarried before the sale. After 2 years, the exclusion drops to $250,000 (IRS Pub 523).

Military, Foreign Service, and intelligence community. Active-duty service members and other qualified officials can suspend the 5-year test for up to 10 years while stationed on qualified official extended duty at least 50 miles from the home (IRS Publication 3).

Inherited homes. When you inherit a home, the basis is generally stepped up to fair market value on the date of the previous owner's death (IRS Topic 703). That step-up often eliminates most or all of the gain if you sell shortly after inheriting. Talk to a CPA — inheritance layered onto capital gains gets complicated fast.

When a 1031 Exchange Applies (Rental / Investment Only)

Section 1031 exchanges are for investment property only — they do not apply to a primary residence (IRS Form 8824 instructions). For a home you live in, Section 121 is the tool.

Mixed-use situations blend the rules. If the home was your primary residence for part of the ownership period and a rental for the rest, the rental portion may face depreciation recapture (taxed at up to 25% on depreciation claimed), and the primary-residence portion may qualify for Section 121 (IRS Pub 523). Talk to a CPA before selling a former rental.

State-Level Capital Gains Tax Varies

Federal is only half the picture. Every state that levies a personal income tax treats capital gains under its own rules:

  • 9 states have no personal income tax — Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, Wyoming. Home-sale gains aren't taxed at the state level (Bankrate).
  • California and a few others tax all capital gains as ordinary income at rates up to the top marginal bracket.
  • Most states apply their income tax rate to the federally taxable portion — if Section 121 exempts your gain, most states follow.

State rates change annually. Check your state's Department of Revenue or NerdWallet. Talk to a CPA who knows your state.

How to Report the Sale (Form 8949 + Schedule D)

You must report the sale in two situations (IRS Pub 523): you received a Form 1099-S at closing, or you cannot fully exclude the gain. Reporting uses two forms:

  • Form 8949. List date acquired, date sold, proceeds, cost basis, and gain or loss. If you qualify for a full or partial Section 121 exclusion, enter the excluded amount as an adjustment.
  • Schedule D. Totals from Form 8949 flow to Schedule D, which computes net capital gain and pushes it onto Form 1040.

If you fully qualify for the exclusion and did not receive a 1099-S, you generally don't have to report the sale. If a 1099-S was issued, report it — even at zero taxable gain — to avoid an IRS mismatch letter. Talk to a CPA — reporting mechanics is exactly where a professional prevents costly mistakes.

What Opendoor Sellers Should Know About Capital Gains

Selling to Opendoor doesn't change the tax rules — Section 121 applies the same whether you sell through an agent, list FSBO, or accept a cash offer. Two Opendoor mechanics affect the math: the 5% service charge is a selling cost that reduces the amount realized (and the gain), and the flexible closing date up to 60 days out can help sellers approaching the 24-month mark. Compare the mechanics in how selling to Opendoor compares to a traditional home sale. This is informational only — consult a CPA before making decisions based on your closing timing.

Frequently asked questions