For most Gilbert homeowners, selling a primary residence represents a significant financial milestone. Under Section 121 of the Internal Revenue Code, the tax code offers a substantial reward for long-term residency: an exclusion of up to $250,000 in capital gains for single filers, and $500,000 for married couples filing jointly. To secure this benefit, the IRS generally requires you to have owned and occupied the property as your main home for at least two out of the five years leading up to the sale date.
However, at Martinez & Shanken PLLC, we often see life trajectories that do not align perfectly with the IRS calendar. Career shifts, health crises, and unexpected family changes can force a sale much sooner than anticipated. If you find yourself in this situation, you are not necessarily disqualified from tax relief. The IRS provides for a "partial exclusion" when the sale is driven by specific qualifying events. Understanding these exceptions is vital for Arizona residents looking to protect their home equity from unnecessary taxation.
The most frequent trigger for a partial exclusion is a change in the place of employment. If you are moving to start a new job or because your current employer is transferring you, you may qualify for a pro-rated exclusion. The IRS uses a "safe harbor" distance test to determine eligibility: your new place of work must be at least 50 miles farther from your home than your previous workplace was. If you were not previously employed, the new job site must be at least 50 miles from the home you are selling.
This relief is not restricted solely to the primary taxpayer. At Martinez & Shanken PLLC, we advise clients that the move can be triggered by a spouse, a co-owner, or even another resident who considers the property their primary home. If any of these individuals face a qualifying job change, the entire household may benefit from the partial exclusion.

A sale is considered health-related if the primary motivation is to facilitate the diagnosis, treatment, or mitigation of a medical condition. This also extends to moving so you can provide essential care for a family member. It is important to distinguish this from moves made for "general well-being," such as relocating to a dryer climate for comfort. Generally, a recommendation from a licensed physician is necessary to substantiate this claim to the IRS.
The definition of a "qualified individual" regarding health moves is surprisingly broad. It includes the taxpayer and spouse, but also extends to parents, grandparents, children, siblings, and even extended family members like aunts, uncles, or in-laws. If the move is necessary to care for any of these individuals, the partial exclusion remains on the table.
The IRS also recognizes that "unforeseen circumstances"—events you could not have reasonably predicted before moving in—can necessitate an early sale. While this category can be subjective, the IRS provides a list of safe harbor events that automatically qualify:

The partial exclusion is not an "all or nothing" benefit; it is calculated as a fraction of the maximum $250,000 or $500,000 limit. The math is based on the shortest of three periods: your time of ownership, your time of residency, or the time elapsed since you last used the exclusion. You divide this period (in days or months) by 730 days or 24 months.
For example, imagine a single filer in Gilbert who moved for a job after living in their home for 12 months. Since they met 50% of the 24-month requirement, they can exclude up to $125,000 of their gain (50% of the $250,000 maximum). This calculation ensures that taxpayers receive a fair benefit proportional to their time in the home.
Determining if your situation meets the IRS threshold is often a nuanced process. If you are moving or sold a home before the two-year mark, Martinez & Shanken PLLC can help calculate your exclusion and ensure your documentation meets standards. Contact our Gilbert office today to explore your options.
For those whose situations do not fall under a specific safe harbor, the IRS utilizes a "facts and circumstances" test to evaluate the primary reason for the sale. This examination considers whether the event and the sale were close in time, whether the circumstances were truly beyond the homeowner's control, and whether the event significantly altered the financial ability to maintain the home. By analyzing these factors, taxpayers may still secure a partial exclusion for unique life events that aren't explicitly listed in the regulations. Our team at Martinez & Shanken PLLC specializes in helping Gilbert residents build a strong case by organizing the necessary evidence to support these non-standard claims.
Service members and Foreign Service officers should also be mindful of the "stop the clock" rule, which allows for the suspension of the five-year residency test for up to ten years while on qualified official extended duty. This provision is vital for those stationed away from their primary residence, as it preserves their eligibility for the Section 121 exclusion despite being away for long periods. Additionally, if you have claimed a home office deduction or used your property for business, it is crucial to account for depreciation recapture. While the partial exclusion can offset capital gains, it does not apply to the portion of the gain equivalent to depreciation taken since 1997. Maintaining detailed records of home improvements and business use is the most effective way to ensure you are capturing every available tax benefit while staying fully compliant with IRS regulations.
Sign up for our newsletters and get our articles delivered right to your inbox.