Capital Gains Tax Calculator
Finance & InvestmentCalculate your US federal capital gains tax using 2025 IRS rates. Covers short and long-term gains for single, married, and head-of-household filers.
Reviewed by the thecalcu.com team · Last updated July 1, 2026
Capital Gain
+$0
Rates shown are 2025 federal rates. State capital gains taxes are additional. NIIT (3.8%) may apply if your income exceeds $200K (single) or $250K (married).
What is a Capital Gains Tax?
A Capital Gains Tax Calculator computes your estimated federal tax liability when you sell an appreciated asset, stocks, ETFs, mutual funds, real estate, cryptocurrency, or any other capital asset. It applies 2025 IRS tax rates to show you exactly how much of your sale proceeds will go to federal taxes and how much you keep as net proceeds.
Capital gains taxes in the US have two tracks based entirely on how long you held the asset. Short-term gains, on assets held one year or less, are taxed at your ordinary marginal income rate, which can reach 37%. Long-term gains, on assets held more than one year, are taxed at preferential rates of 0%, 15%, or 20%, depending on your taxable income. The difference between these two rates can be enormous: a $50,000 gain taxed at 37% costs $18,500; that same gain taxed at 15% costs $7,500, a $11,000 swing based purely on whether you held the asset one extra day past the one-year mark.
For high-income taxpayers, the 3.8% Net Investment Income Tax (NIIT) applies on top of the standard capital gains rates, raising the effective maximum rate to 23.8% (long-term) or 40.8% (short-term, including ordinary income rates). The NIIT threshold, $200,000 for single filers, $250,000 for married filing jointly, has not been adjusted for inflation since the tax was introduced in 2013.
Understanding your capital gains tax before you sell helps you make better decisions: whether to wait until an asset crosses the one-year holding threshold, whether to harvest offsetting losses in the same tax year, or whether to use tax-advantaged accounts for higher-growth positions. For long-term tax-free growth, the Roth vs Traditional IRA Calculator models how keeping gains inside a Roth IRA eliminates capital gains taxes entirely.
Why Use a Capital Gains Tax Calculator?
The holding period decision is time-sensitive. The difference between a 22% short-term rate and a 15% long-term rate on a $100,000 gain is $7,000. Knowing your exact holding period and the tax cost of selling now versus holding 30 or 90 more days is actionable information. The calculator shows you the cost of early selling in dollar terms, not percentages.
Rate brackets depend on your full income picture. Long-term capital gains rates are not standalone, they depend on your total taxable income. A $50,000 long-term gain is taxed at 0% if your ordinary income is below $48,350 (single, 2025), but at 15% if your income is $80,000. The calculator uses your ordinary income to determine exactly which long-term rate applies to your specific gain.
NIIT is often overlooked. Many investors know the headline rates (0%/15%/20%) but forget the 3.8% NIIT surcharge. If your income exceeds the NIIT threshold, your effective long-term rate is 3.8% higher than the headline rate, 18.8% or 23.8% instead of 15% or 20%. The calculator includes NIIT automatically when applicable.
Tax-loss harvesting requires precise numbers. If you have capital losses in your portfolio, knowing the exact tax you owe on a gain lets you calculate how much in losses to harvest to offset it. The calculator's tax owed output gives you the target number.
Who Should Use This Calculator?
Investors planning to sell stocks, ETFs, or funds. Anyone considering a sale of an appreciated position benefits from knowing the after-tax proceeds before executing the trade. The calculator helps you compare selling now (short-term) versus waiting (long-term) with concrete dollar figures.
Real estate investors selling rental property or investment property. Long-term capital gains rates apply to investment property (though depreciation recapture adds complexity this calculator does not model). Knowing the basic capital gains tax on your sale helps you evaluate whether a 1031 exchange or installment sale might be worth structuring.
Cryptocurrency traders. The IRS treats crypto as property subject to capital gains rules. Each sale is a taxable event, and the holding period determines short-term vs long-term treatment. Active traders can use this calculator to estimate tax per transaction.
High earners managing NIIT exposure. If your MAGI is near the $200,000 (single) or $250,000 (married) threshold, knowing whether a planned sale triggers NIIT, and how much, helps you decide whether to accelerate or defer the sale to a different tax year. Combining this analysis with the Social Security Benefits Estimator and RMD Calculator gives a fuller picture of your total taxable income in retirement.
Tax-loss harvesting strategists. Investors who actively manage their taxable portfolio use this calculator to determine exactly how much tax is owed on a gain, then harvest an equal amount of losses from losing positions before year-end to zero out the liability.
What Insights Does the Capital Gains Tax Calculator Give You?
Capital Gain (or Loss) is the raw profit or loss: sale price minus purchase price. If this is positive, you have a gain and owe tax. If negative, you have a loss and owe no tax, and can potentially use the loss to offset other gains or deduct up to $3,000 against ordinary income.
Tax Rate shows the applicable federal capital gains rate: your ordinary marginal rate for short-term gains, or 0%/15%/20% plus any NIIT for long-term gains. This single number tells you which bracket you are in and whether you are near a boundary that planning could affect.
Tax Owed is the actual federal dollar amount you will pay on this transaction. This is the most actionable output, it converts the abstract tax rate into real money leaving your pocket. Use it to decide whether selling is worth it, how much of a loss you need to harvest, or whether tax-advantaged structures are worth exploring.
Net Proceeds shows the after-tax cash you actually keep: sale price minus the capital gains tax owed. This is the number that matters for what you can do with the money next, reinvest, pay down debt, fund a retirement account contribution.
Together, these four outputs answer the core question: if I sell this asset today, what happens financially?
How to use this Capital Gains Tax calculator
Enter your Purchase Price, the original cost basis of the asset. For stocks, this is your purchase price per share times number of shares. For real estate, include purchase price plus closing costs and capital improvements. For crypto, include the price plus exchange fees paid.
Enter your Sale Price, the proceeds from the sale. For stocks and crypto, use the proceeds after any exchange or brokerage fees. For real estate, use the gross sale price before closing costs (closing costs reduce your gain separately).
Select Holding Period, "Short-term" for assets held one year or less, "Long-term" for assets held more than one year. This is the most consequential single input, it determines whether you pay ordinary or preferential rates.
Select your Filing Status, choose Single, Married Filing Jointly, or Head of Household. This determines which income thresholds apply to each capital gains rate bracket.
Enter your Ordinary Income, your estimated taxable income from non-capital-gains sources for the current year. This positions your capital gain on the tax bracket stack. If uncertain, use your taxable income from last year's Form 1040 (line 15) as a starting estimate.
Review the four outputs, confirm the Capital Gain is what you expected. Check the Tax Rate to see if you are in the NIIT zone. Use Tax Owed to make your sell / hold decision. Note Net Proceeds for reinvestment planning.
Show formula & methodology ↓Show less ↑
Formula & Methodology
Capital Gain: Capital Gain = Sale Price − Purchase Price Short-term capital gains tax (ordinary income rates, 2025, single): Tax owed = Marginal tax on (Ordinary Income + Capital Gain) − Marginal tax on Ordinary Income Where marginal tax is computed using 2025 ordinary income brackets: 10% / 12% / 22% / 24% / 32% / 35% / 37%. Long-term capital gains rate (2025): Taxable income = Ordinary Income + Capital Gain | Filing Status | 0% threshold | 15% threshold | 20% threshold | |---|---|---|---| | Single | ≤ $48,350 | ≤ $533,400 | > $533,400 | | Married / Joint | ≤ $96,700 | ≤ $600,050 | > $600,050 | | Head of Household | ≤ $64,750 | ≤ $566,700 | > $566,700 | The rate applies to the capital gain portion above the ordinary income. If $30,000 of ordinary income straddles the 0% and 15% thresholds, the gain is split accordingly. NIIT (Net Investment Income Tax): NIIT applies at 3.8% on the lesser of: - Net investment income (including capital gains), or - MAGI − $200,000 (single) / $250,000 (married filing jointly) Net Proceeds: Net Proceeds = Sale Price − Tax Owed Worked example: Single filer, ordinary income $60,000, purchased stock for $20,000 three years ago, sold for $50,000 (long-term gain of $30,000). Taxable income = $60,000 + $30,000 = $90,000 Long-term rate at $90,000 (single): above $48,350 → 15% bracket Tax owed (LTCG) = $30,000 × 15% = $4,500 NIIT check: $90,000 < $200,000 → no NIIT Net Proceeds = $50,000 − $4,500 = $45,500 Now compare with selling after only 10 months (short-term): Ordinary income bracket at $90,000: 22% marginal rate Short-term tax = $30,000 × 22% = $6,600 Net Proceeds = $50,000 − $6,600 = $43,400 Waiting the full year saves $2,100 on this transaction. Key assumptions: The calculator computes federal capital gains tax only, it does not include state income taxes (which can add 0–13.3% depending on your state), the primary residence exclusion, depreciation recapture on real estate, or wash sale rule adjustments. Always verify with a tax professional before making large asset sales.
Frequently Asked Questions