Selling a home in Greater Boston often raises capital gains tax questions, and the answer hinges on two things: how much profit you made and whether the home was your primary residence. Massachusetts capital gains tax applies to long-term real estate profits at 5% for the 2026 tax year, but most primary-residence sellers avoid federal tax entirely thanks to the $250,000 single or $500,000 joint exclusion under IRS Section 121.
Key Takeaways
- The federal Section 121 exclusion shields the first $250,000 of profit from federal capital gains tax ($500,000 if married filing jointly), and many Massachusetts home sellers owe nothing as a result.
- Massachusetts capital gains tax on long-term real estate sales is 5% in 2026; short-term gains on property held one year or less are taxed at 8.5%.
- The 4% Millionaires Tax surtax applies to Massachusetts taxable income above an inflation-indexed threshold in the $1.08 million range, which can include a large home-sale gain.
- To qualify for the federal exclusion, you must have owned and used the home as your primary residence for at least 2 of the 5 years before the sale.
- Adding documented capital improvements to your cost basis can meaningfully reduce the taxable gain. Keep receipts and records.
- A 1031 exchange can defer capital gains tax, but it applies only to investment property, never a primary residence.
How the Federal Capital Gains Exclusion Works for Home Sellers
The federal exclusion is the single most powerful tool most homeowners use to avoid capital gains tax on a home sale. Section 121 of the Internal Revenue Code allows qualifying sellers to exclude a large portion of their profit from federal taxation, which often eliminates the Massachusetts capital gains tax bill on the same gain as well. Understanding how this exclusion works is the first step in figuring out what you actually owe.
The Section 121 Exclusion Explained
A single filer can exclude up to $250,000 of capital gain from a primary-residence sale. Married couples filing jointly can exclude up to $500,000. These amounts have been in place since 1997 and are not indexed for inflation. Per IRS Publication 523, only the gain above these limits is potentially taxable. Many Greater Boston sellers who bought before 2015 sit comfortably below the joint cap and owe no federal capital gains tax at all.
Ownership and Use Tests You Must Pass
To claim the exclusion, you must pass both the ownership test and the use test. You must have owned the home for at least 2 years and used it as your primary residence for at least 2 years during the 5-year period ending on the sale date. The 2 years do not have to be the same, and they do not need to be continuous. You can also only claim the full exclusion once every 2 years.
When a Partial Exclusion Applies
If you fail the 2-year tests because of a job relocation, a health-related move, or another unforeseen circumstance defined by the IRS, you may still qualify for a prorated exclusion. The partial exclusion is calculated based on the number of months you met the requirements. For sellers in Newton, Brookline, or Waltham who relocate for work, this rule can save tens of thousands in Massachusetts capital gains tax.
Massachusetts Capital Gains Tax: State Rate and the 4% Surtax
Massachusetts taxes capital gains separately from federal taxation, and the rules are simpler in some ways but harsher in others. The state does not offer a parallel to the federal $250,000 or $500,000 exclusion: Massachusetts capital gains tax follows the federal taxable gain. If your federal exclusion zeros out your federal tax, it generally zeros out your Massachusetts tax on the same sale as well.
Long-Term vs Short-Term Holding Periods
Long-term capital gains in Massachusetts, defined as assets held more than one year, are taxed at the standard 5% personal income tax rate as of 2026. Short-term capital gains, on assets held one year or less, are taxed at 8.5% following the 2023 Massachusetts tax reform package. For real estate, selling within 12 months of purchase comes with a noticeably higher Massachusetts capital gains tax bill.

