0% – For Long-Term Gains (if income is below threshold)
15% – For Long-Term Gains (if income is above 0% threshold but below 15% threshold)
20% – For Long-Term Gains (if income is above 15% threshold)
25% – For Short-Term Gains (Ordinary Income Rate)
28% – For Short-Term Gains (Ordinary Income Rate)
33% – For Short-Term Gains (Ordinary Income Rate)
35% – For Short-Term Gains (Ordinary Income Rate)
37% – For Short-Term Gains (Ordinary Income Rate)
Note: Actual rates depend on filing status and specific income thresholds. This calculator uses simplified selections.
Estimated Capital Gains Tax
$0.00
Understanding Capital Gains Tax in 2025
Capital gains tax is levied on the profit realized from the sale of an asset that was purchased at a lower price. This applies to various assets, including stocks, bonds, real estate, and collectibles. The tax rate depends on whether the gain is classified as short-term or long-term, and your overall taxable income.
Short-Term vs. Long-Term Capital Gains
The distinction between short-term and long-term capital gains is crucial for tax purposes:
Short-Term Capital Gains: These are profits from assets held for one year or less. They are taxed at your ordinary income tax rates, which can be significantly higher than long-term rates. For 2025, these rates can range from 10% to 37%, depending on your income bracket.
Long-Term Capital Gains: These are profits from assets held for more than one year. They are taxed at preferential rates, which are generally lower than ordinary income rates. For 2025, the long-term capital gains tax rates are typically 0%, 15%, or 20%, depending on your taxable income and filing status. There are also higher rates (25%, 28%, 33%, 35%, 37%) for specific types of gains like collectibles or unrecaptured Section 1250 gains, but this calculator simplifies by using a general income bracket selection.
How the Capital Gains Tax is Calculated
The basic formula for calculating capital gains is:
Capital Gain = Sale Price – Purchase Price – Allowable Expenses
For simplicity, this calculator assumes no additional expenses beyond the purchase and sale prices.
Once the capital gain is determined, the tax is calculated based on the applicable rate:
Capital Gains Tax = Capital Gain * Applicable Tax Rate
2025 Tax Rate Considerations (Simplified)
The actual tax rates for 2025 will depend on your total taxable income and filing status (single, married filing jointly, etc.). The IRS sets income thresholds annually. This calculator uses a simplified selection of common rates.
0% Rate: Typically applies to long-term capital gains for taxpayers in the lowest income tax brackets.
15% Rate: Applies to long-term capital gains for taxpayers in the middle income tax brackets.
20% Rate: Applies to long-term capital gains for taxpayers in the highest income tax brackets.
Ordinary Income Rates (25% to 37%): These are used for short-term capital gains and for specific types of long-term gains (e.g., collectibles, unrecaptured Section 1250 gains).
Disclaimer: This calculator provides an estimate for informational purposes only and does not constitute financial or tax advice. Tax laws are complex and subject to change. Consult with a qualified tax professional for personalized advice.
function calculateCapitalGainsTax() {
var purchasePrice = parseFloat(document.getElementById("purchasePrice").value);
var salePrice = parseFloat(document.getElementById("salePrice").value);
var holdingPeriod = parseFloat(document.getElementById("holdingPeriod").value);
var taxYear = document.getElementById("taxYear").value; // Not used in calculation but good for context
var incomeBracketRate = parseFloat(document.getElementById("incomeBracket").value);
var resultValueElement = document.getElementById("result-value");
// Input validation
if (isNaN(purchasePrice) || isNaN(salePrice) || isNaN(holdingPeriod) || purchasePrice <= 0 || salePrice <= 0 || holdingPeriod <= 0) {
resultValueElement.textContent = "Please enter valid positive numbers for all fields.";
resultValueElement.style.color = "#dc3545"; // Red for error
return;
}
var capitalGain = salePrice – purchasePrice;
var estimatedTax = 0;
if (capitalGain < 0) {
resultValueElement.textContent = "No capital gain (loss). Tax is $0.00";
resultValueElement.style.color = "#007bff"; // Blue for informational
return;
}
// Determine if short-term or long-term for rate application logic
// This simplified calculator directly uses the selected rate, assuming the user correctly identified
// whether their gain is short-term (ordinary income rates) or long-term (preferential rates).
// In a more complex calculator, we'd use the holding period and income thresholds to dynamically select the rate.
estimatedTax = capitalGain * (incomeBracketRate / 100);
// Format the result
var formattedTax = estimatedTax.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
resultValueElement.textContent = formattedTax;
resultValueElement.style.color = "#28a745"; // Green for success
}