The First File The First File
  • News & Cases
  • Federal Law
    • Taxes
    • Federal Courts & Procedure
      • Appeals
      • Civil Procedure
      • Criminal Procedure
      • Evidence
    • Constitution & Rights
    • Consumer Protection
    • Bankruptcy
    • Agencies & Administrative Law
    • Federal Employment Law
    • Health & Federal Benefits
  • State Law
    • Criminal Law & Procedure
    • Employment & Work
      • Unemployment Insurance
      • Wages & Pay
        • Minimum Wage & Local Rules
      • Workers’ Compensation
      • Workplace Rights
    • Family & Relationships
      • Divorce
      • Guardianship
      • Probate & Estates
    • Housing & Real Estate
      • Landlord–Tenant
      • Foreclosure
      • HOAs & Condominiums
      • Deeds & Property Records
    • Personal Injury & Torts
      • Auto Accidents
      • Negligence
    • Business & Contracts
      • Business Entities
      • Contracts
    • Money, Debt & Consumer
      • Consumer Protection
      • Debt Collection & Judgments
Reading: Capital Gains Tax on the Sale of a Home: Federal Rules
Share
FIRST FILEFIRST FILE
Font ResizerAa
Search
  • Federal Law
    • Constitution & Rights
    • Consumer Protection
    • Practice Areas
  • State Law
    • Criminal Law & Procedure
    • Employment & Work
    • Family & Relationships
    • Housing & Real Estate
    • Personal Injury & Torts
    • Money, Debt & Consumer
    • Business & Contracts
  • Legal Terms Glossary
Follow US
Copyright © 2014-2025 Ruby Theme Ltd. All Rights Reserved.
Home sale documents, house keys, and blank financial worksheets arranged on a desk
Home » Blog » Capital Gains Tax on the Sale of a Home: Federal Rules
Federal LawTaxes

Capital Gains Tax on the Sale of a Home: Federal Rules

By Lucas S.
Last updated: August 23, 2026
11 Min Read
SHARE

This article is provided for educational and informational purposes only. It does not constitute legal, financial, or tax advice, and no attorney-client relationship is formed by reading it. Laws, regulations, official guidance, and related information vary by jurisdiction, change frequently, and may have changed or become outdated since the publication date. Always verify current information with authoritative sources and consult a qualified professional about your specific circumstances. The author and publisher assume no liability for actions taken based on this information.

Contents
  • How home-sale gain is calculated
  • The ownership and use tests
  • The exclusion limits and two-year look-back
  • Reduced exclusions for certain earlier sales
  • Nonqualified use can make part of the gain taxable
  • Business use, rental use, and depreciation
  • Why a Form 1099-S does not determine the tax
  • When a main-home loss is not deductible
  • Special rules can change the five-year analysis
  • The federal and state tax layers are separate
  • A record-based way to understand the result
  • Sources
Key Facts
  1. Federal level: Section 121 can exclude up to $250,000 of qualifying gain from a principal-residence sale, or up to $500,000 for qualifying spouses filing jointly.
  2. Federal level: The basic rule requires two years of ownership and two years of use as a principal residence during the five-year period ending on the sale date.
  3. Federal level: The exclusion generally cannot be used when the taxpayer excluded gain from another home sale during the preceding two years.
  4. Federal level: Gain equals the amount realized minus adjusted basis; the home’s purchase price alone is not the complete calculation.
  5. Federal level: A loss on the sale of a personal main home is generally not deductible.
  6. Federal level: Business or rental use, depreciation, and periods of nonqualified use can leave part of the gain taxable.

Federal capital gains tax on the sale of a home begins with a calculation, then applies a possible exclusion. The sale price is reduced by qualifying selling expenses to determine the amount realized. That amount is compared with the home’s adjusted basis to determine gain or loss.

Section 121 can exclude a substantial amount of gain when the property was the taxpayer’s principal residence and the statutory tests are met. The exclusion is not automatic for every house, and it does not turn a personal-residence loss into a deduction.

How home-sale gain is calculated

The amount realized generally starts with the selling price and subtracts selling expenses such as commissions and specified closing costs. Adjusted basis generally starts with the acquisition cost and changes for later events.