Source: Massachusetts Department of Revenue, 2026.
The 4% Millionaires Tax Surtax
Massachusetts voters approved the Fair Share Amendment in November 2022, creating a 4% surtax on annual taxable income above $1 million. The threshold is indexed annually for inflation and sits in the $1.08 million range for recent tax years. Per the Massachusetts DOR, a large home-sale gain that pushes your total taxable income above the threshold subjects the portion above the line to an extra 4% Massachusetts capital gains tax. For high-equity sellers in Belmont, Brookline, or the Back Bay area, this surtax can become the biggest line item on the bill.
Who Qualifies for the Primary Residence Exclusion
Not every home sale qualifies. The IRS draws a sharp line between primary residences and other property, and getting this classification right is central to managing your Massachusetts capital gains tax exposure.
Primary Residence vs Vacation Home
A primary residence is the home where you actually live the majority of the year. A vacation home, an investment property, or a second home generally does not qualify for the Section 121 exclusion. If you own a brownstone in the Back Bay area and a place on the Cape, only the one where you spend most of your time can be your primary residence for tax purposes. Selling the other triggers full Massachusetts capital gains tax on the entire gain.
Conversions Between Use Types
If you rented out the property for part of the 5-year window, the calculation gets more complex. Time used as a rental can disqualify part of the gain from the exclusion under the non-qualified use rules introduced in 2009. Depreciation taken during the rental period must also be recaptured and taxed at a federal rate of up to 25%. This is one area where working with a CPA pays for itself many times over.
How to Calculate Massachusetts Capital Gains Tax on a Home Sale
The arithmetic is straightforward once you know the inputs. You start with the sale price, subtract selling expenses and your adjusted cost basis, apply the federal exclusion if you qualify, and then run federal and state rates against what is left.
Step-by-Step Calculation
Follow these steps to estimate your Massachusetts capital gains tax on a home sale:
- Determine the sale price.
- Subtract selling expenses (realtor commission, attorney fees, transfer tax). For more context on related transaction costs, see how much are closing costs in Massachusetts.
- Subtract your adjusted cost basis (original purchase price plus capital improvements plus closing costs at purchase).
- The result is your capital gain.
- Subtract the federal exclusion ($250,000 single or $500,000 joint) if you qualify.
- Apply the federal long-term capital gains rate (0%, 15%, or 20% depending on income).
- Apply the Massachusetts 5% long-term rate to the same taxable gain.
- Add the 4% Millionaires Tax surtax on any taxable income above the inflation-indexed threshold.
A Worked Example: A Newton Home Sale
A married couple bought a Newton Highlands home in 2008 for $500,000 and spent $75,000 on a kitchen renovation and roof replacement over the years. Their adjusted basis is $575,000. They sell in 2026 for $1,400,000 and pay $80,000 in selling costs (commission, attorney, transfer tax). Net proceeds: $1,320,000.

