Skip to content
StatesideCalc

Taxes

Capital Gains on a Home Sale, Explained

Capital gains on a property sale start with adjusted basis, not the purchase price. Here is what raises it, what lowers it, and why receipts matter.

By StatesideCalc EditorialJuly 27, 20265 min read

The arithmetic behind capital gains is short: sale price minus basis, times a rate. Almost all the money is in the middle term, and basis is the number people know least about and document worst.

Every dollar you can add to basis is a dollar that is never taxed. Which makes a folder of old invoices one of the highest-return-per-hour objects in personal finance, and it only matters decades after the moment you could have started it.

Adjusted basis is not what you paid

Basis starts as the purchase price and then gets adjusted for everything that has happened since.

Add: capital improvements. Work that adds value, extends useful life, or adapts the property to a new use. A new roof, an addition, a finished basement, a replaced HVAC system, new windows.

Not repairs, not maintenance. Fixing a leak is a repair; replacing the roof is an improvement. That line is exactly where people lose deductions they were entitled to, and the distinction is worth learning before you need it rather than after.

Add: transaction costs. Commissions, transfer taxes, title insurance, legal fees, recording fees, survey costs — on both the purchase and the sale. On real estate these routinely total five to six percent of the price, which is real money at any gains rate.

Subtract: depreciation claimed. Covered below, and it is the one that ambushes people.

The capital gains estimator works through the adjustment in order and shows how much the improvements and costs are worth in tax at the rates you enter. In a typical scenario, $79,000 of improvements and closing costs is close to $16,000 of tax that does not get paid.

Depreciation recapture, and why rentals are different

If you claimed depreciation on a rental, it reduced your taxable income in those years — and it reduced your basis by the same amount. So it comes back as gain when you sell, and in the US that recaptured portion is generally taxed at a different, higher rate than the rest of the gain.

The part that genuinely catches people: the basis reduction generally applies to depreciation you were allowed to claim, whether or not you actually claimed it. Skipping the deduction does not avoid the recapture. It just means you paid more tax in those years and pay the recapture anyway.

This is the single strongest reason a rental property sale deserves an hour with a CPA before it closes rather than after. The depreciation calculator covers how the schedules work if you want to understand the mechanics first.

Holding period is a hard line

Assets held beyond the long-term threshold are taxed at preferential rates. Sold sooner, gains are generally taxed as ordinary income at your marginal rate.

The gap between those two treatments is large enough that a closing date a few weeks either side of the threshold can move the tax bill substantially. If you are anywhere near it, check the date before you sign anything — this is one of the few places where a scheduling decision is worth thousands of dollars.

The primary residence exclusion

The US allows a substantial exclusion of gain on the sale of a primary residence, subject to ownership and use tests over a look-back period.

The calculator takes the exclusion as an input rather than computing it, and that is deliberate. Eligibility turns on facts about how you actually lived in the property — how long you owned it, how long you occupied it, whether you have used the exclusion recently, and whether any of the period was non-qualifying use. No calculator can verify any of that, and asserting an exclusion someone does not qualify for on a page about a six-figure transaction would be worse than useless.

Get the number from your accountant or from the current IRS guidance, then enter it.

Losses offset gains

Realised capital losses offset gains, and carryforwards from prior years count.

This is why people harvest losses in December — a loss taken against a gain at a 20 percent combined rate is worth 20 cents on the dollar, and unused carryforwards do not expire. If you are sitting on an unrealised loss elsewhere in the year you sell a property, the timing is worth coordinating.

Watch the wash sale rules if the loss is in securities: repurchasing something substantially identical within the window disallows the loss and rolls it into the basis of the replacement.

What "net proceeds" does and does not mean

The number people actually care about is what lands in the bank, and it is not the gain.

Net proceeds in the calculator is sale price minus tax. It is not sale price minus tax minus your mortgage payoff, which is the figure that determines what you can put down on the next place. The home equity calculator covers the payoff side.

Note also that transaction costs are counted into basis in this model. They reduce the tax, but they also came out of your pocket — so the cash you walk away with is lower than the net proceeds line by roughly the amount of those costs.

Why capital gains rates are an input here

Capital gains rates in the US depend on filing status, total income, asset type, holding period, and whether a surtax applies at your income level. State treatment runs from a full exemption to full ordinary-income taxation.

Hard-coding any of that would mean asserting a legal conclusion about your situation from a handful of inputs. So you supply the rates — from your accountant or your prior return — and the calculator does the arithmetic on them. The effective tax rate calculator helps if you are working out what your marginal position actually is.

Keep the receipts

The practical takeaway underneath all of this.

Improvements you made in year three affect the tax you pay in year twenty-five. Nobody remembers what the bathroom cost in 2011, and nobody has the invoice unless they decided to keep it long before it mattered.

A folder — physical or a scanned directory — costs nothing and is worth thousands. Start it the week you buy.

For the rules themselves, the IRS publishes Topic 409 on capital gains and losses and Publication 523 on selling a home, both of which are more readable than their reputation suggests.