Capital improvements can increase basis when they add value, prolong useful life, or adapt the property to a new use. Ordinary repairs and maintenance generally do not increase basis unless they are part of a larger qualifying improvement.

Insurance reimbursements, casualty adjustments, depreciation, certain credits, and other events can reduce or otherwise change basis. Records matter because a larger supportable basis reduces the calculated gain.

A simplified example shows the structure. If a home’s amount realized is $700,000 and adjusted basis is $430,000, the calculated gain is $270,000 before considering section 121. The exclusion analysis then determines how much of that gain remains in gross income.

The ownership and use tests

The basic section 121 rule looks at the five-year period ending on the sale date. During that window, the taxpayer generally must have owned the property for periods totaling at least two years and used it as a principal residence for periods totaling at least two years.

The ownership and use periods do not have to be continuous or identical. A taxpayer can satisfy them during different parts of the five-year window.

Only one property can be the principal residence at a time. When a person has multiple homes, the analysis considers all facts and circumstances, with time spent at each property carrying particular importance.

For spouses filing jointly, the full $500,000 limit generally requires either spouse to satisfy ownership, both spouses to satisfy use, and neither spouse to be disqualified by a recent prior exclusion. Otherwise, a different maximum can apply.

The exclusion limits and two-year look-back

The general exclusion limit is $250,000 for an individual taxpayer. Qualifying spouses filing jointly can reach $500,000.

Section 121 generally allows the exclusion for only one sale or exchange during a two-year period. A prior sale that used the exclusion can therefore affect a later home sale even when the later property independently meets the ownership and use tests.

A surviving spouse can qualify for the $500,000 limit on a sale within two years after a spouse’s death when the statutory joint-return conditions were satisfied immediately before death and other requirements are met.

Reduced exclusions for certain earlier sales

A sale that fails the full ownership, use, or look-back test can sometimes qualify for a reduced exclusion. Section 121 provides this route when the primary reason for the sale is a change in place of employment, health, or an unforeseen circumstance recognized by statute or regulation.

The reduced amount is proportional rather than automatically $250,000 or $500,000. It generally reflects the fraction of the two-year requirement that was satisfied.

Not every move, preference, or financial advantage qualifies as an unforeseen circumstance. The reason for the sale and the applicable federal definition control.

Nonqualified use can make part of the gain taxable

Periods of nonqualified use after 2008 can require allocating part of the gain outside the exclusion. Broadly, nonqualified use is a period when the property was not used as the taxpayer’s principal residence, subject to statutory exceptions.

Not every absence creates nonqualified use. The statute contains exceptions for certain temporary absences, qualified official extended duty, and periods after the last principal-residence use within the five-year window.

The allocation is based on the relationship between nonqualified-use periods and total ownership. Publication 523 provides worksheets and detailed exceptions.

Business use, rental use, and depreciation

A home can have both personal and business or rental history. The federal result depends on whether the business portion was within the dwelling, physically separate, or involved the entire property at different times.

Gain attributable to depreciation deductions allowed or allowable for periods after May 6, 1997, cannot be excluded under section 121. This depreciation-related gain can remain taxable even when the ownership and use tests are otherwise met.

A physically separate business or rental portion that was never used as a principal residence may require allocation and Form 4797 reporting. Mixed-use facts therefore can affect both character and reporting location.

Why a Form 1099-S does not determine the tax

Form 1099-S reports proceeds from a real-estate transaction. It can be issued even when a principal-residence exclusion ultimately shelters all gain.

The gross proceeds on Form 1099-S are not the same as gain. The form does not supply every selling expense, basis adjustment, improvement, depreciation item, or exclusion fact.

Receipt of Form 1099-S can affect the reporting requirement. A sale also generally must be reported when taxable gain remains after the exclusion or when the taxpayer elects not to claim the exclusion.

When a main-home loss is not deductible

A personal main home is personal-use property. Federal law generally does not allow a deduction when it sells for less than adjusted basis.

This rule differs from loss treatment for qualifying business or investment property. A mixed-use property may require separating the personal and business portions rather than treating the entire loss one way.