Source: Calculation based on IRS Publication 523 and Massachusetts DOR rates, 2026.
Their total taxable income falls below the Millionaires Tax threshold, so no 4% surtax applies. A higher-income couple selling a higher-priced home can see the surtax kick in on the portion of taxable income above the inflation-indexed threshold.
Ways to Reduce or Defer Massachusetts Capital Gains Tax
A few legitimate strategies can shrink the tax bill or push it into the future. The right approach depends on whether the property is your primary residence or an investment.
Track Every Capital Improvement
Capital improvements raise your cost basis dollar for dollar, which directly reduces your taxable gain. A new roof, a kitchen remodel, a finished basement, a new HVAC system, an addition, and a new driveway all qualify per IRS Publication 523. Routine repairs and maintenance do not. Sellers who have lived in the same Watertown or Waltham home for 15 years often forget about $50,000 to $100,000 in improvements that can sharply cut Massachusetts capital gains tax. For broader context on tax planning around real estate, see the tax advantages every real estate investor should know about.
Time Your Sale Around the One-Year Mark
Holding the property more than one year drops the Massachusetts rate from 8.5% to 5% and unlocks the lower federal long-term brackets. For house flippers or investors, this difference can be tens of thousands of dollars. For a deeper look at sale timing and preparation for primary residences in this market, see how to sell your home in Newton MA.
1031 Exchanges for Investment Properties
Section 1031 of the Internal Revenue Code allows an investor to defer Massachusetts capital gains tax on the sale of an investment or business-use property by rolling the proceeds into a like-kind property. The deferral is not permanent: the tax follows the basis into the new property. Strict timelines apply (45 days to identify the replacement, 180 days to close), and the rules do not allow a 1031 exchange on a primary residence. Because the closing attorney coordinates so much of the transaction in our attorney-state market, working with local real estate agents who specialize in Greater Boston multi-family and small-investor sales can help you structure a transaction that preserves the exchange. Reviewing your Newton MA property tax guide alongside a capital gains plan also helps you see the full annual carrying-cost picture.
Frequently Asked Questions
Do I have to pay Massachusetts capital gains tax if I lived in the home for less than 2 years?
In most cases, yes. Without 2 years of ownership and use as a primary residence in the 5 years before the sale, you do not qualify for the full federal Section 121 exclusion, and Massachusetts capital gains tax applies to the entire gain. Partial exclusions exist for job changes, health issues, or qualifying unforeseen events as defined by the IRS, and these can be worth thousands.
How is the cost basis of my Massachusetts home calculated?
Cost basis starts with what you paid for the home, including most closing costs at purchase. Add the cost of capital improvements made over the years, such as a kitchen renovation, an addition, or a new roof. Subtract any depreciation if the home was rented out at any point. The result is your adjusted cost basis, which is subtracted from the net sale price to determine your taxable gain.
Does Massachusetts have a separate capital gains tax for real estate?
Massachusetts does not have a distinct real estate capital gains tax. Long-term real estate gains are taxed at the standard 5% personal income tax rate under MGL Chapter 62. Short-term gains are taxed at 8.5%. The 4% Millionaires Tax surtax can apply on top of either rate for the portion of taxable income above the inflation-indexed threshold.
What is the Massachusetts Millionaires Tax and does it apply to my home sale?
The Millionaires Tax, also called the Fair Share Amendment, is a 4% surtax on Massachusetts taxable income above an inflation-indexed threshold sitting in the $1.08 million range for recent tax years. A large home-sale gain that pushes total taxable income above that line subjects the portion above the threshold to the extra 4%. Most primary-residence sellers using the $500,000 federal exclusion stay below it.
Can I avoid Massachusetts capital gains tax by reinvesting in another home?
Not for a primary residence. The old rollover rule that let homeowners defer tax by buying a more expensive home was repealed in 1997 and replaced with the current $250,000 and $500,000 exclusions. The 1031 exchange does allow tax-deferred reinvestment, but only for investment or business-use real estate, never a primary residence.
Does the IRS know when I sell my Massachusetts home?
Yes. Closing attorneys and settlement agents typically issue IRS Form 1099-S for real estate sales, and the Massachusetts Registry of Deeds records every transaction publicly. If you qualify for the full federal exclusion and your closing agent collects a signed certification, the 1099-S may be skipped, but the deed transfer is still on record. Report the sale on Schedule D of your federal return when required.
Bottom Line
Massachusetts capital gains tax on a home sale is manageable for most primary-residence sellers, but the math shifts quickly once gains exceed the federal exclusion or total taxable income approaches the Millionaires Tax threshold. Running the numbers before you list lets you plan the timing and the budget around the tax with no surprises at closing.
How Centre Realty Group Can Help
Capital gains planning is most effective when it starts before the listing goes live. Our team helps Greater Boston sellers price strategically, document improvements that raise cost basis, and coordinate with closing attorneys and CPAs so the tax conversation happens early rather than at the closing table. Reach out when you are ready to map your sale and your tax picture together.
Disclaimer: This blog post is for informational purposes only and does not constitute financial, legal, or real estate advice. All data is based on publicly available sources as of 2026 and is subject to change. Please consult with a licensed real estate professional or financial advisor before making any decisions related to buying or selling property.
Centre Realty Group is a full-service real estate brokerage serving Greater Boston, including Newton, Brookline, Watertown, Waltham, Belmont, and the city of Boston. Our team helps buyers, sellers, and investors navigate one of the country’s most competitive housing markets.
Recent Comments