๐ Capital Gains Tax Calculator: Estimate 2025 Federal Tax
By Shihab Mia ยท Reviewed by ToolNimba Review Team, personal finance and tax content review ยท Updated 2026-06-20
This tool gives a simplified estimate of US federal capital gains tax and is not tax, legal, or financial advice. It ignores state taxes, the 3.8% Net Investment Income Tax, losses, the wash sale rule, and other special cases. Confirm your numbers with a qualified tax professional before acting.
Long-term rate is set by your taxable income band (2025 US federal brackets).
Short-term gains are taxed as ordinary income. Enter your marginal rate.
Estimate only. Covers US federal long-term capital gains brackets and treats short-term gains as ordinary income at the rate you enter. It does not include the 3.8% Net Investment Income Tax, state taxes, or capital losses. This is not tax advice.
When you sell an asset such as a stock, fund, crypto, or property for more than you paid, the profit is a capital gain, and the tax you owe depends on how long you held it and how much you earn. This capital gains tax calculator works out your gain, applies the right federal rate, and shows the estimated tax plus what you keep after it. Long-term gains use the 0%, 15%, or 20% brackets, while short-term gains are taxed as ordinary income at the rate you enter.
What is the Capital Gains Tax Calculator?
A capital gain is simply the profit on an asset: sale price minus your cost basis (what you paid, including commissions and improvements). If you bought shares for 10,000 dollars and sold them for 16,000 dollars, your capital gain is 6,000 dollars. That gain is what gets taxed, not the full 16,000 dollars of proceeds, because you are only taxed on the increase in value, not on the return of your own money. A capital gains tax calculator exists to isolate that profit and apply the correct rate so you are not guessing at the figure.
The single biggest factor in how much tax you pay is the holding period. If you owned the asset for more than one year before selling, the profit is a long-term capital gain and qualifies for preferential federal rates of 0%, 15%, or 20%, set by your taxable income band. If you owned it for one year or less, it is a short-term capital gain and is taxed as ordinary income at your normal marginal rate, which for many people is meaningfully higher. This is why the one-year line is so important to investors, and why this capital gains tax calculator asks you which side of that line you fall on.
Long-term rates are not a flat percentage. They sit on top of your other taxable income, so a lower earner can pay 0% on long-term gains while a high earner pays 20% on the same gain. For 2025, a single filer with taxable income up to 48,350 dollars pays the 0% long term capital gains tax rate, the 15% band runs up to 533,400 dollars, and income above that is taxed at 20%. Married couples filing jointly get roughly double those thresholds. The calculator picks the capital gains tax rate for you when you choose your filing status and income band.
Short term capital gains tax is far less generous. Because the gain is folded into your ordinary income, it can be taxed anywhere from 10% to 37% under the 2025 federal brackets. For a higher earner, selling a winning position a few weeks early can cost more in tax than the timing decision was ever worth. The practical takeaway is that the calendar matters: this stock sale tax calculator lets you model selling now versus waiting past the one-year mark so the investment profit tax is a deliberate choice rather than an accident.
The rules vary by asset type, and the calculator gives a clean baseline rather than every edge case. Crypto capital gains tax follows the same short and long term logic as stocks because the IRS treats digital assets as property. A primary home can qualify for the home sale capital gains exclusion of up to 250,000 dollars single or 500,000 dollars married if you meet the ownership and use tests, which can wipe out the tax entirely. Collectibles such as art and coins are capped at a 28% long-term rate, and depreciated real estate triggers a separate 25% recapture. Use the result here as the federal starting point and layer these rules on top.
A few items always sit outside this estimate. High earners may also owe the 3.8% Net Investment Income Tax, most states levy their own tax on gains, and capital losses can offset gains through tax loss harvesting to reduce what you owe. The wash sale rule blocks claiming a loss if you rebuy the same security within 30 days. Treat the output of this capital gains tax calculator as a first-pass estimate of federal capital gains tax, then refine it with your full tax picture or a professional.
When to use it
- Estimating the tax bill before you sell stocks, ETFs, or mutual fund shares so the proceeds are not a surprise.
- Comparing the tax cost of selling now (short-term) versus waiting past the one-year mark for long-term rates.
- Working out roughly how much of a property or crypto sale you actually keep after federal capital gains tax.
- Checking whether your income keeps you in the 0% long-term bracket, where qualifying gains can be tax-free federally.
- Sizing a tax loss harvesting move by seeing how much an offsetting loss reduces the tax on a winning position.
- Sanity-checking a brokerage 1099-B or a tax preparer estimate before you file, using your own purchase and sale figures.
How to use the Capital Gains Tax Calculator
- Enter your purchase price (cost basis) and the sale price (proceeds) of the asset.
- Choose the holding period: long term if you held it more than a year, short term if a year or less.
- For long term, pick your filing status and taxable income band; for short term, enter your ordinary income tax rate.
- Read your capital gain, the rate applied, the estimated tax, and your net proceeds, then copy the summary if you need it.
Formula & method
Worked examples
You bought stock for 10,000 dollars and sold it after two years for 16,000 dollars. You are single with 90,000 dollars of taxable income.
- Capital gain = sale - purchase = 16,000 - 10,000 = 6,000 dollars
- Held more than one year, so it is a long-term gain
- 90,000 dollars of income falls in the 15% long-term band for a single filer
- Tax = 6,000 x 15% = 900 dollars
Result: Estimated long-term capital gains tax = 900 dollars, leaving 15,100 dollars in net proceeds.
You bought stock for 10,000 dollars and sold it after eight months for 16,000 dollars. Your ordinary marginal tax rate is 22%.
- Capital gain = 16,000 - 10,000 = 6,000 dollars
- Held one year or less, so it is a short-term gain taxed as ordinary income
- Apply your ordinary rate: tax = 6,000 x 22% = 1,320 dollars
- Compare: waiting past one year would have cut the rate to 15% and the tax to 900 dollars
Result: Estimated short-term capital gains tax = 1,320 dollars, which is 420 dollars more than the long-term result.
You are single with 40,000 dollars of taxable income and sold long-held stock for a 5,000 dollar gain. You want to know if you qualify for the 0% rate.
- Capital gain = 5,000 dollars, held more than one year so it is long-term
- Add the gain to income to test the band: 40,000 + 5,000 = 45,000 dollars
- 45,000 dollars stays under the 48,350 dollar single 0% ceiling for 2025
- Tax = 5,000 x 0% = 0 dollars federally
Result: Estimated federal capital gains tax = 0 dollars, so you keep the full 5,000 dollar gain, though state tax may still apply.
2025 US federal long-term capital gains tax rates by taxable income
| Long-term rate | Single filer | Married filing jointly |
|---|---|---|
| 0% | Up to $48,350 | Up to $96,700 |
| 15% | $48,351 to $533,400 | $96,701 to $600,050 |
| 20% | Over $533,400 | Over $600,050 |
2025 short-term capital gains tax (ordinary income rates) by single-filer income
| Ordinary rate | Single filer taxable income | Applies to |
|---|---|---|
| 10% to 12% | Up to $48,475 | Lower earners |
| 22% to 24% | $48,476 to $197,300 | Middle earners |
| 32% to 35% | $197,301 to $626,350 | Upper earners |
| 37% | Over $626,350 | Top earners |
Long-term vs short-term treatment on a 6,000 dollar gain
| Holding period | Rate basis | Example rate | Tax on $6,000 |
|---|---|---|---|
| One year or less (short term) | Ordinary income rate | 22% | $1,320 |
| More than one year (long term) | 0/15/20% by income | 15% | $900 |
| More than one year, lowest band | 0/15/20% by income | 0% | $0 |
Common mistakes to avoid
- Taxing the full sale price instead of the gain. You are taxed only on the profit, not the whole proceeds. The cost basis (what you paid) is yours to keep tax-free, so always subtract it before applying any rate.
- Confusing short-term and long-term holding periods. The line is more than one year, not exactly one year. Selling on day 365 is still short term and taxed at ordinary rates. Holding even one extra day past a full year can move you to the lower long-term brackets.
- Assuming long-term gains have a single flat rate. Long-term rates are 0%, 15%, or 20% depending on your taxable income for the year. A lower earner may pay nothing on the same gain that costs a high earner 20%, so your income band matters.
- Forgetting state tax and the Net Investment Income Tax. This estimate is federal only. Most states tax capital gains too, and higher earners may owe an extra 3.8% Net Investment Income Tax. Your real bill can be higher than the federal figure shown here.
- Forgetting to add the gain itself when testing your bracket. The gain stacks on top of your other income, so a large sale can push part of it from the 0% or 15% band into a higher one. Add the gain to your taxable income before deciding which long-term rate applies.
- Triggering the wash sale rule when harvesting losses. If you sell at a loss and rebuy the same or a substantially identical security within 30 days before or after, the IRS disallows the loss. Plan the timing so a harvested loss actually counts against your gains.
Glossary
- Capital gain
- The profit from selling an asset, equal to the sale price minus your cost basis.
- Cost basis
- What you paid for the asset, including purchase commissions and qualifying improvements, used to work out the gain.
- Long-term capital gain
- Profit on an asset held more than one year, taxed at preferential federal rates of 0%, 15%, or 20%.
- Short-term capital gain
- Profit on an asset held one year or less, taxed as ordinary income at your normal marginal rate.
- Marginal tax rate
- The tax rate that applies to your next dollar of ordinary income, used for short-term gains.
- Net Investment Income Tax
- An extra 3.8% federal tax on investment income for higher earners, on top of regular capital gains tax.
- Tax loss harvesting
- Selling losing investments to realize losses that offset capital gains and up to 3,000 dollars of ordinary income a year.
- Wash sale rule
- An IRS rule that disallows a loss deduction if you buy the same or a substantially identical security within 30 days of the sale.
Frequently asked questions
How is capital gains tax calculated?
Take your capital gain, which is the sale price minus what you paid (your cost basis), then multiply it by the applicable rate. Long-term gains use 0%, 15%, or 20% based on your taxable income, while short-term gains are taxed as ordinary income. For example, a 6,000 dollar long-term gain at 15% is 900 dollars of tax.
What is the difference between short-term and long-term capital gains tax?
Short-term gains apply to assets held one year or less and are taxed at your ordinary income tax rate, which can be as high as 37%. Long-term gains apply to assets held more than one year and qualify for lower rates of 0%, 15%, or 20%. Holding past the one-year mark is the main lever for reducing the tax.
What are the 2025 long-term capital gains tax rates?
For 2025, single filers pay 0% on long-term gains with taxable income up to 48,350 dollars, 15% from 48,351 to 533,400 dollars, and 20% above that. Married couples filing jointly get roughly double those thresholds, with 0% up to 96,700 dollars and 20% above 600,050 dollars.
Do I pay capital gains tax if I lost money on the sale?
No. If you sold for less than your cost basis you have a capital loss, not a gain, so there is no capital gains tax on that sale. Losses can also offset other gains and up to 3,000 dollars of ordinary income per year through tax loss harvesting, which can lower your overall tax bill.
Is the 0% capital gains tax rate real?
Yes. If your total taxable income, including the gain, stays within the 0% long-term band for your filing status, qualifying long-term gains are taxed at 0% federally. This is why some investors time sales for lower-income years, though state taxes may still apply.
Does this calculator include state taxes and other surtaxes?
No. It estimates US federal capital gains tax only. It does not include state income tax, the 3.8% Net Investment Income Tax for higher earners, or special rules for collectibles and depreciated real estate. Use it as a starting point and confirm your full liability with a tax professional.
How much is capital gains tax on the sale of a house?
If the home was your primary residence and you meet the ownership and use tests, you can exclude up to 250,000 dollars of gain if single or 500,000 dollars if married filing jointly. Gain above the exclusion is taxed at long-term rates of 0%, 15%, or 20%. Investment and second properties do not get the exclusion and may also face 25% depreciation recapture.
Do I pay capital gains tax on cryptocurrency?
Yes. The IRS treats crypto as property, so selling, trading, or spending it at a profit creates a capital gain. Held one year or less it is taxed at short-term ordinary rates, and held more than one year it qualifies for the lower long-term rates, exactly like stocks. This calculator models both cases.
How can I reduce or avoid capital gains tax legally?
Common approaches include holding assets more than a year for long-term rates, harvesting losses to offset gains, timing sales for lower-income years to reach the 0% band, using tax-advantaged accounts like an IRA or 401(k), and claiming the home sale exclusion. A tax professional can match these to your situation.
When is capital gains tax due after I sell?
Capital gains are reported on the tax return for the year you sold, generally due the following April. If the gain is large, you may need to make a quarterly estimated tax payment to avoid an underpayment penalty rather than waiting until you file.
Sources
- Topic No. 409, Capital Gains and Losses , Internal Revenue Service
- Capital Gains Tax: How It Works, Rates and Calculator , Investopedia