The home sale exclusion when a spouse has moved out: a worked example of the ownership and use tests
For separated spouses in Chesapeake selling a jointly owned house after one moved out: how the federal ownership and use tests count each spouse's time, with invented dates and figures, and how a divorce or separation instrument changes who counts as using the house.
The ownership and use tests as the statute and regulation state them
Section 121 sets the tests and the limits; the U.S. Code site shows it current through Public Law 119-142 (November 10, 2026). The regulation turns "2 years" into a count: the requirements "may be satisfied by establishing ownership and use for 24 full months or for 730 days (365 × 2)," and "may be satisfied during nonconcurrent periods if both the ownership and use tests are met during the 5-year period ending on the date of the sale or exchange" (26 CFR 1.121-1(c)(1)). Use means living there: "occupancy of the residence is required," although "short temporary absences, such as for vacation or other seasonal absence" count as use (§ 1.121-1(c)(2)(i)).
- The limit. Excluded gain "shall not exceed $250,000" (§ 121(b)(1)). On a joint return, $500,000 applies only if "(i) either spouse meets the ownership requirements," "(ii) both spouses meet the use requirements," and "(iii) neither spouse is ineligible" because of the two-year rule; otherwise the limit is "the sum of the limitations" each spouse would have "if such spouses had not been married" (§ 121(b)(2)).
- Once every two years. The exclusion does not apply if, in the two years ending on the sale date, "there was any other sale or exchange by the taxpayer to which subsection (a) applied" (§ 121(b)(3)).
- Exceptions. Gain matching depreciation after May 6, 1997 (§ 121(d)(6)) and gain allocated to "periods of nonqualified use" (§ 121(b)(5)) are not excluded; a seller who fails the tests may have a reduced limit when the sale "is by reason of a change in place of employment, health, or, to the extent provided in regulations, unforeseen circumstances" (§ 121(c)(2)(B)).
IRS Publication 523, Selling Your Home (2025 edition), says the 24 months of residence "can fall anywhere within the 5-year period" and need not be "a single block of time" (Publication 523). A sale in 2026 or 2027 is reported on that year's return, and the edition of Publication 523 for that year may not be out yet.
How a divorce or separation instrument changes who counts as using the house
Without an instrument or another special rule of § 121(d), the spouse who moved out counts only his or her own occupancy inside the window, short temporary absences included. Section 121(d)(3)(B) changes that, "Solely for purposes of this section": an individual "shall be treated as using property as such individual's principal residence during any period of ownership while such individual's spouse or former spouse is granted use of the property under a divorce or separation instrument." The regulation states the conditions: the spouse who left "has an ownership interest," and the spouse in the house "uses the property as his or her principal residence" (26 CFR 1.121-4(b)(2), applicable for sales and exchanges on or after December 24, 2002).
The instrument is (§ 121(d)(3)(C)):
- "a decree of divorce or separate maintenance or a written instrument incident to such a decree,"
- "a written separation agreement, or"
- "a decree (not described in clause (i)) requiring a spouse to make payments for the support or maintenance of the other spouse."
Public Law 115-97 added this definition and struck "(as defined in section 71(b)(2))" from § 121(d)(3)(B). The Code's note applies the change to instruments "executed after Dec. 31, 2018, and to such instruments executed on or before Dec. 31, 2018, and modified after Dec. 31, 2018, if the modification expressly provides that the amendment made by section 11051 of Pub. L. 115-97 applies to such modification." The regulation still cites section 71(b)(2).
Ownership works differently. When one spouse deeds the house to the other in a transfer described in § 1041(a), the receiving spouse's ownership period "shall include the period the transferor owned the property" (§ 121(d)(3)(A)). Publication 523 states the limit on that rule: "However, you must meet the residence requirement on your own."
Virginia documents that can grant use, and the Chesapeake office
Virginia law supplies the documents; federal law decides whether one counts. Under Va. Code § 20-155, married persons may make agreements "subject to the same conditions" as agreements between prospective spouses (§§ 20-147 through 20-154), "except that such marital agreements shall become effective immediately upon their execution." An agreement whose terms are "contained in a court order endorsed by counsel or the parties" or "recorded and transcribed by a court reporter and affirmed by the parties on the record personally" is "not required to be in writing," while the federal definition names "a written separation agreement." And "A reconciliation of the parties after the signing of a separation or property settlement agreement shall abrogate such agreement unless otherwise expressly set forth in the agreement."
A court "may affirm, ratify and incorporate by reference" a valid agreement in its decree, and an incorporated provision "shall be deemed for all purposes to be a term of the decree" (Va. Code § 20-109.1). While a suit for divorce, annulment or separate maintenance is pending, the court "may," "in the discretion of such court," make an order "for the exclusive use and possession of the family residence during the pendency of the suit" (Va. Code § 20-103(A)(vi)). It is not required to, and § 121(d)(3)(C) does not mention a pendente lite order (a temporary order made while the suit is pending) that grants use without requiring support payments.
For a house in Chesapeake, the city's page for the Circuit Court Clerk's Office lists divorces among the civil cases filed in Circuit Court and says the office records deeds and plats for property in the city. It lists the office at 307 Albemarle Drive, Suite 300A, Chesapeake, VA 23322, "Phone: 757-382-3000," and office hours "8:30am-3:45pm" (Chesapeake Circuit Court Clerk's Office).
Worked example: a Chesapeake house sold in February 2027
Example only: the people, dates and figures are invented, and the day counts are this guide's arithmetic.
Spouses A and B bought a Chesapeake house as joint owners on June 1, 2016. Spouse B moved out on September 30, 2022. On March 1, 2023, both signed a written separation agreement giving Spouse A the use of the house until it is sold, and Spouse A lived there as a main home throughout. The sale closes on February 12, 2027; the final decree is entered on May 14, 2027. Each owns half and reports half of the gain. The house was never rented or used for business, and neither spouse has sold another home with the exclusion.
- The window. The five-year period ending on the date of sale runs from February 12, 2022, to February 12, 2027: 1,826 days, including February 29, 2024.
- The gain. Gain is "the excess of the amount realized therefrom over the adjusted basis" (26 U.S.C. § 1001(a)). Amount realized $498,000 minus adjusted basis $288,000 = $210,000; each half is $105,000.
- The tests. Each spouse needs 730 days of ownership and 730 days of use inside the window.
| Count | Spouse A | Spouse B, with the March 1, 2023 agreement | Spouse B, with no instrument |
|---|---|---|---|
| Ownership | 1,826 | 1,826 | 1,826 |
| Days lived in the house | 1,826 | 230 (Feb. 12 to Sept. 30, 2022) | 230 |
| Days treated as use, § 121(d)(3)(B) | none needed | 1,444 (Mar. 1, 2023 to Feb. 12, 2027) | 0 |
| Total use | 1,826 | 230 + 1,444 = 1,674 | 230 |
| 730 days met? | Yes | Yes | No: 500 days short |
The 152 days between the move and the signing count as use for A, not B. On B's own occupancy alone, 730 days would have lasted only for a sale closing by September 30, 2025, three years after moving out.
- Filing status and the limit. For a joint return, marital status is determined, "if both have the same taxable year," "as of the close of such year" (or "as of the time of such death" if one dies first), and an individual "legally separated from his spouse under a decree of divorce or of separate maintenance shall not be considered as married" (26 U.S.C. § 6013(d)). With the decree entered May 14, 2027, neither is married at the close of 2027, so there is no 2027 joint return (a change in filing status), and each has the $250,000 limit (§ 121(b)(1)). Spouse A excludes $105,000 and includes $0. Spouse B with the agreement does the same. Spouse B with no instrument fails the use test, so § 121(a) excludes none of the $105,000 unless the reduced limit of § 121(c) applies.
- The same sale in December. A December 15, 2026 closing falls in 2026, when the spouses are still married at year end. Spouse B then has 289 days lived there plus 1,385 under the agreement, 1,674 in all. On a joint return, all three conditions of § 121(b)(2)(A) are met and the limit is $500,000 against $210,000 of gain. With no instrument, B (289 days) fails condition (ii), but subsection (a) still applies "if either spouse meets the ownership and use requirements" (§ 121(d)(1)), and the limit is $250,000 for A plus nothing for B (before any § 121(c) amount) = $250,000, still above $210,000. On these figures, the instrument changes the dollar result only on separate returns.
Filing status on the Virginia return
"The Virginia taxable income of a resident individual means his federal adjusted gross income for the taxable year," "with the modifications specified in §§ 58.1-322.01 through 58.1-322.04" (Va. Code § 58.1-322). Gain that § 121(a) keeps out of gross income is therefore not part of the federal figure Virginia starts from. "If the federal taxable income of married individuals is determined on separate federal returns, their Virginia taxable incomes shall be separately determined"; after a joint federal return, "Their tax shall be determined on their joint Virginia taxable income," or "Separate taxes may be determined on their separate Virginia taxable incomes if they so elect" (Va. Code § 58.1-324(A), (B)). Virginia Tax's Filing Status page says the federal status "will generally determine the status you use on your state return," and "You are considered single if you are unmarried, or if you are divorced or legally separated under a separate maintenance decree."
Three claims checked against the sources
These turn up in forums, family advice and AI answers (more under comparing conflicting advice).
| Claim | What the source says |
|---|---|
| "The spouse who moves out has three years to sell." | Only as arithmetic, for someone who lived there at least two years just before leaving: use "for periods aggregating 2 years or more" "during the 5-year period ending on the date of the sale" (§ 121(a)). An instrument can extend it (§ 121(d)(3)(B)). |
| "A married couple gets $500,000." | Only for "a husband and wife who make a joint return" and only if "both spouses meet the use requirements," with the other conditions; otherwise the sum of each spouse's own limit (§ 121(b)(2)). |
| "Once the house is deeded to the spouse who stayed, that spouse gets the other's years too." | Ownership, yes: the period "shall include the period the transferor owned the property" (§ 121(d)(3)(A)). Use, no: "However, you must meet the residence requirement on your own" (Publication 523). |
What the rules leave to your own case
- Whether a paper is a "divorce or separation instrument" (a pendente lite order that orders no support, an agreement put on the record rather than written, or one silent on who lives in the house) is for a tax professional; what the Virginia document does is for a licensed attorney.
- Whether the reduced limit applies: the regulation counts a sale as by reason of unforeseen circumstances when, among other events, "Divorce or legal separation under a decree of divorce or separate maintenance" of a "qualified individual" (the taxpayer, the taxpayer's spouse, a co-owner, or a person whose principal place of abode is in the same household) occurs "during the period of the taxpayer's ownership and use of the residence as the taxpayer's principal residence" (26 CFR 1.121-3(e)(2), (f)). How that fits a spouse who left years earlier is for a tax professional.
- The actual gain, basis, depreciation and rental use come from the records and a tax professional; exclusive use while a suit is pending is for "the court having jurisdiction of the matter" to grant or refuse (§ 20-103(A)). Nearby questions: selling the marital home and being separated for a while.
Related guides on this site: A spouse who won't sign the sale papers: partition and the court's powers in Virginia; Selling the house while separating in Virginia: taxes and closing.