Home Options MA

Costs, taxes and net proceeds

Capital gains tax when you sell a house in Massachusetts

Most Massachusetts homeowners owe no capital gains tax when they sell their main home. Federal law excludes up to $250,000 of gain ($500,000 married filing jointly) if you owned and lived in the home at least 2 of the last 5 years. Gain above that is taxed federally at 0%, 15% or 20%, possibly plus 3.8%, and Massachusetts taxes long-term gain at 5%.

Updated October 7, 2026. Facts checked October 7, 2026 against the sources listed at the bottom. General information, not legal, tax or financial advice.

Federal exclusion$250,000 single, $500,000 married filing jointlyIRS Topic 701 and Publication 523
Federal rates, 20260%, 15% or 20% of long-term gain, by taxable incomeIRS Rev. Proc. 2025-32, section 3.03
Massachusetts rates5% long-term; 8.5% if held 1 year or lessMass.gov tax rates; M.G.L. c. 62 s.4
MA 4% surtax, 2026On taxable income over $1,107,750Mass.gov, checked Oct 2026

The federal exclusion: $250,000 or $500,000

Under IRS Topic 701, you can exclude up to $250,000 of gain from the sale of your main home, or $500,000 if you file jointly with a spouse. You qualify if, in the 5 years before the sale, you passed two tests:

  • Ownership test: you owned the home at least 24 months (2 years).
  • Use test: you lived in it as your main home at least 24 months (2 years).

The two years do not need to be in a row, and they can fall at different times inside the 5-year window. In general you cannot use the exclusion if you excluded gain on another home sale in the 2 years before. For joint filers, both spouses must meet the use test and one must meet the ownership test (Publication 523).

The exclusion covers gain, not the sale price. A $900,000 sale can still be fully tax-free if your gain is under your limit. Gain equals your sale price, minus selling costs, minus your adjusted basis. See cost basis and reporting.

Partial exclusion

If you do not meet the 2-year tests, you may still get a reduced exclusion if the main reason for the sale was a change in workplace location, a health issue or an unforeseeable event. Publication 523 gives the formula: take the shortest of your time living there, your time owning it, or the time since your last excluded sale, divide by 24 months (or 730 days), and multiply by $250,000. A single owner who lived in the house 12 months gets 12/24 x $250,000 = $125,000.

Things that cut the exclusion

Rental or business use, especially after 2008 when the home was not your main home, can make part of the gain taxable. Depreciation you took (or were allowed) on a rental or home office is generally taxed. If this describes you, see a CPA before the sale. The sell or rent calculator compares the two choices. Inherited homes use a different starting value. See inherited house taxes and stepped-up basis.

Federal rates on gain above the exclusion (2026)

Gain on a home you owned more than a year is long-term. The long-term rate is 0%, 15% or 20% depending on your taxable income, with the gain stacked on top of your other income. These are the 2026 breakpoints in IRS Rev. Proc. 2025-32, section 3.03:

Long-term capital gains rate breakpoints, tax year 2026 (taxable income)
Filing status0% up to15% up to20% above
Single$49,450$545,500$545,500
Married filing jointly (and surviving spouse)$98,900$613,700$613,700
Married filing separately$49,450$306,850$306,850
Head of household$66,200$579,600$579,600

Short-term gain (a home owned one year or less) is taxed at ordinary income rates. The IRS capital gains page lists the same three long-term rates; the page we read still showed the 2025 breakpoints, so we took 2026 from the Revenue Procedure.

Net investment income tax (3.8%)

An extra 3.8% tax applies to the lesser of your net investment income or the amount your modified adjusted gross income is over $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately), per the IRS NIIT page. Taxable home-sale gain counts as net investment income. Gain you exclude under the exclusion does not add to the tax.

How Massachusetts taxes the gain

Massachusetts follows the federal exclusion. The state tax expenditure budget says Massachusetts conforms to the section 121 exclusion, so gain you exclude federally is generally excluded for Massachusetts as well.

For gain that is taxable, the Mass.gov tax rates page lists:

  • Long-term capital gains: 5.00%.
  • Short-term capital gains: 8.5%. M.G.L. c. 62 s.4 applies it to gain on assets held 1 year or less. Massachusetts uses the federal definitions of short- and long-term.
  • 4% surtax on taxable income over a threshold that is adjusted for inflation: $1,000,000 in 2023, $1,053,750 in 2024, $1,083,150 in 2025 and $1,107,750 in 2026 (Mass.gov). Only the part over the threshold is taxed at the extra 4%.

