Good news first: most people who sell their main home owe little or no tax on the profit, thanks to a generous federal exclusion that Massachusetts also follows. But if your home has gone up a lot in value, you have not lived there long, or the property was a rental, taxes can come into play. Here is how it works in plain language, using 2026 figures where they exist.
The federal home sale exclusion
If you sell your main home at a profit, you may be able to exclude up to $250,000 of gain from your income, or up to $500,000 if you are married and file a joint return. To qualify, you generally must pass two tests during the 5 years before the sale:
- Ownership test: you owned the home for at least 24 months.
- Use test: you lived in it as your main home for at least 24 months.
The two years do not have to be the same two years, and they do not have to be in a row. In general, you also cannot use the exclusion if you already used it on another home sold in the 2 years before this sale.
If you do not meet the 2-year rule
You may still qualify for a partial exclusion if the main reason you sold was a change in workplace location, a health issue, or certain unforeseeable events. IRS Publication 523 explains the details.
How to figure your gain
Your gain is not simply the sale price minus what you paid. It is:
Amount realized (sale price minus selling costs) minus adjusted basis (what you paid, plus certain purchase costs, plus improvements).
Selling costs
Costs like the real estate commission, the Massachusetts deed excise tax and your attorney fees generally reduce the amount realized. Our seller closing costs guide lists the common ones.
Improvements vs. repairs
Improvements add to your basis. The IRS describes them as work that adds to the value of your home, prolongs its useful life, or adapts it to new uses, such as an addition, a new roof, a new heating system or a kitchen remodel. Routine repairs, such as painting, fixing leaks or filling holes and cracks, generally do not count unless they are part of a larger improvement project.
An example
This example is for illustration only.
| Item | Amount |
|---|---|
| Sale price | $1,000,000 |
| Selling costs (commission, deed excise, attorney) | -$45,000 |
| Amount realized | $955,000 |
| Original purchase price | $400,000 |
| Improvements (roof, kitchen, windows) | $60,000 |
| Adjusted basis | $460,000 |
| Gain | $495,000 |
A married couple filing jointly who meets the 2-of-5-year rule could exclude the whole $495,000. A single seller could exclude $250,000, leaving $245,000 of taxable long-term gain on both the federal and Massachusetts returns.
How the taxable part is taxed
Federal
If you owned the home for more than a year, the taxable gain is a long-term capital gain. For 2026, federal long-term rates are 0%, 15% or 20%, depending on your taxable income. For example, the 20% rate starts above $545,500 for single filers and $613,700 for married couples filing jointly. Higher earners may also owe the 3.8% net investment income tax on the taxable portion of the gain. That tax applies when modified adjusted gross income is above $200,000 for single filers or $250,000 for joint filers.
Massachusetts
Massachusetts conforms to the federal home sale exclusion, so gain you exclude federally is generally excluded on your state return too. For any taxable gain, Massachusetts taxes:
- Long-term capital gains (held more than one year) at 5%
- Short-term capital gains (held one year or less) at 8.5%
The Massachusetts 4% surtax
Massachusetts adds a 4% surtax on taxable income above a yearly threshold. For tax year 2026, the threshold is $1,107,750 (it was $1,083,150 for 2025). A large taxable gain from a home sale counts toward that income. In a big sale year, part of your gain could be taxed at 9% by the state. This is one reason to talk to a CPA before you sell a high-value property.
Rental and investment property
The $250,000/$500,000 exclusion is for your main home. Rental properties, vacation homes and investment properties follow different rules.
- Depreciation recapture: if you rented out the property, or part of it, you were allowed to take depreciation. When you sell, the gain equal to that depreciation (after May 6, 1997) cannot be excluded and is generally taxed federally at up to 25%.
- Owner-occupied multi-families: if you live in one unit of a two- or three-family and rent the others, only your unit’s share of the gain may qualify for the exclusion. The rented share is treated like investment property.
- Former rentals you moved into: time after 2008 when the home was not your main residence can reduce your exclusion under the “nonqualified use” rules.
- 1031 exchange: investors may be able to defer tax by buying another investment property through a like-kind exchange. See our 1031 exchange guide.
Selling a property with tenants in place? Read our guide on selling a tenant-occupied home.
Reporting the sale
If you receive a Form 1099-S from the closing attorney, you must report the sale on your federal return even if all of the gain is excluded. You report it on Form 8949 and Schedule D. If you do not get a 1099-S and your entire gain is excluded, you may not need to report it. Ask your tax preparer.
How Luis can help
Luis Tejada and our team can help you estimate your sale price and selling costs, the numbers your CPA will need to work out your gain. We work in English or Spanish and can refer you to trusted tax and legal professionals. Book a free 15-minute call to start planning.
Frequently asked questions
Do I pay capital gains tax when I sell my house in Massachusetts?
Often not. If you owned and lived in the home at least 2 of the last 5 years, you can generally exclude up to $250,000 of gain ($500,000 for joint filers), and Massachusetts follows that exclusion.
What is the Massachusetts capital gains rate on a home sale?
Taxable long-term gains are taxed at 5% and short-term gains at 8.5%. For 2026, a 4% surtax also applies to taxable income above $1,107,750.
What counts as a home improvement for my cost basis?
Work that adds value, extends the home's life or adapts it to new uses, like a new roof, addition or kitchen remodel. Routine repairs such as painting or fixing leaks generally do not count.
Does the exclusion apply to my rental property?
No, it is for your main home. Rental gains are generally taxable, and depreciation you took can be taxed federally at up to 25%. A 1031 exchange may defer the tax.
Do I have to report the sale if I owe no tax?
If you receive a Form 1099-S, yes, you must report the sale even if the gain is fully excluded. Your tax preparer can confirm what you need to file.
Sources
- IRS Topic 701: Sale of Your Home
- IRS Publication 523: Selling Your Home
- Mass.gov: Massachusetts tax rates (capital gains and 4% surtax thresholds)
- Mass. FY2026 Tax Expenditure Budget 1.021: Exclusion of capital gains on sale of a principal residence
- Kiplinger: Capital gains tax rates 2025 and 2026
Information checked November 2026. Laws, rates and program limits change; confirm details with your attorney, lender or tax advisor.