Calculate Hour Rate from Annual Salary

Capital Gains Tax Calculator .cgt-calculator-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 8px; } .cgt-header { text-align: center; margin-bottom: 30px; } .cgt-header h1 { color: #2c3e50; margin: 0; font-size: 28px; } .cgt-header p { color: #7f8c8d; font-size: 16px; } .cgt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } @media (max-width: 600px) { .cgt-grid { grid-template-columns: 1fr; } } .cgt-input-group { margin-bottom: 15px; } .cgt-input-group label { display: block; margin-bottom: 5px; font-weight: 600; color: #34495e; font-size: 14px; } .cgt-input-group input, .cgt-input-group select { width: 100%; padding: 10px; border: 1px solid #bdc3c7; border-radius: 4px; font-size: 16px; box-sizing: border-box; } .cgt-input-group input:focus, .cgt-input-group select:focus { border-color: #3498db; outline: none; box-shadow: 0 0 5px rgba(52, 152, 219, 0.3); } .cgt-button-container { grid-column: 1 / -1; text-align: center; margin-top: 10px; } .cgt-btn { background-color: #27ae60; color: white; border: none; padding: 12px 30px; font-size: 18px; border-radius: 5px; cursor: pointer; transition: background-color 0.3s; } .cgt-btn:hover { background-color: #219150; } .cgt-results { grid-column: 1 / -1; background: #fff; padding: 20px; border-radius: 6px; border-left: 5px solid #3498db; margin-top: 20px; display: none; box-shadow: 0 2px 10px rgba(0,0,0,0.05); } .cgt-result-row { display: flex; justify-content: space-between; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #ecf0f1; } .cgt-result-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .cgt-result-label { color: #7f8c8d; font-weight: 500; } .cgt-result-value { font-weight: 700; color: #2c3e50; font-size: 18px; } .cgt-total { color: #27ae60; font-size: 22px; } .cgt-content-section { margin-top: 40px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; color: #333; } .cgt-content-section h2 { font-size: 24px; color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; margin-top: 30px; } .cgt-content-section h3 { font-size: 20px; color: #34495e; margin-top: 25px; } .cgt-content-section p { margin-bottom: 15px; } .cgt-content-section ul { margin-bottom: 15px; padding-left: 20px; } .cgt-content-section li { margin-bottom: 8px; }

Capital Gains Tax Calculator

Estimate your 2024 tax liability on investment sales.

Single Married Filing Jointly Head of Household
Short Term (Less than 1 year) Long Term (More than 1 year)
Total Capital Gain: $0.00
Applicable Tax Rate: 0%
Estimated Tax Owed: $0.00
Net Profit (After Tax): $0.00

Understanding Capital Gains Tax in 2024

When you sell an asset—such as stocks, real estate, or cryptocurrency—for more than you paid for it, the profit is considered a "capital gain." The IRS taxes these profits differently depending on how long you held the asset before selling it and your overall taxable income.

Short-Term vs. Long-Term Capital Gains

The duration of your ownership is the primary factor in determining your tax rate:

  • Short-Term Capital Gains: Assets held for one year or less. These are taxed as ordinary income, meaning they are added to your regular salary and taxed according to your standard federal income tax bracket (ranging from 10% to 37%).
  • Long-Term Capital Gains: Assets held for more than one year. These benefit from preferential tax rates of 0%, 15%, or 20%, depending on your income level and filing status.

How Income Affects Your Rate

Unlike ordinary income tax, long-term capital gains tax rates are generally lower to encourage investment. For the 2024 tax year:

  • 0% Rate: Applies if your taxable income is below $47,025 (Single) or $94,050 (Married Filing Jointly).
  • 15% Rate: Applies to income between $47,025 and $518,900 (Single) or $94,050 and $583,750 (Married Filing Jointly).
  • 20% Rate: Applies to income exceeding the 15% bracket thresholds.

Calculating Your Cost Basis

To accurately calculate your gain, you must know your Cost Basis. This is usually the purchase price plus any fees paid (like brokerage commissions or closing costs). If you made improvements to a property, those costs also increase your basis, thereby lowering your taxable gain.

Note: This calculator provides an estimation based on 2024 federal tax brackets. It does not account for the Net Investment Income Tax (NIIT) of 3.8% on high earners or specific state capital gains taxes.

function calculateCapitalGains() { var purchasePrice = parseFloat(document.getElementById('cgtPurchasePrice').value); var salePrice = parseFloat(document.getElementById('cgtSalePrice').value); var income = parseFloat(document.getElementById('cgtIncome').value); var filingStatus = document.getElementById('cgtFilingStatus').value; var holdingPeriod = document.getElementById('cgtHoldingPeriod').value; var resultsDiv = document.getElementById('cgtResults'); // Validation if (isNaN(purchasePrice) || isNaN(salePrice) || isNaN(income)) { alert("Please enter valid numbers for Purchase Price, Sale Price, and Income."); return; } var gain = salePrice – purchasePrice; // If loss, no tax if (gain <= 0) { resultsDiv.style.display = "block"; document.getElementById('resGain').innerText = formatMoney(gain); document.getElementById('resRate').innerText = "0%"; document.getElementById('resTax').innerText = "$0.00"; document.getElementById('resNet').innerText = formatMoney(gain); return; } var taxRate = 0; var taxAmount = 0; if (holdingPeriod === 'short') { // Short Term: Taxed as Ordinary Income // Using simplified 2024 marginal tax brackets for estimation based on total income taxRate = getOrdinaryIncomeRate(income, filingStatus); } else { // Long Term: Preferential Rates (0%, 15%, 20%) taxRate = getLongTermRate(income, filingStatus); } taxAmount = gain * taxRate; var netProfit = gain – taxAmount; // Update DOM resultsDiv.style.display = "block"; document.getElementById('resGain').innerText = formatMoney(gain); document.getElementById('resRate').innerText = (taxRate * 100).toFixed(1) + "%"; document.getElementById('resTax').innerText = formatMoney(taxAmount); document.getElementById('resNet').innerText = formatMoney(netProfit); } function getLongTermRate(income, status) { // 2024 Long Term Capital Gains Brackets if (status === 'single') { if (income <= 47025) return 0; if (income <= 518900) return 0.15; return 0.20; } else if (status === 'married_joint') { if (income <= 94050) return 0; if (income <= 583750) return 0.15; return 0.20; } else if (status === 'head_household') { if (income <= 63000) return 0; if (income <= 551350) return 0.15; return 0.20; } return 0.15; // Fallback } function getOrdinaryIncomeRate(income, status) { // Simplified 2024 Ordinary Income Marginal Rates (Standard Brackets) // This estimates the marginal rate the gains would fall into var brackets = []; if (status === 'single') { brackets = [11600, 47150, 100525, 191950, 243725, 609350]; } else if (status === 'married_joint') { brackets = [23200, 94300, 201050, 383900, 487450, 731200]; } else if (status === 'head_household') { brackets = [16550, 63100, 100500, 191950, 243700, 609350]; } if (income <= brackets[0]) return 0.10; if (income <= brackets[1]) return 0.12; if (income <= brackets[2]) return 0.22; if (income <= brackets[3]) return 0.24; if (income <= brackets[4]) return 0.32; if (income <= brackets[5]) return 0.35; return 0.37; } function formatMoney(amount) { return "$" + amount.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,'); }

Leave a Comment