The surtax counts taxable home-sale gain. Mass.gov says there is no exclusion from the surtax for gain on a personal residence that is otherwise taxable. Example: a seller with $1,300,000 of total Massachusetts taxable income in 2026 pays 4% x ($1,300,000 - $1,107,750) = $7,690 in surtax, on top of the regular 5%.

Worked examples

These are simplified illustrations with made-up numbers, not tax advice. They ignore deductions, credits and state exemptions. We took 2026 federal figures from the IRS and Massachusetts figures from Mass.gov. Use the capital gains calculator for your own numbers.

A: gain above the limitB: gain inside the limitC: partial exclusion
WhoSingle owner, lived there 15 yearsMarried couple filing jointly, lived there 14 yearsSingle owner, lived there 12 months, moved for a new job
Sale price$850,000$900,000$600,000
Selling costs$50,000$55,000$40,000
Adjusted basis (purchase plus improvements)$350,000$460,000$400,000
Gain (price - costs - basis)$450,000$385,000$160,000
Exclusion$250,000$500,000 (covers all of it)$125,000 (12/24 x $250,000)
Taxable gain$200,000$0$35,000
Federal tax at 15%$30,000 (assumes $80,000 of other income)$0Depends on other income
NIIT 3.8%$3,040 (MAGI $280,000: 3.8% x $80,000 over $200,000)$0Likely $0 below $200,000 MAGI
Massachusetts 5%$10,000$0$1,750
Rough total$43,040$0Federal plus $1,750

In example B you may still receive a Form 1099-S. A 1099-S does not mean you owe tax. See cost basis and home sale tax reporting.

Before you list: questions to ask your CPA

  • Do I meet the 2-of-5-year tests on my closing date? Count the closing date, not the contract date.
  • Did I ever rent the house, run a business from it, or take depreciation?
  • What is my adjusted basis? Gather receipts for improvements. Repairs generally do not count.
  • Would waiting a few months get me past the 2-year mark or past the 1-year long-term mark?
  • Will this sale push my income over the 3.8% NIIT line or the Massachusetts surtax threshold?

If you inherited the house, your basis is usually its value at the date of death, which often leaves little or no gain. See inherited house taxes and stepped-up basis. You can also compare routes at the comparison tool.

Questions

Common questions.

Do I pay capital gains tax when I sell my house in Massachusetts?

Only on gain above your exclusion. If you owned and lived in the home at least 2 of the last 5 years, you can exclude up to $250,000 of gain ($500,000 if married filing jointly) from federal tax, and Massachusetts generally follows the same exclusion.

What is the Massachusetts capital gains tax rate in 2026?

Mass.gov lists 5% on long-term gains and 8.5% on short-term gains (assets held one year or less). A 4% surtax applies to taxable income over $1,107,750 in 2026.

What are the 2026 federal long-term capital gains rates?

They are 0%, 15% and 20%. For a single filer, 0% applies up to $49,450 of taxable income and 20% above $545,500. For married filing jointly, 0% applies up to $98,900 and 20% above $613,700 (IRS Rev. Proc. 2025-32).

How do I avoid capital gains tax on a home sale?

Meet the ownership and use tests so the exclusion applies, keep records of improvements to raise your basis, and track selling costs, which reduce your gain. Do not use anything that is not allowed. Talk to a CPA about your own facts.

Is the 3.8% net investment income tax charged on home sales?

Only on taxable gain, and only if your modified adjusted gross income is over the IRS threshold ($200,000 single, $250,000 married filing jointly). Gain you exclude under the home-sale exclusion does not add to it.

Selling? Add drone photos

Show the whole property.

Aerial photos show the lot, the yard, the roofline and the neighborhood in a way street photos cannot. Many sellers add them to a listing, and they are a short, inexpensive shoot (typically $250 to $900).

See what you'd walk away with.

Enter your address. It is free, and you can stop at any point.

We are not a real estate broker or agent. We connect you with independent local buyers and agents who may pay us a fee. No obligation.

Step 1 of 2

Where is the house?

We will show you a ballpark for your town right away. Nothing here is an appraisal, and there is no obligation.