On a share sale the inputs are two numbers on a statement. On a property the inputs are a filing cabinet, and that is the real difference between a good estimate and a bad one. Every dollar of documented capital improvement is a dollar of gain that never exists, and every closing cost properly deducted from the proceeds does the same thing from the other end, so a property calculation is mostly a question of what you can evidence.
Adjusted basis: what goes in, over decades
Basis starts at what the property cost you, including the purchase costs you capitalised, and rises with capital improvements over however many years you owned it. A new roof, an extension, a re-wire, a replacement HVAC system and landscaping that adds to the property are the usual entries; ordinary repairs and maintenance are not. The IRS measures the gain as the difference between adjusted basis and the amount realized, so this figure is doing more work than the rate. Nobody reconstructs twenty years of invoices at closing, which is why the useful version of this advice is to keep them as you go.
The other end: what comes off the proceeds
The amount realized is the sale proceeds after the costs of selling: the agent's commission, transfer taxes, title and legal costs, and the concessions you made to close. These reduce the measured gain exactly as improvements do, from the other side of the subtraction. An estimate built from the contract price alone is overstating the gain by the whole of the selling cost stack, which on a typical sale is several percent of the price and larger than most of the planning people spend their time on.
Then, and only then, the federal scale
With the gain fixed, the IRS's published rules apply in order. An asset held more than one year before disposal produces a long-term gain, and one year or less a short-term one taxed with your ordinary income. For most individuals the long-term rate is no higher than 15%, with a 0% band at taxable income at or below $48,350, $96,700 or $64,750 depending on filing status, and 20% above the 15% band. A further 3.8 percent Net Investment Income Tax is charged on the lesser of net investment income or the excess of modified adjusted gross income over $200,000, $250,000 or $125,000 by filing status.
Two reliefs that depend on which property it is
If the property was your main home, the IRS publishes an exclusion of up to $250,000 of gain, or up to $500,000 on a joint return, subject to an ownership test met by owning the home at least 24 months out of the five years before the sale. If it was held for investment, Section 1031 provides that generally, on a like-kind exchange, you are not required to recognize a gain or loss, applying since the Tax Cuts and Jobs Act only to exchanges of real property, with anything else received recognised to that extent. A property that is neither gets neither.
Questions people ask about real estate capital gains tax calculator
Which improvements count towards basis?
Capital improvements that add to the property's value or prolong its life, rather than ordinary repairs and maintenance. Since they reduce the measured gain dollar for dollar, the invoices are worth keeping from the day of purchase.
Do selling costs reduce the gain?
Yes, from the other side: they reduce the amount realized, which is the figure the adjusted basis is subtracted from. An estimate based on the headline sale price will be too high.
What if I have no records of the improvements?
Then the basis you can evidence is what you have, and the gain is measured from it. What is provable in your own case is exactly the kind of question to put to a CPA before you file rather than after.
Is a second home treated like a main home?
No. The exclusion the IRS publishes is for a main home and turns on ownership and use tests. A second home or a pure investment property gets no exclusion.