How Do You Calculate the Gain?
Not sale price minus purchase price. The formula is amount realized (sale price minus selling costs) minus adjusted basis (original purchase price plus capital improvements, minus any depreciation taken).
The adjusted basis is where sellers leave money on the table, because capital improvements raise your basis and reduce your taxable gain — and almost nobody keeps the records.
- Generally increases basis: additions, a new roof, replacement windows, a kitchen or bathroom renovation, a new heating system, landscaping and hardscaping, a finished basement.
- Generally does not: repairs and maintenance, painting, and anything you deducted elsewhere.
For a house owned for thirty years, the difference between a documented basis and an undocumented one can be very large. If you have owned a home a long time, reconstructing what you can from permits, contractor records, and bank statements is worth doing before you sell, not after.
Selling costs also reduce the amount realized — brokerage compensation, legal fees, and the deed excise tax, which in Massachusetts the seller customarily pays at $4.56 per $1,000 of sale price as of 2026. See the closing cost guide for the full list.