3 IRS numbers for a move: 50 miles, 730 days, 24 months
Before you start
Keep your move date, the mover’s name and any written estimate within reach. The sources linked below hold the rules for your state and your kind of move.
Early takeaways
- The distance number belongs to the home-sale rules, not to a general moving deduction: a new job must put you at least 50 miles farther from the home than your old work location, per Publication 523.
- The full home-sale test looks back over five years, and you must have lived in the house as your primary residence for at least two of them.
- The moving deduction is suspended for most taxpayers.
- The full home-sale exclusion cap differs for a single seller and a married couple filing jointly.
- The exclusion for moving expense reimbursements still covers certain Armed Forces and federal Intelligence Community personnel.
This is who it is for
This guide is for a household mover who has seen the numbers in the title in a move guide and is close to choosing between a job move, a home sale, or both. You need to know which rule each number belongs to, and whether your own dates and distances meet it, before you plan a sale or a move.
Red flags: you are a civilian who expects a plain moving-expense deduction for a non-military move; you have not yet lived in the home long enough to meet the residence test and your sale has no job, health or other qualifying event behind it.
The short answer: three numbers, three rules
A partial exclusion is a reduced cap on tax-free gain from a home sale, and the IRS scales that cap by the shortest period you qualify for. TL;DR: the distance figure opens a reduced exclusion for a job move, the residence figures set the time test for the full exclusion, and the moving deduction that many guides still attach to the distance figure is closed to most taxpayers.
Each number decides something different. The distance test decides whether a seller who changes jobs can still claim part of the exclusion. The residence and ownership tests decide whether a home sale is fully excluded. The moving deduction decides whether certain move costs come off your income, and most households cannot claim it anymore. Only the first two touch the sale of a home.
The distance number: a job-move test for a home sale
The distance test is written as a comparison with your old workplace. Distance test: at least 50 miles farther according to IRS. The new work location has to sit at least that far from the home compared with the old one, so the test is about where you work, measured from where you live.
The same publication covers a second case. If you had no previous work location, you qualify when you began a new job at least 50 miles from the home, per Publication 523.
The distance number matters for a home sale because it can support a reduced exclusion. It does not give you a deduction for the cost of the move itself.
The limit here is that the test is about the work location change, not the move. A long drive with no change in where you work does not satisfy it, and a short move with a new job farther from the home can.
The residence number: the full exclusion's time test
The residence test is the time-in-the-home rule behind the full exclusion. The IRS puts it this way: "All that is required is a total of 24 months (730 days) of residence during the 5-year period," per Publication 523.
Ownership runs on the same clock. Ownership test: 24 months out of the last 5 years according to IRS. The IRS sets both tests over the five years leading up to the sale, so the window you count is the five years before closing, not a calendar you pick.
The residence requirement can also be stated in years: you must have lived in the house as your primary residence for at least two of the last five years, according to homelight.com. The two sources agree; one gives the count of 24 months (730 days) and the other gives the years.
There is also a repeat-sale limit. Per IRS, you are not eligible for the exclusion if you excluded the gain from the sale of another home during the two-year period before the sale of your home.
The 24-month number: the same test in months, and the partial-exclusion divisor
The 24-month number is the residence and ownership standard written in months, and it is also the divisor used when the IRS works out a partial exclusion. Per Publication 523, take the smallest period from your steps (you may use days or months), divide that number by 730 if using days or by 24 if using months, and then multiply the result by the full cap for a single seller to get your reduced exclusion.
Use the day divisor with a count in days, or the month divisor with a count in months. Do not mix one from each. Mixing them is an easy slip, because both numbers describe the same test.
The partial exclusion does not need the full time test to be met. It is a fraction of the cap, and the fraction depends on the shortest period you can document.
Moving-expense deduction: the number most guides still attach
Many move guides place the distance figure beside the moving-expense deduction, but for most taxpayers that deduction is gone. The moving expense deduction has been suspended, and the One Big Beautiful Bill Act made that suspension permanent, according to blog.turbotax.intuit.com.
The Journal of Accountancy says H.R. 1 made the TCJA's elimination of the moving expense deduction permanent, and that starting in 2026, certain members of the intelligence community will also be eligible, according to Journal of Accountancy. Those are the two groups who still have a moving deduction on the federal side: active-duty members of the armed forces, and the intelligence community employees added for 2026.
For active-duty members, the deduction applies when a military order requires a permanent change of station.
The employer side is covered too. The Act permanently ends the exclusion from income for moving expense reimbursements, except for certain active-duty personnel in the Armed Forces and Intelligence Community, according to taxschool.illinois.edu.
So if your employer pays for a civilian move, neither the deduction nor the reimbursement exclusion is likely to help. That leaves the home-sale rules as the only place the three numbers still matter for most households.
Caps, periods and limits
The IRS states one full exclusion cap for a single seller and another if you file a joint return with your spouse, per IRS. The cap and period table below this sentence names each rule, its amount or period, and the case it covers.
| Rule | Amount or period | Applies to |
|---|---|---|
| Full exclusion cap, single seller | the single-filer cap on gain | Single filer |
| Full exclusion cap, joint return | the joint-return cap on gain | Married filing jointly |
| Ownership test | 24 months out of the last 5 years | Any seller |
| Residence test | 24 months (730 days) within the 5-year period | Any seller |
| Distance test, partial exclusion | at least 50 miles farther | Sale after a work-related move |
| Repeat-sale limit | two-year period before the sale | Sellers with a recent exclusion |
The partial exclusion uses the same cap as its base, reduced by the fraction described above. A seller who meets the full time test does not need the fraction at all.
Head to head: which rule each number belongs to
The number comparison table sets the three options side by side. The distance and residence figures come from Publication 523, and the deduction status is covered in the moving-expense section above.
| Option | What it measures | Test or status | Who it fits |
|---|---|---|---|
| Distance test for a partial exclusion | Distance of the new workplace from the home | at least 50 miles farther | Sellers whose sale follows a job change |
| Full residence test | Time lived in the home | 24 months (730 days) within 5 years | Sellers who meet the time test |
| Moving-expense deduction | Unreimbursed move costs | suspended for most taxpayers | Active-duty members on a permanent change of station order and certain intelligence community employees |
The first two options are about a home sale, and the third is about the cost of the move. Read the table by asking which of those two decisions you are making.
Worked example: one job move and one sale
Take the example the IRS uses for a work-related move. Publication 523 describes an old work location 15 miles from the home and a new work location 65 miles from the home, so the new workplace is the farther one. The comparison is made from the home, which is why the home is the fixed point in the calculation.
Publication 523: 65 miles − 15 miles = 50 miles.
That difference clears the distance test, so if this seller falls short of the full time test, the sale can still qualify for a partial exclusion. A single seller who meets the full residence test skips the fraction and keeps the full cap, per IRS. A seller who falls short divides the shortest period by 730 days or 24 months and multiplies that fraction by the full cap, per Publication 523. Your own dates decide which of those two paths you are on, and the difference in your result comes from how long you actually lived in the home.
Common mistakes
- Treating the distance figure as a moving-deduction test. Most people cannot claim that deduction at all now.
- Assuming the two years must be consecutive. The IRS wording is "All that is required is a total of 24 months (730 days) of residence during the 5-year period," per Publication 523.
- Forgetting the repeat-sale limit. Per IRS, an earlier exclusion within the two-year period before the sale blocks the full exclusion.
Glossary
- Work-related move: a move tied to a new job or a change in where you work, which can support a partial exclusion.
- Residence test: the requirement to have lived in the home as your main home for a set length of time within the five-year window.
- Ownership test: the requirement to have owned the home for a set length of time within the same window.
- Partial exclusion: a reduced cap on tax-free gain, based on the shortest qualifying period.
- Permanent change of station (PCS): a move ordered by the military, which is the basis for the active-duty moving deduction.
Checking your own numbers
- Measure from the home to your old work location and to your new one, and confirm the new one is farther.
- Pull the dates from your closing statement and purchase records, and count the months you owned and lived in the home inside the five-year window.
- Compare your count with the full time test of 24 months (730 days), per Publication 523.
- If you fall short, use your shortest qualifying period with the day or month divisor to work out the reduced cap.
- Check which cap applies to your filing status, single seller or joint return, per IRS.
Which IRS number should you pick?
- If your home sale follows a job change, pick the distance test because it can still give you a partial exclusion when you fall short of the full residence test.
- If you have lived in the home for the full residence period, pick the full home-sale exclusion because the cap applies without the reduction.
- If you are an active-duty member moving under a permanent change of station order, pick the moving-expense deduction because it is the one deduction still open to you.
- If your employer pays for a civilian move, do not count on a moving deduction or a tax-free reimbursement; only the home-sale rules can still help.
FAQs
Does the distance test still apply to a moving deduction?
For most people no, because the moving-expense deduction has been suspended, and the distance test you will see now sits in the home-sale rules.
Can I deduct my moving costs if I am not in the military?
Usually not, because the deduction is limited to active-duty members of the armed forces and certain intelligence community personnel, per Journal of Accountancy.
Is the residence test the same as 24 months?
Yes, the IRS writes the residence test as 24 months (730 days), so the two are one standard in different units, per Publication 523.
Do the two years have to be in a row?
No. The IRS wording is "All that is required is a total of 24 months (730 days) of residence during the 5-year period," per Publication 523.
Does a home sale need to be my main home?
Yes, the residence test counts time in the house as your primary residence, as described in the residence section above.
What if I sold another home recently?
You are not eligible for the full exclusion if you excluded gain from another home during the two-year period before this sale, per IRS.
Sources for this guide
- United States Postal Service Sources read on
- Internal Revenue Service Sources read on
- U.S. Census Bureau Sources read on
General information, not legal, tax or immigration advice. Rivewyn is not a mover, a broker or a government agency. Your own rule is on the agency’s page, so read that.