Home Equity Loan Payoff Calculator

Real Estate Capital Gains Tax Calculator

Estimate your tax liability after selling a property based on purchase price, improvements, and IRS exemptions.

Renovations, additions, etc.
Agent commissions, legal fees, closing costs.
Single Married Filing Jointly
Yes (Lived there 2+ of last 5 years) No (Investment Property / Vacation Home)

Estimated Calculation

Total Realized Gain: $0
Exemption Applied: $0
Taxable Gain: $0
Estimated Tax Liability (15%)
$0
Note: This estimate uses a standard 15% long-term capital gains rate. Actual rates may vary between 0%, 15%, and 20% based on your total annual income.

How Capital Gains Tax on Real Estate Works

When you sell a property for more than what you paid for it, the profit is considered a capital gain. The IRS taxes these gains at different rates depending on how long you owned the asset and whether it was your primary residence.

The Primary Residence Exclusion (Section 121)

One of the most significant tax benefits for homeowners in the United States is the Section 121 exclusion. If you have owned and lived in the home as your main residence for at least two out of the five years leading up to the sale:

  • Single Filers: Can exclude up to $250,000 of gain from taxation.
  • Married Filing Jointly: Can exclude up to $500,000 of gain from taxation.

Understanding the Cost Basis

To calculate your gain, you must first determine your "Adjusted Cost Basis." This is not just the price you paid for the house. It includes:

  • Original Purchase Price
  • Major Capital Improvements (e.g., a new roof, kitchen remodel, or swimming pool)
  • Closing costs from the original purchase

Maintenance items like painting or minor repairs generally cannot be added to your cost basis.

Example Calculation

Imagine you bought a home for $400,000 (Single Filer). You spent $50,000 on a kitchen renovation. You sell it years later for $800,000 and pay $48,000 in agent fees.

  1. Adjusted Basis: $400,000 + $50,000 = $450,000
  2. Net Sale Proceeds: $800,000 – $48,000 = $752,000
  3. Total Gain: $752,000 – $450,000 = $302,000
  4. Taxable Gain: $302,000 – $250,000 (Exemption) = $52,000
  5. Estimated Tax (15%): $7,800

Short-Term vs. Long-Term Gains

If you hold a property for less than one year before selling, it is classified as a short-term capital gain. Short-term gains are taxed as ordinary income, which can be as high as 37%. Long-term gains (held over 1 year) enjoy preferential rates of 0%, 15%, or 20%.

function calculateCapitalGains() { // Get values var purchasePrice = parseFloat(document.getElementById('purchasePrice').value) || 0; var salePrice = parseFloat(document.getElementById('salePrice').value) || 0; var improvements = parseFloat(document.getElementById('improvements').value) || 0; var sellingExpenses = parseFloat(document.getElementById('sellingExpenses').value) || 0; var filingStatus = document.getElementById('filingStatus').value; var isPrimary = document.getElementById('isPrimary').value; // 1. Adjusted Cost Basis var adjustedBasis = purchasePrice + improvements; // 2. Net Sale Proceeds var netProceeds = salePrice – sellingExpenses; // 3. Total Realized Gain var totalGain = netProceeds – adjustedBasis; // Handle negative gain (Loss) if (totalGain < 0) { document.getElementById('totalGainText').innerHTML = "-$" + Math.abs(totalGain).toLocaleString(); document.getElementById('exemptionText').innerHTML = "$0"; document.getElementById('taxableGainText').innerHTML = "$0"; document.getElementById('estimatedTaxText').innerHTML = "$0"; return; } // 4. Exemption var exemption = 0; if (isPrimary === 'yes') { if (filingStatus === 'single') { exemption = 250000; } else { exemption = 500000; } } // Cap exemption at total gain (cannot have negative taxable gain from exemption) var appliedExemption = Math.min(totalGain, exemption); // 5. Taxable Gain var taxableGain = totalGain – appliedExemption; // 6. Estimated Tax (Assuming 15% long-term rate as standard) var estimatedTax = taxableGain * 0.15; // Update UI document.getElementById('totalGainText').innerHTML = "$" + totalGain.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 0}); document.getElementById('exemptionText').innerHTML = "-$" + appliedExemption.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 0}); document.getElementById('taxableGainText').innerHTML = "$" + taxableGain.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 0}); document.getElementById('estimatedTaxText').innerHTML = "$" + estimatedTax.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 0}); } // Initial calculation on load window.onload = function() { calculateCapitalGains(); };

Leave a Reply

Your email address will not be published. Required fields are marked *