Moving from California to Texas is one of the most financially significant decisions a household can make. No state income tax, lower cost of living, and the potential to build wealth faster are powerful motivators. But there is a tax provision that catches many relocators off guard, and the cost of getting it wrong is not abstract. It can mean paying tens of thousands of dollars in capital gains tax on the sale of a home you thought was tax-free.
This article explains the Section 121 exclusion, the two-out-of-five-year rule that governs it, and the specific calendar scenarios where cross-state relocators misunderstand the timing. If you are planning a move from California to Texas and intend to sell your California home, this is the article you read before you pack.
Last updated: July 2026 — reflects current federal and California tax rules.
What the Section 121 Exclusion Actually Is
Internal Revenue Code Section 121 may allow a homeowner to exclude up to $250,000 of gain from the sale of a principal residence. Married taxpayers filing jointly may qualify to exclude up to $500,000. These limits apply to gain, not the sales price, equity, or cash received at closing.
Three separate requirements ordinarily apply:
Ownership test
The taxpayer must have owned the home for an aggregate period of at least 2 years (24 months) during the five-year period ending on the date of sale.
Use test
The taxpayer must have used the property as a principal residence for an aggregate period of at least 2 years (24 months or 730 days) during the five-year period ending on the date of sale. These periods do not have to be continuous or consecutive.
Prior-sale lookback test
The taxpayer generally cannot claim another Section 121 exclusion if the taxpayer excluded gain from the sale of another principal residence during the two-year period ending on the current sale date.
For the full $500,000 exclusion on a joint return:
- Either spouse must meet the ownership test.
- Both spouses must separately meet the use test.
- Neither spouse may have used the exclusion on another home sold during the previous two years.
The sale date is the date title passes to the buyer or the date the economic benefits and burdens of ownership shift to the buyer (whichever is earlier). This is typically the closing date. It is not the listing date, contract date, move-out date, or offer acceptance date. Because the tests can turn on a small number of days, taxpayers approaching the deadline should calculate actual dates using a calendar and leave a buffer for closing delays [1][3].
Why the Moving Date and Sale Date Matter
Moving out does not create a two-year deadline. Section 121 looks backward five years from the sale date and asks whether the taxpayer used the home as a principal residence for at least 730 days during that window.
A homeowner who occupied the property continuously for many years before moving can generally remain eligible for nearly three years after moving out. This is because the five-year window can contain approximately three years of post-move nonuse and still retain two earlier years of qualifying residence.
Example: The homeowner moves to Texas on July 1, 2025, after living in the California home continuously for many years.
If the sale closes June 1, 2028: The five-year lookback still contains more than 730 days of qualifying residence. The use test is generally satisfied.
If the sale closes August 1, 2028: The moving five-year window may contain fewer than 730 days of residence. The use test may fail.
This is why the exact dates must be calculated. "Sell within two years of moving" is a conservative planning choice, not the actual federal deadline for a longtime resident [1].
The Principal Residence Test: What It Really Means
The IRS uses a multi-factor test to determine whether a property is your principal residence. No single factor is determinative, but the key considerations include [1]:
Factors the IRS examines
- Where you spend the majority of your time
- Where your employer is located
- Where you are registered to vote
- Where your vehicle is registered
- Where your bank accounts are held
- Where your mail is delivered
- Where you maintain a driver's license
- Where your children attend school
Federal principal-residence use and state domicile are different questions
Obtaining a Texas driver's license, registering to vote in Texas, registering vehicles in Texas, and moving one's family and daily life to Texas can help establish that California residency has ended. Those actions do not erase the months or years during which the California property was previously used as the taxpayer's principal residence.
After the move, the California property becomes a former principal residence. It may remain a vacant personal-use property or be converted to rental use. Moving to Texas ends the accumulation of new principal-residence days in California, but the prior qualifying days remain available until they gradually fall outside the five-year lookback period.
Do not describe a vacant former residence as an "investment property" unless it is actually held or used for investment purposes.
Temporary Absences That Count Toward the Use Test
Certain temporary absences from the home still count as time you used it as your principal residence. These include vacations, short work assignments away from home, or time spent caring for family, provided you intended to return and maintained the property as your main home. The IRS generally treats these periods as qualifying use. Longer qualifying absences (up to an aggregate of 2 years in some cases related to work, health, or unforeseen circumstances) may also be disregarded under specific exceptions. Keep records showing your intent to return and ongoing ties to the property.
The Five-Year Lookback: Correct Timeline Examples
Sale five months after moving
The homeowner lived in the California home for five years, moved to Texas, and sold five months later.
Result: The ownership and use tests are satisfied. Moving out five months before the sale does not jeopardize the exclusion.
Sale 24 months after moving
The homeowner lived in the California home continuously for at least three years, moved to Texas, and sold 24 months later.
Result: The five-year lookback still contains at least 24 months of principal-residence use. The use test is generally satisfied.
Sale more than approximately 36 months (3 years) after moving
The homeowner lived in the home for many years, moved to Texas, and sold more than about 36 months later without moving back.
Result: The rolling five-year lookback will generally contain fewer than 730 days (24 months) of principal-residence use once the post-move period exceeds roughly 36 months. The full exclusion may be lost unless a special rule applies.
The practical lesson
A longtime resident generally has close to three years after moving (not two), but should never plan a closing on the exact outer deadline. Use a calendar to count exact qualifying days in the five-year window and leave a substantial buffer for escrow or closing delays.
Converting the California Home to a Rental
Renting the former residence after moving does not automatically eliminate the Section 121 exclusion. The taxpayer may still qualify if the five-year lookback contains at least 730 days of ownership and principal-residence use and the prior-sale lookback requirement is satisfied.
A homeowner who lived in the property for 36 months, moved out, rented it for 12 months, and then sold it generally still has 36 months of qualifying use inside the five-year window. The statement that 36 months of residence plus 12 months of rental fails a 24-month test is incorrect.
Section 121 also contains an important nonqualified-use exception. Rental or vacancy occurring after the taxpayer's final use of the property as a principal residence and before the sale generally is not treated as nonqualified use when allocating gain. Rental use before the property became the taxpayer's principal residence can produce a different result and may cause part of the gain to be allocated to nonqualified use.
Rental conversion still creates tax consequences:
Depreciation allowed or allowable for rental use after May 6, 1997, cannot be excluded under Section 121.
That depreciation may be taxed federally as unrecaptured Section 1250 gain at a maximum 25% rate.
Rental income and expenses must be reported during the rental period.
California can tax taxable rental income and taxable gain attributable to California real property.
Insurance, lender, local registration, and property-management requirements may change.
The correct advice
The correct advice is not "never rent the home." The correct advice is to compare expected rent, carrying costs, depreciation, market risk, and the remaining Section 121 window with a qualified tax professional before converting the home.
California Residency Is a Separate Tax Question
Section 121 eligibility and California residency are related planning issues, but they are not the same test.
Section 121 asks whether the property was owned and used as a principal residence for the required periods. California residency determines whether California can tax all of a taxpayer's income or only income from California sources.
California generally taxes:
Residents on income from all sources.
Part-year residents on worldwide income received while residents and California-source income received while nonresidents.
Nonresidents on California-source income, including taxable gain from California real property.
California conforms to the federal Section 121 exclusion. A taxpayer does not lose the exclusion merely because the FTB determines that the taxpayer was still a California resident. Residency may affect California's ability to tax the taxpayer's other income, but Section 121 eligibility continues to depend on the ownership, use, prior-sale, and special-case rules.
The 546-day safe harbor is not a general moving rule
California's 546-day safe harbor applies to certain people who remain domiciled in California but leave under an employment-related contract lasting at least 546 consecutive days. It is subject to additional limitations, including rules concerning California visits, intangible income, and tax-avoidance purpose.
It is not a rule requiring every permanent California-to-Texas mover to wait 546 days before becoming a nonresident. Someone who permanently abandons a California domicile and establishes a Texas domicile is evaluated under the complete facts and circumstances if the employment-contract safe harbor does not apply [7].
California-Source Gain After the Move
Moving to Texas does not prevent California from taxing taxable gain from California real property. California Revenue and Taxation Code Section 17951 limits a nonresident's gross income to California-source income, and California regulations expressly treat gain from California real property as California-source income [9][10].
This is ordinary source-based taxation, not a special cancellation of the Section 121 exclusion.
In practice:
A homeowner moves from California to Texas.
The homeowner later sells the California property.
The federal Section 121 calculation determines how much gain, if any, is excluded.
California generally follows the Section 121 exclusion.
Any remaining taxable gain from the California property remains California-source income, even though the seller is now a Texas resident.
If the entire gain is properly excluded under Section 121, California does not make the gain taxable simply by disputing the seller's residency. If some gain remains taxable, California may tax that remaining gain because the real property is located in California [5][9].
Calendar Scenarios: When the Rule Applies
Scenario 1: A short post-move rental
Years 1-3: Live in California home
Year 3: Move to Texas, rent the California home
Year 4: Sell California home
Result: The owners still have three years of principal-residence use within the five-year window and generally qualify for Section 121. Depreciation allowed or allowable during the rental year remains taxable.
Scenario 2: A one-year vacancy
Years 1-4: Live in California home
Year 4: Move to Texas, leave it vacant
Year 5: Sell California home
Result: They have four years of qualifying use inside the five-year window and generally qualify. Vacancy by itself does not eliminate the exclusion.
Scenario 3: A sale more than three years after moving
Years 1-7: Live in California home
Year 7: Move to Texas
Year 10: Sell California home (3+ years later)
Result: The rolling five-year window may contain fewer than 730 days of principal-residence use. The full exclusion may no longer be available.
Scenario 4: Spouses move on different dates
Years 1-3: Both spouses live in California home
Year 3: Spouse A moves to Texas, Spouse B stays in California home for 14 more months
Year 4 (month 14): Both sell California home
Result: Both spouses have individually satisfied the two-year use test. Assuming at least one spouse satisfies the ownership test and neither spouse used Section 121 on another sale during the previous two years, the couple may qualify for the full $500,000 exclusion.
A Practical Sale-Timing Process
Selling before or soon after the move is often operationally simpler and reduces carrying costs, market risk, insurance complications, and the possibility of missing the Section 121 window. It is not necessary, however, to claim that federal law requires every longtime owner to sell within a fixed deadline from moving.
Recommended process
Record the last date each spouse actually used the California property as a principal residence.
Work backward five years from the anticipated closing date, not the listing or contract date.
Confirm that each taxpayer who must satisfy the use test has at least 730 qualifying days inside that window.
Confirm that neither spouse used a Section 121 exclusion on another home sold during the preceding two years.
Calculate adjusted basis, selling expenses, improvements, and all depreciation allowed or allowable.
If rental conversion is being considered, model depreciation, rental income, carrying costs, and the remaining exclusion window before placing a tenant.
Leave a substantial closing buffer rather than planning to close on the last potentially qualifying day.
What the IRS Looks for in an Audit
Taxpayers should retain:
Key documents to retain for at least 7 years
Purchase closing statement, all capital improvement receipts/invoices/permits, depreciation schedules, rental leases if any, utility/insurance/voter/driver's license records showing occupancy dates for each spouse, prior tax returns showing any prior Section 121 claims, and the final sale closing disclosure.
Audit risk
The principal audit risk is not simply whether the taxpayer "became a Texan." It is whether the taxpayer can prove ownership, principal-residence use, basis, depreciation, and any claimed exception.
Federal and California Reporting
Federal return
A home sale does not always have to be reported on Form 8949 and Schedule D.
The sale generally must be reported federally if:
- The taxpayer has gain that cannot be fully excluded.
- The taxpayer received Form 1099-S, even if the gain is fully excluded.
- The taxpayer chooses not to claim an otherwise available exclusion.
If the entire gain is excluded and no Form 1099-S was received, the sale ordinarily does not have to be reported on the federal return. Rental or business use may require additional reporting, including Form 4797 in some situations [1].
California return
California conforms to the federal Section 121 exclusion. A full-year nonresident or part-year resident who has a California filing requirement generally uses Form 540NR [5][6].
Do not state that every Texas resident who sells California real estate must file Form 540NR solely to "claim" Section 121. Whether a return is required depends on California filing thresholds, California-source taxable income, withholding, and the taxpayer's other facts. If California tax was withheld from the transaction, the seller generally must file the appropriate California return to claim the withholding credit or obtain a refund.
Key document: Form 540NR
California Form 593 and withholding
California real estate withholding is handled through Form 593 during escrow. A qualifying principal-residence sale may be exempt from withholding if the seller properly completes the applicable certification before closing [8].
If no exemption applies, the standard withholding method is generally 3 1/3% of the sales price, although an alternative calculation based on estimated gain may be available. Withholding is a prepayment, not the final tax liability. The seller reconciles it on the applicable California return.
A withholding exemption does not establish that no return or tax is due, and withholding does not establish the amount of the final tax. Sellers should review Form 593 with their escrow professional and tax advisor before closing.
Reduced Exclusion for Certain Early Sales
A taxpayer who does not qualify for the maximum exclusion may qualify for a reduced exclusion if the primary reason for the sale was:
A qualifying change in workplace location.
A health-related move.
A qualifying unforeseeable event.
For the work-related safe harbor, the new workplace generally must be at least 50 miles farther from the home than the former workplace was. If the taxpayer had no former workplace, the new workplace generally must be at least 50 miles from the home. Simply moving more than 50 miles is not the test.
Recognized unforeseeable events include circumstances such as death, divorce or legal separation, multiple births from the same pregnancy, eligibility for unemployment compensation, certain employment changes that make the household unable to pay basic living expenses, destruction or condemnation of the home, and qualifying casualty events. Other situations may qualify under a facts-and-circumstances analysis [1].
A voluntary move motivated primarily by lifestyle, housing affordability, lower taxes, or a preference for a different climate generally does not qualify for a reduced exclusion under the work, health, or unforeseeable circumstances safe harbors.
The reduced exclusion is calculated using the shortest of:
The period of qualifying residence.
The period of ownership.
The time since the taxpayer last used Section 121 on another sale.
That period is divided by 24 months or 730 days and multiplied by the taxpayer's $250,000 maximum. Each spouse's calculation is performed separately.
Example: An otherwise qualifying single filer who sells after only 18 months of qualifying use because of a qualifying workplace change may qualify for a reduced maximum exclusion of $187,500 (calculated as 18 / 24 x $250,000).
How the Reduced Exclusion Amount Is Calculated
The reduced exclusion amount is generally calculated by taking the shortest of (a) the period of qualifying ownership, (b) the period of qualifying residence, or (c) the time since the last Section 121 exclusion was claimed on another home, dividing that period by 24 months (or 730 days), and multiplying the result by the applicable maximum exclusion ($250,000 single or $500,000 joint). Each spouse's qualifying periods are calculated separately and then combined for a joint return.
Example: An otherwise qualifying single filer who sells after only 18 months of qualifying use because of a qualifying workplace change may qualify for a reduced maximum exclusion of $187,500 (calculated as 18 / 24 x $250,000).
Do not imply that a homeowner who voluntarily waits too long after moving automatically qualifies for a reduced exclusion. The qualifying circumstance must be the primary reason for the sale [1].
Other Section 121 Rules That Can Change the Result
Special rules may apply when:
Partial Business or Rental Use (e.g., Home Office)
If part of the home was used for business or rental (such as a qualifying home office), you generally must allocate the gain between the personal and non-personal portions. The business/rental portion does not qualify for the Section 121 exclusion and may trigger depreciation recapture and Form 4797 reporting. Keep detailed records of square footage and use periods.
Fact-specific
These rules are fact-specific and should be reviewed before concluding that the ordinary timeline applies [1][3].
When Spouses Move on Different Dates
For the full $500,000 exclusion on a joint return, both spouses must separately satisfy the two-year use test. Only one spouse must satisfy the ownership test, and neither spouse may have claimed Section 121 on another home sold during the previous two years.
Each spouse's use is measured separately. One spouse's continued occupancy does not create shared qualifying days for the spouse who has already moved.
If Spouse A moves to Texas while Spouse B remains in the California home, Spouse B continues accumulating qualifying use. Spouse A retains previously accumulated use until those days begin falling outside the five-year lookback. If the sale occurs nearly three years or more after Spouse A moved, Spouse A may no longer have 730 qualifying days inside the window, potentially preventing the couple from receiving the full $500,000 exclusion.
Community-property ownership does not replace the requirement that both spouses independently satisfy the use test [1].
The Bottom Line
Moving from California to Texas does not immediately eliminate the Section 121 exclusion, and federal law does not impose a universal requirement to sell at a fixed deadline from moving.
A longtime resident can generally retain the full exclusion for nearly three years after leaving, provided the five-year lookback still contains at least 730 days of qualifying use and the other requirements are met. A post-move rental does not automatically destroy the exclusion, although depreciation remains taxable and the rolling five-year window continues to matter.
The practical steps are straightforward:
Identify each spouse's last day of principal-residence use.
Calculate backward five years from the expected closing date.
Confirm the ownership, use, and prior-sale tests.
Calculate gain using selling expenses and adjusted basis.
Account for all rental depreciation.
Address California Form 593 before closing.
Have a multistate tax professional review the dates before the transaction becomes difficult to change.
Timing flexibility exists for longtime owners, but exact day counts, basis records, and multi-state coordination matter. Engage your tax team early, ideally before listing or signing a purchase contract in Texas.
How Gain Is Calculated for Section 121 Purposes
A home's taxable gain is not calculated by simply subtracting the original purchase price from the sales price. First subtract qualifying selling expenses from the sales price to determine the amount realized. Then subtract the home's adjusted basis, which may include the original purchase price, certain acquisition costs, and qualifying capital improvements, reduced by depreciation and certain other adjustments.
Example calculation
Result: If the couple satisfies all Section 121 requirements, the entire $428,000 may be excluded. If the adjusted basis were only $600,000, the gain would be $528,000, leaving $28,000 potentially taxable before considering depreciation or other adjustments.
Note on Depreciation
If you claimed depreciation after May 6, 1997 (e.g., during a rental period), that portion of gain is not excludable under Section 121 and is taxed as unrecaptured Section 1250 gain at a maximum federal rate of 25%. Adjust your basis downward by allowable depreciation before calculating gain.
Any portion of the gain excluded under Section 121 is also excluded from the 3.8% Net Investment Income Tax. Only nonexcluded gain can enter the NIIT calculation [4].
Frequently Asked Questions
Can I sell my California home the same year I move to Texas and still claim the Section 121 exclusion?
Yes. Moving to Texas does not prevent the exclusion. You must satisfy the ownership, use, and prior-sale lookback requirements as of the sale date.
What if I rent my California home for six months and then sell it?
A six-month post-move rental does not automatically eliminate the exclusion or erase prior residence. You may still qualify if the five-year window contains at least 730 days of principal-residence use. Depreciation allowed or allowable during the rental period cannot be excluded and may be taxed at a maximum federal rate of 25%.
Does California conform to the Section 121 exclusion?
Yes. California generally follows the federal Section 121 exclusion. California residency status does not independently cancel the exclusion.
Does moving to Texas eliminate California tax on the sale?
Not necessarily. Any gain remaining taxable after Section 121 is California-source income because the property is located in California. Moving to Texas can affect California's authority to tax other income, but it does not change the source of gain from California real estate.
How does the FTB determine whether I am still a California resident?
The FTB evaluates the complete facts and circumstances, including physical presence, permanent home, family, employment, business and social ties, registrations, and intent. The 546-day safe harbor is limited to qualifying employment-related absences and is not a general rule for permanent relocators.
Can I claim the exclusion if I sell more than 24 months after moving?
Possibly. A longtime resident generally remains eligible for close to three years after moving because the five-year window can still contain two years of earlier residence. Calculate the exact number of qualifying days and leave a closing buffer.
What if my spouse stays in the California home after I move?
The spouse who remains continues accumulating qualifying use. The spouse who moved relies on earlier use until those days fall outside the five-year window. Both spouses must individually meet the use test for the full $500,000 exclusion.
Do I need to file a California return after selling as a Texas resident?
A taxpayer with a California filing requirement generally files Form 540NR. If California tax was withheld on Form 593, a return is generally required to claim the withholding credit or refund. Do not state that every fully excluded sale automatically requires Form 540NR; the seller's complete filing circumstances must be reviewed.
Does buying another home in Texas defer the gain?
No. Buying a replacement principal residence does not defer gain from the California sale. The former replacement-home rollover rule no longer applies. Section 1031 generally applies only to real property held for business or investment, not to a personal residence, although mixed-use and converted properties require specialized analysis.
Sources
- [1]
- [2]
- [3]
- [4]
- [5]
- [6]
- [7]
- [8]
- [9]
- [10]
Related Articles
The Capital Gains Trap Californians Don't See Coming
How California's tax system hits home sellers harder than expected, and what to do about it.
Community Property vs. Separate Property: How Texas Law Affects Your California Trust
Why your California trust may not protect your Texas home, and what to do about it.
First 90 Days After Leaving California: Establishing Texas Residency
A step-by-step guide to the paperwork and planning that solidifies your new Texas domicile.
California Home Equity to Texas Wealth: The Real Math
How much equity do California sellers actually keep after selling? We break down the numbers.
Planning a cross-state sale and purchase?
The timing and tax implications are specific to your situation. Reach out for a no-pressure conversation about your timeline, your numbers, and what questions to ask your CPA before you list.