Capital Gains Tax Calculator
Estimate short-term and long-term federal capital gains tax on stocks, crypto, real estate, and other asset sales for 2025.
Try next
Enter Your Investment Information
How to Read Your Capital Gains Tax Estimate
Capital gains tax trips up investors — not because the rates are complex, but because they interact with your ordinary income in ways that aren't obvious. Whether you sold stock, crypto, real estate, or a business, here's how to understand what you owe and when.
Why Capital Gains Tax Confuses People
Most investors know there's a difference between short-term and long-term rates, but fewer realize that your capital gains rate depends on your total taxable income — not just the gain itself. You might have a $50,000 long-term gain taxed at 0% if your other income is low enough, or at 15% or 20% depending on where the gain lands on the income scale. That's what this calculator is solving for.
How to Interpret Your Capital Gains Estimate — Step by Step
- Identify short-term vs. long-term gains. Assets held for one year or less are short-term — taxed at your ordinary income rate (up to 37%). Assets held longer than one year qualify for preferential long-term rates (0%, 15%, or 20%). The holding period is measured from the day after purchase to the day of sale.
- Understand how your ordinary income affects your rate. Long-term capital gains are stacked on top of your ordinary income for purposes of determining your rate. If your ordinary taxable income is $50,000 (married filing jointly) and you have a $30,000 long-term gain, the first portion of that gain may fall in the 0% bracket — this calculator handles that stacking calculation.
- Check for Net Investment Income Tax (NIIT). If your modified AGI exceeds $200,000 (single) or $250,000 (married), an additional 3.8% NIIT applies to the lesser of your net investment income or the amount over those thresholds. This is on top of the regular capital gains rate.
- Account for losses. Capital losses offset gains dollar-for-dollar. If you have losses from other sales this year, they reduce your taxable gain — enter your net gain (gains minus losses) for the most accurate estimate.
3 Common Mistakes When Using This Calculator
What to Do Next
- Read our full 2025 capital gains tax rates guide for the exact income thresholds for each rate bracket.
- If you have both capital gains and self-employment income, run your numbers through our income tax calculator to see the combined federal picture.
- Planning a future sale? Our 2026 capital gains rates page shows the updated thresholds so you can plan around the best tax year to realize the gain.
- Check out our capital gains tax guide for strategies like tax-loss harvesting and charitable giving that can reduce your liability.
How Capital Gains Tax Is Calculated
The IRS taxes capital gains differently depending on how long you held the asset. Here is how this calculator works through the math.
Determine Your Holding Period
Assets held more than one year qualify for long-term rates (0%, 15%, or 20%). Assets held one year or less are short-term and taxed as ordinary income at your regular bracket rate — up to 37%.
Calculate the Net Capital Gain
Subtract your cost basis (what you originally paid, including commissions) from your sale proceeds. The difference is your capital gain. Losses from other sales reduce this figure.
Stack Gains on Top of Ordinary Income
Long-term capital gains are added on top of your ordinary taxable income to determine which rate applies. If your ordinary income is low, part of your gain may fall in the 0% bracket — this calculator handles that stacking.
Check for Net Investment Income Tax (NIIT)
If your modified AGI exceeds $200,000 (single) or $250,000 (married filing jointly), an additional 3.8% NIIT applies to the lesser of your net investment income or the excess above those thresholds.
// Step 1 - Net Capital Gain
Net Gain = Sale Proceeds - Cost Basis
// Step 2 - Rate Determination (Long-Term, 2025 Single)
0% on gains where total income stays below $48,350
15% on gains where total income is $48,350 – $533,400
20% on gains where total income exceeds $533,400
// Step 3 - NIIT (if AGI exceeds threshold)
NIIT = Net Investment Income x 3.8%
// Short-Term Gains: taxed at ordinary income rates (10%–37%)
Worked Example: Selling Stock After 14 Months
You bought $10,000 of stock and sold it 14 months later for $16,000. Your long-term capital gain is $6,000. Your other taxable income (salary minus deduction) is $60,000.
Total income including the gain: $60,000 + $6,000 = $66,000 — which falls in the 15% long-term bracket for a single filer in 2025 (above the $48,350 threshold).
Estimated capital gains tax: $6,000 × 15% = $900. No NIIT applies because your AGI is well below $200,000.
Frequently Asked Questions
How to Reduce Your Capital Gains Tax
Several legal strategies can reduce or defer capital gains tax. Understanding them before you sell can save thousands of dollars.
Tax-Loss Harvesting
Capital losses offset gains dollar-for-dollar. If you have investments sitting at a loss, selling them in the same year as a gain can reduce or eliminate your taxable gain. Net losses up to $3,000 per year can also offset ordinary income. Losses beyond that carry forward to future years indefinitely. The wash-sale rule applies: you cannot repurchase a substantially identical security within 30 days before or after the sale.
The 0% Long-Term Capital Gains Rate
Long-term gains are taxed at 0% if your total taxable income (including the gain) stays below $48,350 for single filers or $96,700 for married filing jointly in 2025. In a low-income year -- retirement, sabbatical, or career transition -- it may be worth deliberately realizing gains at the 0% rate before income rises.
Hold for Long-Term Treatment
Assets held for more than one year qualify for long-term rates. The holding period begins the day after purchase and must exceed one full year -- selling on the one-year anniversary date is still short-term. The difference in tax between short-term and long-term rates can be substantial, particularly for high earners in the 22%+ brackets.
Donate Appreciated Stock
If you plan to donate to charity, donating appreciated shares directly -- rather than selling and donating cash -- eliminates the capital gains entirely. You get a charitable deduction for the full fair market value, the charity receives the full value, and no one pays capital gains tax on the appreciation.
Disclaimer: This calculator provides estimates for educational purposes only using 2025 federal capital gains tax rates. It does not account for state taxes, wash-sale rules, depreciation recapture, installment sales, or all individual tax situations. It is not tax, legal, or financial advice. Consult a qualified tax professional before making investment or tax decisions.