Selling a House Before 2 Years: Tax Rules in California

You can generally sell a house before two years, including soon after buying it. There is no separate federal tax penalty just for selling early, but your gain, holding period, and eligibility for the home-sale exclusion determine whether you owe capital gains tax.
The two-year mark matters for taxes, not as a general ban on selling.
What Selling Before Two Years Changes
Sellers often expect an IRS fine for an early sale, but there is no separate early-sale charge. Capital gains tax depends on the taxable gain after adjusted basis, eligible selling expenses and any available exclusion are considered.
The main-home exclusion is explained in IRS Topic 701. A qualifying taxpayer may exclude up to $250,000 of gain, while certain married couples filing jointly may exclude up to $500,000 if the ownership, use, and prior-sale tests are met.
Missing the full two-year test does not automatically make the entire sale price or gain taxable. There may be no gain after basis and selling costs, and some sellers qualify for a partial exclusion because of work, health, or an unforeseen event.
A tax preparer should calculate the actual result before you choose a closing date. If you received homebuyer assistance or a federal mortgage subsidy, ask whether selling also triggers repayment or recapture of that benefit.
How Soon Can You Sell a House After Buying It?
For an ordinary California home purchase, you can generally resell once you own the property; California Civil Code Section 1044 permits property transfers subject to its exceptions. Your deed, purchase agreement, mortgage, or homebuyer-assistance program may have conditions or repayment obligations that need to be checked before you commit to a sale.
Being allowed to sell does not mean every buyer can finance the purchase immediately. If you bought recently, ask about the buyer’s loan program before agreeing to the contract dates.
The FHA 90-Day Resale Restriction
Under HUD’s FHA resale rules, a property resold 90 days or fewer after the seller acquired it is generally ineligible for an FHA-insured mortgage, subject to exceptions. HUD measures this from the seller’s acquisition of legal ownership to the date all parties sign the resale contract, not the buyer’s closing date.
This restricts the new buyer’s FHA financing; it is not a tax penalty or a blanket ban on selling to a cash buyer. Have the buyer’s lender confirm eligibility and any applicable exception before you sign, rather than assuming a later closing will solve the problem.
Work Out What You’ll Keep After the Sale
If you bought only a few months ago, a higher resale price may still leave you short of recovering what you spent. Include your original purchase costs, any work you paid for, and the costs of selling the house when comparing your options.
Ask for an itemized seller’s net estimate. To estimate cash at closing, subtract these from the sale price:
- Transaction charges: Your share of selling costs, buyer credits and closing adjustments.
- Debt payoffs: The mortgage and other debts that must be paid through the sale.
Request a dated mortgage payoff quote from your servicer; the balance on your monthly statement may not include interest through closing or unpaid fees. Check whether your loan has a prepayment penalty rather than assuming every mortgage does.
For a home you purchased, basis generally starts with the purchase price, plus eligible acquisition costs and qualifying improvements, then changes for items such as depreciation. It is not your down payment or the amount still owed on the loan.
If you can afford to wait, compare potential tax savings with the extra cost of holding the house:
- Interest and applicable loan costs.
- Insurance, property taxes and HOA dues.
- Utilities and upkeep.
Waiting for an anniversary is not automatically the cheaper choice. A loss on the sale of a personal-use home is generally not deductible.
The Rate Changes Depending on How Long You’ve Owned It
The IRS does not tax every early sale the same way. A gain is generally long-term only when the property was held for more than one year; a holding period of one year or less is generally short-term.
One Year or Less: Ordinary Income Rates
A net short-term capital gain is taxed at ordinary federal income-tax rates. The exact rate depends on the tax year, filing status, taxable income, and other items on the return.
IRS Topic 409 explains the short- and long-term distinction.
More Than One Year but Under Two: Long-Term Rates
When a nonexcluded gain is long-term, federal rates are generally 0%, 15%, or 20% depending on taxable income, with special rates for some types of gain. Income thresholds change by tax year; ask your tax preparer to apply the correct year.
A separate 3.8% Net Investment Income Tax may also apply to taxable gain, depending on income and the other requirements. Gain excluded under the home-sale rule is not included in that tax.
If a closing date is near the one-year holding threshold, ask a CPA to verify the acquisition date, sale date, and tax effect before changing the contract. Do not move a closing based on a rough month count.
What the 5-Year Rule Actually Means
The five years are usually a look-back window, not a requirement to keep the house for five years. For the main-home exclusion, IRS Publication 523 explains three basic tests:
- Ownership: Generally own the home for at least 24 months within the five years before sale.
- Use: Generally live in it as your main home for at least 24 months within that window. The ownership and use periods need not be identical.
- Prior exclusion: Generally do not claim another home-sale exclusion within the preceding two years.
The two years do not have to be consecutive. The use test counts the periods when the property was actually your main home within the five-year window.
A work or health-related absence does not automatically count as residence time, though a qualifying work, health, or unforeseen event may support a partial exclusion when the full test is not met.
For a married couple filing jointly to claim up to $500,000, check each spouse’s eligibility:
- Ownership: Either spouse can meet the test.
- Use: Both spouses must meet the test.
- Prior exclusion: Neither spouse can be disqualified by another exclusion in the preceding two years.
One or both spouses may still qualify for a smaller exclusion if the joint-return tests are not met. Special rules can change the result for a surviving spouse, divorce or qualified extended duty. A home acquired in a Section 1031 exchange within the preceding five years also faces a separate exclusion restriction.
Do You Have to Buy Another House After Selling to Avoid the Tax?
You do not have to buy another home to qualify for the home-sale exclusion. The old replacement-home rollover rule was replaced in 1997, so buying again is not what determines whether your gain is excluded.
Under the current exclusion system, there’s no requirement tied to what you do with the proceeds after closing. Sellers who qualify keep it whether they buy another home afterward or put the money somewhere else entirely.
A Section 1031 exchange is different. It can defer gain on qualifying business or investment real property, often through a qualified intermediary; it is not the ordinary main-home exclusion.
Under the IRS deferred-exchange rules, the usual deadlines are:
- Identify replacement property: Within 45 days after transferring the property you give up.
- Receive replacement property: Within 180 days after transfer or by the tax-return due date, including extensions, whichever is earlier.
For a planned deferred exchange, arrange the structure with an exchange professional before closing. Receiving the sale proceeds yourself can prevent the transaction from qualifying, and missing an applicable identification or receipt deadline generally means the gain cannot be deferred under Section 1031.
The Partial Exclusion: When Life Doesn’t Wait for Two Years
A qualifying divorce-related sale, work move, or health issue can make a partial exclusion available even when you haven’t reached two years. Publication 523 explains the qualifying circumstances and how to calculate the reduced limit.
IRS safe harbors are defined situations that can establish eligibility. Check the details for the reason that primarily caused your sale:
- Work: The new workplace is generally at least 50 miles farther from the home than the old one, or at least 50 miles from home when there was no prior workplace.
- Health: A qualifying move for treatment or care, or a doctor-recommended change of residence, may qualify. A move merely for general well-being is not enough.
- Unforeseen events: Examples include:
- A casualty or condemnation affecting the home.
- A qualifying household member’s death, divorce or legal separation.
- Multiple births from one pregnancy.
- Eligibility for unemployment compensation.
- An employment change that makes basic living expenses unaffordable.
Other facts and circumstances may qualify even when no safe harbor fits. A CPA can confirm the rule and documentation for the actual situation.
A Sale We Closed in Fallbrook
A recent deed transfer does not automatically stop a sale. Fox Bridge Court shows the practical side of that question: getting the title and association paperwork through closing is separate from calculating the seller’s tax.
Rental and Inherited Homes Have Different Rules
An inherited home raises two different timing questions:
- Capital-gain holding period: Inherited property is generally treated as long-term under IRC § 1223(9), regardless of how long the heir personally held it.
- Main-home exclusion: Ownership and use are separate tests. An heir generally needs their own qualifying ownership and residence periods; surviving spouses and other special situations have additional rules.
Sellers sometimes ask whether a rental they’ve been holding for 18 months qualifies under the same two-year standard as a primary residence. A property held only as a rental generally does not qualify for the main-home exclusion just because you have owned it for two years.
For property that is not inherited, a capital gain is generally long-term only when the property was held for more than one year. If the home was rented, depreciation and periods of nonqualified use can affect the taxable amount even when some gain qualifies for an exclusion; our guide to calculating capital gain on a rental property explains those additional calculations.
How California Taxes an Early Home Sale
California does not offer a lower tax rate just because a gain is long-term. The Franchise Tax Board taxes capital gains as ordinary income, so reaching one year does not create a preferential state rate.
California generally follows the main-home gain exclusion. Reaching the ownership and use requirements can therefore affect the state result, even though California does not distinguish short- and long-term gains through separate rates.
Selling Before 2 Years: Common Questions
Is there a penalty for selling a house before two years?
No separate federal penalty applies just because you sell early. You may owe tax on a gain, but the result depends on adjusted basis, selling expenses, holding period, the full Section 121 exclusion, and any available partial exclusion.
Do you have to buy another house after selling to avoid the tax?
No. That rollover rule ended in 1997, and today the home-sale exclusion is not tied to what you do with the proceeds.
A qualifying like-kind exchange is a separate rule for investment or business real property, with a 45-day identification period and a receipt deadline that is generally 180 days after transfer or the tax-return due date, including extensions, if earlier. It does not replace Section 121 for an ordinary principal-residence sale.
Are inherited properties taxed as long-term?
Yes. Under IRC Section 1223(9), inherited property is treated as long-term for capital-gain holding-period purposes no matter how long the heir has held it.
Basis is generally the property’s fair market value at the date of death, subject to exceptions and elections. A CPA should calculate the basis rather than assume the taxable gain will be small.
How does California tax the gain?
California does not provide the same preferential long-term capital-gains rates used on the federal return. Capital gain is generally included in California taxable income and taxed under the applicable state brackets.
Use the current-year FTB rules and a tax professional to determine the actual California treatment.
Who qualifies for the partial exclusion?
Sellers whose main reason for the early sale is a qualifying work move, health issue, or unforeseen event may qualify. IRS Publication 523 lists safe harbors and a facts-and-circumstances test.
The calculation uses the shortest qualifying period among ownership, use, and time since the last exclusion, so a CPA should calculate the allowable amount.
If You’re Facing an Early Sale in Southern California
If a cash sale would help with your move, we buy houses across Orange, Los Angeles, Riverside, San Bernardino, and San Diego counties. Call (951) 331-3844 or request a cash offer so you can compare it with listing the property and waiting.
About the Author
Andrea Van Soest is a licensed real estate agent (California DRE #01505854) and co-founder of SoCal Home Buyers alongside her husband Doug Van Soest. She handles rehab project management, property listings, and the systems infrastructure for the team.
Together, Doug and Andrea have completed over 400 transactions across Southern California since 2008.
