What This Calculator Does
This tool applies to the United States only. It estimates the federal capital gains tax you may owe when you sell your primary residence, using the IRS Section 121 home-sale exclusion. As of the 2024 tax year, that exclusion lets qualifying sellers exclude up to $250,000 of gain if single, or $500,000 if married filing jointly, provided you owned and lived in the home for at least 2 of the last 5 years. This is an estimate and does not include state taxes, depreciation recapture, or the 3.8% Net Investment Income Tax.
How to Use It
Enter your sale price, your adjusted cost basis (original purchase price plus capital improvements), and your selling costs (agent commissions, transfer taxes, etc.). Choose your filing status for the correct exclusion, and enter the long-term capital gains rate that applies to your income bracket (commonly 0%, 15%, or 20%). The calculator returns your taxable gain, the estimated tax, and your net proceeds.
The Formula Explained
First the raw gain is computed as Sale Price − Basis − Selling Costs. The Section 121 exclusion is then subtracted; if the result is negative, your taxable gain is zero. The taxable gain is multiplied by your capital gains rate to estimate the tax.
$$\begin{gathered} \text{Tax} = \max\!\left(0,\; G - 250{,}000\right) \times \frac{\text{Rate (\%)}}{100} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} G &= \text{Sale Price} - \text{Cost Basis} - \text{Selling Costs} \end{aligned} \right. \end{gathered}$$
Worked Example
You sell for $600,000. Your basis is $300,000 and selling costs are $30,000, giving a gain of $270,000. As a single filer you exclude $250,000, leaving a taxable gain of $20,000. At a 15% rate, the tax is $3,000.
$$\text{Tax} = \max\!\left(0,\; 270{,}000 - 250{,}000\right) \times \frac{15}{100} = 20{,}000 \times 0.15 = 3{,}000$$FAQ
What counts as adjusted basis? Your purchase price plus the cost of capital improvements (renovations, additions), minus any depreciation taken.
Does this include state tax? No. Many states tax capital gains separately; add your state rate for a full picture.
What if my gain is under the exclusion? Then your taxable gain and tax are both zero, and you generally owe no federal tax on the sale.