If you owned and lived in your home for at least 2 of the 5 years before you sell, you can generally exclude up to $250,000 of gain, or $500,000 for joint filers who meet the conditions (IRC § 121). Service members can elect to suspend that 5-year period while they or a spouse are on qualified official extended duty, and the suspension can last up to 10 years (§ 121(d)(9)). Gain equal to depreciation you took, or could have taken, on the home as a rental is not excluded (§ 121(d)(6)).

The short version

  • The basic test: ownership and use as your principal residence for periods totaling 2 years in the 5 years ending on the sale date. The 24 months need not be consecutive.
  • The military election suspends the 5-year clock while you or your spouse are on qualified official extended duty, for no more than 10 years.
  • Qualified duty means a duty station at least 50 miles from the home, or living in government quarters under orders, on orders for more than 90 days or an indefinite period.
  • Renting the home after you move out is generally not "nonqualified use."
  • Gain equal to depreciation from the rental years is not excluded either way.
  • California follows the same exclusion and the military suspension, but taxes the gain at ordinary rates.

Who qualifies for the suspension

Use this as a checklist. All three parts must fit (§ 121(d)(9); IRS Publication 523):

  1. Who: you or your spouse.
  2. Where: a duty station at least 50 miles from the home, or living in government quarters under government orders.
  3. How long: active-duty orders for more than 90 days or for an indefinite period.

The suspension "can't last more than 10 years" (Publication 523). Ask a tax professional how to make the election on the return for the year of sale.

How the suspension changes the timeline

Without the suspension, the 2 years of use must fall inside the 5 years before the sale. For example, a service member who lives in a home for 2 years, receives PCS orders and rents it out would no longer meet the 2-of-5 test once more than 3 years pass after moving out. The suspension stops the 5-year clock during qualified duty, for up to 10 years, so the years of use stay inside the window longer.

For exampleWhat happens
You live in the home for 2 yearsYou meet the use test as of your move-out date
You receive PCS orders to a station at least 50 miles away, for more than 90 daysYour qualified official extended duty begins
You rent the home while on those ordersIf you elect, the 5-year period is suspended during that duty, up to 10 years
You sellThe 5 years are counted back from the sale date, skipping the suspended period

This is an illustration only. Your result depends on your dates, your orders and your spouse's situation. The home sale exclusion timeline lays out your dates so you can take them to a tax professional.

Renting and "nonqualified use"

Gain allocated to periods of nonqualified use is not excluded (§ 121(b)(5)). Nonqualified use "means any period after 2008 when neither you nor your spouse (or former spouse) used the property as your main home, with certain exceptions" (Publication 523). The exceptions matter for military owners. These periods do not count as nonqualified use:

  • any part of the 5-year period that falls after the last date you used the home as your principal residence, such as moving out and then renting before the sale;
  • any period, up to 10 years in total, when you or your spouse are on qualified official extended duty;
  • temporary absences, up to 2 years in total, due to a change of employment, health or unforeseen circumstances.

The order matters. In an IRS example in Publication 523, an owner who rented a home first and moved in later had part of the gain allocated to nonqualified use. In another IRS example, an owner who lived in the home first and rented it after moving out could still exclude up to $250,000, but not the depreciation.

Depreciation still counts

Once a home becomes a rental, you depreciate it, and depreciation lowers your basis. Publication 523: you "can't exclude the part of your gain equal to any depreciation allowed or allowable." That includes depreciation you were entitled to but did not claim.

  • Federal rate. Gain from depreciation on real property is generally "unrecaptured section 1250 gain," taxed at a maximum rate of 25% (IRC § 1(h); Publication 544, 2025).
  • California rate. California has no lower rate for capital gains, so it taxes the whole gain, including the part from depreciation, as ordinary income.
  • NIIT. Gain excluded under § 121 is not subject to the 3.8% Net Investment Income Tax (IRS).

For how depreciation basis is set when a home becomes a rental, see rental property depreciation.

California at the sale

California conforms to the federal § 121 exclusion (FTB Publication 1001), and FTB Publication 1032 says California follows the military suspension of the 5-year period "for up to 10 years of such duty time." At closing, escrow generally withholds 3 1/3% of the sales price unless the seller certifies an exemption on Form 593. One exemption covers a home that was your principal residence under § 121. The separate exemption for a home "last used" as a principal residence does not apply if the last use was as a rental. The Form 593 instructions point military sellers to Publication 1032. See California taxes for military homeowners.

For owners

  • Keep your orders, with dates and duty station, in the same file as your closing papers and depreciation records.
  • Keep your federal and California depreciation schedules. California's can differ, which can make the California gain differ too.
  • If you exchange the rental under § 1031 instead of selling, § 121 does not apply to a sale of the replacement property during the 5 years after you acquire it (§ 121(d)(10)).
  • Do not compute your exclusion from a summary. The rules interact, and the outcome depends on your facts.

For the broader keep-or-sell decision, see PCS orders: keep and rent or sell, and for the tax side of selling a former home, selling a former home after renting it. McKee Properties manages rentals from its Coronado office; contact us with questions about your property.

Help on base

Your installation legal assistance office may be able to help eligible service members with questions about a sale, and your installation housing office is another place to start with questions about the move. To find a legal office, Military OneSource points to its Legal Services Locator and to 800-342-9647. For the tax return, work with a tax professional.

Frequently asked questions

Can I rent out my home after PCS and still sell it tax free later?

Possibly. If you lived there at least 2 of the 5 years before the sale, the exclusion can apply, and the military election can suspend the 5-year period for up to 10 years while you or your spouse are on qualified official extended duty. Renting after you move out is generally not nonqualified use. Gain equal to depreciation from the rental years is still not excluded.

What counts as qualified official extended duty?

Active-duty orders for more than 90 days or for an indefinite period, at a duty station at least 50 miles from the home, or while living in government quarters under government orders. It can be your duty or your spouse's (§ 121(d)(9); Publication 523).

Does the suspension let me exclude depreciation too?

No. Section 121(d)(6) and Publication 523 say you cannot exclude gain equal to depreciation allowed or allowable after May 6, 1997. Federally, that gain is generally taxed at a maximum rate of 25%. California taxes all gain as ordinary income.

Does California follow the military suspension?

Yes. FTB Publication 1032 says California conforms to the military suspension of the 5-year period for up to 10 years of qualified duty. At closing, Form 593 withholding applies unless an exemption is certified; the "last used as a principal residence" exemption is not available if the home was last used as a rental.

What if I rented the home before I ever lived in it?

Then part of the gain can be allocated to nonqualified use and not excluded. The exception for renting after your last use as a main home does not cover a rental period before you moved in. Publication 523 has an IRS example showing the allocation; take your dates to a tax professional.

This is general information, not legal or tax advice. Rules change; confirm your situation with your installation legal assistance office, a California attorney or a tax professional.

Sources

Verified October 19, 2026.

Talk With a Local Property Expert

Ask your questions, get honest answers, and see if we’re the right fit — no commitment.

Schedule a Call