Massachusetts capital gains tax on real estate starts at a flat 5% on long-term gains, and a 4% surtax is added to every dollar of 2026 income above $1,107,750, so one large sale can be taxed at 9% at the state level. A 1031 exchange in Massachusetts defers that state tax along with the federal capital gains, depreciation recapture and net investment income tax, as long as you reinvest through a qualified intermediary. For nonresident sellers, the exchange also shapes the new withholding that applies at closings of $1 million or more.
Reviewed by Jon Hilley, CEO & Founder of 1031 Specialists. Last reviewed September 29, 2026.
| State tax on real estate gains | 5% on long-term gains; 8.5% on gains from property held one year or less |
|---|---|
| Long-term capital gains treatment | No preferential rate or exclusion; 4% surtax on 2026 income above $1,107,750 |
| Nonresident withholding at closing | Since November 1, 2025, on sales of $1,000,000 or more: 4% of gross price by default for individuals, or 5% of estimated net gain if elected |
| Withholding form | Form NRW (filed by the closing agent within 10 days) plus a Transferor's Certification from every seller |
| Transfer or conveyance tax (a 1031 does not defer it) | Deeds excise of $4.56 per $1,000 in most counties; lower statutory rate in Barnstable County |
| Clawback on out-of-state replacement property | Yes in effect: nonresidents claiming 1031 relief consent to Massachusetts jurisdiction over the deferred gain |
| Conforms to Section 1031 | Yes, for real property |
Table of contents
- How much is capital gains tax on real estate in Massachusetts?
- Massachusetts tax on a $300,000 gain: worked example
- The 4% surtax and why timing matters in Massachusetts
- Massachusetts nonresident withholding on $1 million sales
- Massachusetts deeds excise and other closing taxes
- Section 1031 conformity and the Massachusetts clawback
- Moving into or out of Massachusetts
- Where 1031 exchanges happen in Massachusetts
- Federal 1031 rules that apply in Massachusetts
- Common Massachusetts 1031 exchange mistakes
- Start your Massachusetts 1031 exchange
- Frequently asked questions
- Sources
How much is capital gains tax on real estate in Massachusetts?
Massachusetts does not give long-term gains a lower rate or a percentage exclusion the way some states do. The Department of Revenue lists these rates for 2025 and 2026:
- 5% on long-term capital gains, the same Part A rate that applies to wages and interest.
- 8.5% on short-term gains from assets held one year or less.
- 4% surtax on total taxable income above $1,107,750 for 2026 ($1,083,150 for 2025). The threshold is indexed every year and applies per return, so a married couple filing jointly shares one threshold.
Depreciation you claimed on a rental or commercial building is not taxed separately by Massachusetts. It is simply part of the long-term gain and taxed at 5%, plus the surtax where your income crosses the line. Federally, that same depreciation is taxed as unrecaptured §1250 gain at up to 25%, which you can estimate with our depreciation recapture calculator. There is no city or county income tax in Massachusetts, including Boston.
Because a 1031 exchange defers recognition of the gain entirely, the surtax never gets triggered by the sale. That is the core reason Massachusetts investors with large, low-basis buildings exchange rather than sell outright. Compare both paths with our capital gains vs. 1031 exchange comparison.
Massachusetts tax on a $300,000 gain: worked example
Assumptions: a $300,000 long-term gain on an investment property, $100,000 of which is unrecaptured §1250 depreciation, a married couple filing jointly who are already in the top federal bracket and whose Massachusetts income is already above the $1,107,750 surtax threshold, so every dollar of this gain is taxed at 5% plus 4%.
| Tax | Math | Amount |
|---|---|---|
| Unrecaptured §1250 gain (depreciation) | 25% x $100,000 | $25,000 |
| Remaining long-term gain | 20% x $200,000 | $40,000 |
| Net investment income tax | 3.8% x $300,000 | $11,400 |
| Federal subtotal | $76,400 | |
| Massachusetts 5% base tax | 5% x $300,000 | $15,000 |
| Massachusetts 4% surtax | 4% x $300,000 | $12,000 |
| Total deferred by a full 1031 | $76,400 + $27,000 | $103,400 |
If the couple's other income is modest, the surtax may apply to only part of the gain, or none of it, and the state line falls toward $15,000. Run your own figures in the 1031 exchange calculator.
The 4% surtax and why timing matters in Massachusetts
The surtax is a bunching tax. A $2 million gain realized in one year can push most of it above the threshold, while the same gain spread across years might not. That makes the exchange decision sharper here than in most states:
- A full exchange keeps the gain off your Massachusetts return entirely for the year of sale.
- A partial exchange, where you take some cash out, creates taxable boot. That boot is added to your other income, and if it lands above $1,107,750 it is taxed at 9%. Size it with the partial 1031 boot calculator.
- If an exchange falls apart late in the year, there are ways to push recognition into the next tax year; see our guide to the failed exchange tax straddle.
Sell a building held a year or less and Massachusetts taxes the gain at 8.5% before any surtax.
Massachusetts nonresident withholding on $1 million sales
Massachusetts began requiring withholding on real estate sold by nonresidents for closings on or after November 1, 2025. It applies when the gross sales price is $1,000,000 or more. The closing attorney, title company or escrow agent acts as the withholding agent, files Form NRW and remits any tax through MassTaxConnect within 10 days of closing.
- Default method: 4% of the gross sales price for nonresident individuals, with additional withholding tied to the surtax, and 4% for corporations.
- Alternative method: the seller can elect withholding on estimated net gain instead, at 5% for individuals (plus the surtax portion) or 8% for corporations.
- Transferor's Certification: every seller on a $1 million sale signs one by closing, even residents and exempt sellers.
For an exchange, the certification has a specific box: the transferor will be deferring all or part of the gain under Code §1031 using a qualified intermediary. Checking it reduces withholding by the portion of the price attributable to the deferred gain. By claiming it, you consent to Massachusetts jurisdiction to tax that gain when it is eventually recognized. Get the certification and your intermediary's exchange agreement to the closing attorney before the closing date, not at the table. Foreign sellers face federal FIRPTA withholding on top of this; see FIRPTA for foreign sellers.
Massachusetts deeds excise and other closing taxes
Massachusetts charges a deeds excise, often called tax stamps, when the deed is recorded. Registries of deeds collect $4.56 per $1,000 of consideration ($2.28 per $500) in most counties. Barnstable County on Cape Cod has a lower statutory base rate under G.L. c. 64D, section 1. By custom the seller pays it. On a $2 million sale outside Barnstable, the excise is about $9,120.
A 1031 exchange does not defer or reduce the deeds excise. It is a transaction cost, paid at closing on the relinquished property, and you can treat it as an exchange expense paid from proceeds. There is no separate Boston transfer tax in effect, so do not budget for one unless the law changes before you close.
Section 1031 conformity and the Massachusetts clawback
Massachusetts follows Section 1031 for real property, so an exchange that works federally also defers the state tax. A Massachusetts resident who exchanges into property in another state simply carries the deferred gain forward and pays Massachusetts tax when the replacement property is sold in a taxable sale while still a resident.
Nonresidents are treated differently in practice. Gain from Massachusetts real estate is Massachusetts source income under G.L. c. 62, section 5A, and the Transferor's Certification makes you consent to Massachusetts jurisdiction for the deferred gain. So if you exchange a Boston triple-decker into a Florida strip center, Massachusetts expects its share when that gain is finally recognized, even years later. Unlike California, Massachusetts does not publish an annual tracking form for this, which makes your own records the evidence. Keep the closing statement, Form 8824 and the certification together.
Moving into or out of Massachusetts
A common pattern is the Massachusetts owner who retires to New Hampshire or Florida and exchanges a rental portfolio into property near the new home. The federal and state deferral survives the move, but the Massachusetts-source character of the original gain does not disappear. Plan the eventual sale, or hold until death for a basis step-up, as explained in our swap till you drop guide.
Buyers coming the other way, for example a New York investor buying in Worcester, should know that Massachusetts taxes only the Massachusetts-source gain of a nonresident, but will collect withholding at the closing if the price hits $1 million. See our pages on 1031 exchanges in New Hampshire and 1031 exchanges in Florida for the destination side.
Where 1031 exchanges happen in Massachusetts
Greater Boston drives most volume: small multifamily in Dorchester, Somerville and Quincy, life science and flex space along Route 128, and retail condos in the suburbs. Worcester and Springfield offer higher cap rates and are frequent landing spots for investors trading out of expensive Boston buildings. Cape Cod, Martha's Vineyard and Nantucket produce many exchanges of vacation rentals, where owners must show investment intent rather than personal use.
Federal 1031 rules that apply in Massachusetts
Name replacement property in writing within 45 days of closing and acquire it within 180 days. A qualified intermediary must hold the sale proceeds; touching them ends the exchange. To defer everything, buy property of equal or greater value and replace the debt you paid off. Check your list with the 45-day identification validator, model boot with the boot calculator, and read the full 1031 exchange guides.
Common Massachusetts 1031 exchange mistakes
- Leaving the Transferor's Certification for closing day. Without the 1031 box checked, a nonresident seller of a $1.2 million property can have $48,000 or more withheld.
- Ignoring the surtax on boot. Cash taken out of an exchange stacks on top of other income and can be taxed at 9%.
- Treating a Cape house as an investment without the facts to back it. Heavy family use can disqualify a vacation home.
- Assuming a move ends Massachusetts' claim. Deferred gain from Massachusetts property is still Massachusetts-source when recognized.
- Forgetting the deeds excise in the reinvestment math. It comes out of proceeds, so budget it when sizing the replacement purchase.
Start your Massachusetts 1031 exchange
Open your exchange before the purchase and sale agreement closes so we can deliver the exchange documents and the information your closing attorney needs for Form NRW. Start your exchange online, book a free intro call, or call (631) 438-1031.
Frequently asked questions
How can I avoid capital gains tax on real estate in Massachusetts?
You can defer it with a 1031 exchange by reinvesting the full proceeds in like-kind investment property through a qualified intermediary. That postpones the 5% state tax, any 4% surtax and the federal tax. Holding the property until death can eliminate the deferred gain through a basis step-up.
What is the Massachusetts capital gains tax rate on real estate in 2026?
Long-term gains are taxed at 5%, and short-term gains at 8.5%. A 4% surtax applies to total 2026 income above $1,107,750, so large gains can be taxed at 9%.
Does Massachusetts withhold tax when a nonresident sells property?
Yes, for closings on or after November 1, 2025 with a gross price of $1,000,000 or more. The closing agent files Form NRW and withholds 4% of the price by default for individuals, unless an exemption or reduction applies.
Does a 1031 exchange stop Massachusetts nonresident withholding?
It can reduce it. On the Transferor's Certification you certify that you are deferring gain under Section 1031 with a qualified intermediary, which reduces withholding by the price attributable to the deferred gain.
Who pays the Massachusetts deeds excise and does a 1031 defer it?
The seller customarily pays the deeds excise of $4.56 per $1,000 in most counties. A 1031 exchange does not defer it.
Is Massachusetts a clawback state for 1031 exchanges?
In effect, yes. Gain from Massachusetts property is Massachusetts-source income, and nonresidents who claim 1031 relief consent to Massachusetts jurisdiction over the deferred gain when it is later recognized.
Sources
- Mass.gov: Massachusetts tax rates
- Mass.gov: Filing and withholding rules for real estate sales of $1 million or more
- Mass.gov: Transferor's Certification and instructions
- Massachusetts General Laws c. 62, section 5A
- Massachusetts General Laws c. 64D, section 1 (deeds excise)
- Southern Essex District Registry of Deeds: excise rate
Related: New Hampshire, Rhode Island, Connecticut, New York and all 50 states.
This page is general information for investors, not tax or legal advice. Massachusetts rules change often, so confirm your situation with a CPA or attorney before you sell.











