The IRS 2-of-5-year rule determines your federal capital gains exclusion. Massachusetts adds a 12% short-term rate on property held under 1 year — the two rules together shape your optimal sale timing.
Under IRS Section 121, you can exclude up to $250,000 of gain (single filer) or $500,000 (married filing jointly) from federal capital gains tax — provided you have used the home as your primary residence for at least 2 of the last 5 years ending on the sale date. The 2 years do not need to be consecutive.
Massachusetts follows the same rule for state capital gains purposes. The state rate on long-term capital gains is 5% flat. If you sell before meeting the 2-year threshold, the full gain becomes taxable — though pro-rated partial exclusions are available for qualifying hardships (job relocation 50+ miles, divorce, medical necessity).
Massachusetts imposes a 12% capital gains rateon property sold within 1 year of purchase — much higher than the standard 5% long-term rate. This applies to all property types, including primary residences that don't qualify for the §121 exclusion. If you're planning to sell shortly after buying, wait at least 1 year to drop from 12% to 5% on your Massachusetts tax bill.
Sellers pay a real estate transfer tax (deed excise) of $4.56 per $1,000 of sale priceat closing, regardless of how long the home was owned. On a $400,000 sale, that's $1,824. Dukes County (Martha's Vineyard) adds a 2% land bank fee on the portion over $100.
| Scenario | Federal Tax | MA State Tax | Transfer Tax | Timing Note |
|---|---|---|---|---|
| Lived there 2+ years of last 5 (primary residence) | Up to $250K excluded (single) / $500K (married) — IRC §121 | Same exclusion applies to MA capital gains — 5% flat rate on taxable gain | $4.56/$1,000 paid by seller at closing | Sell any time after 2-year mark |
| Lived there under 2 years — job relocation (50+ miles) | Pro-rated exclusion allowed — partial exclusion based on time lived | Pro-rated exclusion applies; consult MA DOR guidance | $4.56/$1,000 regardless | Hardship exception — can sell before 2-year mark |
| Lived there under 2 years — divorce | Each spouse may claim up to $250K if meeting requirements | Same federal treatment generally followed | $4.56/$1,000 regardless | Divorce is qualifying hardship for partial exclusion |
| Investment property (never primary residence) | No §121 exclusion — all gain taxable; §1031 exchange available | Full gain taxable at 5% (long-term) or 12% (under 1 year held) | $4.56/$1,000 regardless | Hold 1+ year for long-term rate |
| Sold before 1 year (any property type) | Short-term capital gains — taxed as ordinary income (up to 37%) | Massachusetts taxes short-term gains at 12% (property under 1 year) | $4.56/$1,000 regardless | Avoid selling before 1 year if possible — highest tax rate |
Cash offer in 24 hours. Close in 7 days. We handle all conditions and timelines.
Call (401) 396-7427Get Cash Offer →2 of the last 5 years as your primary residence (IRS §121). Excludes up to $250K (single) or $500K (married) from federal capital gains. Massachusetts follows the same rule at 5% state rate. Selling before 1 year held triggers MA's 12% short-term rate.
$4.56 per $1,000 of sale price, paid by the seller at closing — regardless of how long you owned the home. Dukes County adds a 2% land bank fee on the portion over $100.