Special rules can change the five-year analysis

Qualified members of the uniformed services, Foreign Service, intelligence community, and Peace Corps can elect to suspend the five-year test period during specified extended duty. The suspension is limited by detailed conditions and a maximum period.

Divorce transfers, a spouse’s death, inherited property, like-kind exchanges, expatriation, vacant land adjacent to a home, and installment sales can also alter the ordinary analysis. Each exception has its own boundaries.

The federal and state tax layers are separate

Section 121 governs the federal exclusion. It does not establish how any particular state computes taxable gain, conforms to the federal exclusion, handles basis adjustments, or requires reporting.

State treatment can differ from the federal result. The federal authorities cited here support only the federal layer.

A record-based way to understand the result

The home-sale calculation depends on dates, use, ownership, selling costs, purchase records, improvements, depreciation, prior exclusions, and special events. A closing statement alone rarely contains the full history.

The most useful mental model is sequential: calculate gain, test section 121 eligibility, determine the applicable limit, allocate nonqualified or depreciation-related gain, and identify the required federal forms. That sequence explains why two homes with the same sale price can produce very different federal tax results.

Sources

  • Official U.S. Code, 26 U.S.C. § 121
  • IRS Publication 523: Selling Your Home
  • IRS Topic 701: Sale of Your Home
  • IRS sale-of-residence tax guidance
  • IRS Instructions for Form 1099-S
  • IRS Instructions for Form 4797

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
ByLucas S.
Follow:
I am an independent writer and researcher with a deep interest in law, public affairs, and how the U.S. legal system operates in the real world. Regarding the key facts about my work, my role consists of providing plain-English legal explanations and covering various lawsuits and legal disputes. My approach involves preparing articles using the primary sources listed on each page. I am not an attorney or a lawyer and I do not provide legal advice. The primary areas where I focus my research include explaining complex legal topics in plain English, translating official legal materials into accessible explanations, and following current lawsuits and court cases. You should consult a qualified professional for advice regarding your own situation.
Previous Article Retired service member reviewing blank retirement papers with a partner Military Retirement Pay: Plans, Formulas, and Net Payment
Next Article Car keys and loan papers on a desk beside a parked family car Auto Loans After Bankruptcy: Existing Car Debt and New Financing
Most Popular
An unpaved road curves through a sunlit high-desert landscape toward two distant red-rock buttes.
Patagonia coalition asks court to revive Bears Ears challenge after Trump reduction
September 3, 2026
A broad daylight street view of a modern courthouse with palm trees, entrance steps, traffic lights and a few distant pedestrians.
Duane Davis Convicted in Tupac Shakur Murder Case: What the Verdict Decides
September 3, 2026
The White House stands beside fenced construction sites, cranes and partially built concrete structures in daylight.
Supreme Court Lets White House Ballroom Work Continue Without Deciding Its Legality
September 3, 2026
Pedestrians walk near the entrance of a modern federal courthouse complex in daylight.
Music Publishers Sue Anthropic Over Alleged Use of Thousands of Compositions
September 3, 2026
Pedestrians pass a large stone courthouse with tall windows and mature trees along an urban street.
FTC and 22 States Sue Amazon Over Sponsored Ads Pricing
September 1, 2026

You Might Also Like

Bankruptcy and Mortgages: Liens, Discharge, and Chapter 13

8 Min Read

Georgia State Income Tax: 2025 Filing Guide

10 Min Read

Prior Restraint: Definition, Examples, and First Amendment Rules

11 Min Read
Blank tax worksheets, receipts, calculator, and filing folders arranged on a desk
Federal Law

Federal Tax Deductions: Standard, Itemized, and Other

10 Min Read

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!
The First File The First File

Our goal is to provide simple explanations of federal and state laws without the confusing jargon

Latest News

  • Federal Law
  • State Law
  • Legal Terms Glossary

Resouce

  • Business Contact Page
  • Corrections Policy
  • Editoral Policy
  • About
  • Sitemap

Legal Notice

The information on this website is for educational purposes only and does not constitute legal advice.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?