Capital Gains Calculator 2024

.cg-calc-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 900px; margin: 20px auto; padding: 25px; border: 1px solid #e0e0e0; border-radius: 12px; background-color: #ffffff; box-shadow: 0 4px 20px rgba(0,0,0,0.08); color: #333; } .cg-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; } .cg-input-group { display: flex; flex-direction: column; } .cg-input-group label { font-weight: 600; margin-bottom: 8px; font-size: 14px; color: #444; } .cg-input-group input, .cg-input-group select { padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px; } .cg-input-group input:focus { border-color: #2c3e50; outline: none; box-shadow: 0 0 0 2px rgba(44,62,80,0.1); } .cg-button { grid-column: span 2; background-color: #2c3e50; color: white; padding: 15px; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background-color 0.3s; } .cg-button:hover { background-color: #1a252f; } .cg-result-box { margin-top: 25px; padding: 20px; background-color: #f8f9fa; border-radius: 8px; border-left: 5px solid #2c3e50; display: none; } .cg-result-item { display: flex; justify-content: space-between; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px dashed #ddd; } .cg-result-item:last-child { border-bottom: none; font-weight: bold; font-size: 1.2em; color: #d35400; } .cg-article { margin-top: 40px; line-height: 1.6; } .cg-article h2 { color: #2c3e50; border-bottom: 2px solid #eee; padding-bottom: 10px; } .cg-article h3 { margin-top: 25px; color: #34495e; } @media (max-width: 600px) { .cg-calc-grid { grid-template-columns: 1fr; } .cg-button { grid-column: span 1; } }

Capital Gains Tax Calculator 2024

Long-Term (1 Year or more) Short-Term (Less than 1 Year)
Cost Basis: 0
Realized Capital Gain: 0
Estimated Tax Rate: 0%
Estimated Tax Owed: 0

Understanding Capital Gains Tax in 2024

Capital gains tax is the tax you pay on the profit made from the sale of an asset, such as real estate, stocks, or bonds. For 2024, the tax rates and thresholds have been adjusted for inflation, making it essential to understand how your holding period and total income affect your liability.

Long-Term vs. Short-Term Gains

The duration for which you hold an asset significantly impacts your tax rate:

  • Short-Term Capital Gains: If you hold an asset for one year or less, the profit is taxed as ordinary income. This means it follows your standard federal income tax brackets (ranging from 10% to 37%).
  • Long-Term Capital Gains: If you hold an asset for more than one year, you benefit from preferential tax rates: 0%, 15%, or 20%, depending on your taxable income level.

2024 Federal Long-Term Capital Gains Brackets (Single Filers)

For the 2024 tax year, the long-term capital gains thresholds for single individuals are:

  • 0% Rate: Taxable income up to $47,025.
  • 15% Rate: Taxable income between $47,026 and $518,900.
  • 20% Rate: Taxable income over $518,900.

How Your Cost Basis is Calculated

Your "Cost Basis" is the total amount you have invested in an asset. It isn't just the purchase price; it also includes:

  • Original purchase price.
  • Legal fees and commissions paid during purchase and sale.
  • Cost of capital improvements (renovations that add value or prolong the life of the property).

A higher cost basis results in a lower taxable gain, which reduces your overall tax bill.

Example Calculation

Imagine you purchased a rental property in 2020 for 250,000. You spent 20,000 on a new roof and kitchen upgrades. In 2024, you sell the property for 400,000 and pay 15,000 in agent commissions.

Your Cost Basis would be: 250,000 + 20,000 + 15,000 = 285,000.
Your Realized Gain would be: 400,000 – 285,000 = 115,000.
If you are a single filer earning 75,000 a year, this gain would be taxed at the 15% long-term rate.

function calculateCapitalGains() { var purchase = parseFloat(document.getElementById("purchasePrice").value) || 0; var selling = parseFloat(document.getElementById("sellingPrice").value) || 0; var improvements = parseFloat(document.getElementById("improvementCosts").value) || 0; var fees = parseFloat(document.getElementById("transactionFees").value) || 0; var holding = document.getElementById("holdingPeriod").value; var income = parseFloat(document.getElementById("taxableIncome").value) || 0; if (selling === 0 || purchase === 0) { alert("Please enter both Purchase and Selling prices."); return; } var basis = purchase + improvements + fees; var gain = selling – basis; var taxRate = 0; var estimatedTax = 0; if (gain <= 0) { document.getElementById("resBasis").innerHTML = basis.toLocaleString(); document.getElementById("resGain").innerHTML = gain.toLocaleString() + " (Capital Loss)"; document.getElementById("resRate").innerHTML = "0%"; document.getElementById("resTax").innerHTML = "0"; document.getElementById("cgResultBox").style.display = "block"; return; } if (holding === "short") { // Simplified Short Term Logic (using 2024 average bracket estimate) if (income < 11600) taxRate = 0.10; else if (income < 47150) taxRate = 0.12; else if (income < 100525) taxRate = 0.22; else if (income < 191950) taxRate = 0.24; else if (income < 243725) taxRate = 0.32; else if (income < 609350) taxRate = 0.35; else taxRate = 0.37; } else { // Long Term 2024 Brackets (Single Filers) if (income <= 47025) { taxRate = 0.00; } else if (income <= 518900) { taxRate = 0.15; } else { taxRate = 0.20; } } estimatedTax = gain * taxRate; // Display results document.getElementById("resBasis").innerHTML = basis.toLocaleString(undefined, {minimumFractionDigits: 2}); document.getElementById("resGain").innerHTML = gain.toLocaleString(undefined, {minimumFractionDigits: 2}); document.getElementById("resRate").innerHTML = (taxRate * 100).toFixed(1) + "%"; document.getElementById("resTax").innerHTML = estimatedTax.toLocaleString(undefined, {minimumFractionDigits: 2}); document.getElementById("cgResultBox").style.display = "block"; }

Leave a Comment