Capital Gains Tax Calculator
Federal tax on short- and long-term gains using 2025 IRS rates.
Formula
About this calculator
When you sell an asset for more than you paid, the profit is a capital gain — and how it is taxed depends almost entirely on one thing: how long you held it. Hold an investment for more than a year and it qualifies for the preferential long-term capital gains rates of 0%, 15% or 20%. Sell within a year and the gain is short-term, taxed as ordinary income at your regular bracket, which for most people is meaningfully higher.
Your gain is simply the sale price (proceeds) minus your cost basis — what you originally paid, including commissions and fees. This calculator takes those two numbers, your filing status and your other taxable income, and applies the correct 2025 rules. For long-term gains it stacks the gain on top of your ordinary income against the 2025 breakpoints: a single filer pays 0% on long-term gains while total taxable income stays under $48,350, 15% up to $533,400, and 20% above that. A gain can straddle two rates, so the tool shows exactly how much falls in each band.
Short-term gains get no such break. Because they are taxed as ordinary income, the calculator computes the tax as the increase you would see from adding the gain on top of your existing taxable income — the true marginal cost. That difference is often the single biggest argument for holding an investment past the one-year mark before selling.
You can also add a flat state tax rate, since most states tax capital gains as regular income, and the tool reports your net proceeds after tax and your effective rate. High earners should note the separate 3.8% net investment income tax, which is not included here. A capital loss — selling below your basis — produces no tax and can offset other gains, which the calculator flags automatically.
Frequently asked questions
What's the difference between short- and long-term gains?
An asset held one year or less produces a short-term gain, taxed at your ordinary income rate. Held longer than a year, it becomes a long-term gain, taxed at the lower 0%, 15% or 20% rates.
What are the 2025 long-term capital gains rates?
0%, 15% or 20%, based on total taxable income. For single filers in 2025 the 0% band runs to $48,350, 15% to $533,400, and 20% applies above that; married-filing-jointly thresholds are $96,700 and $600,050.
How is cost basis calculated?
Cost basis is generally what you paid for the asset plus purchase costs like commissions. For gifted or inherited assets special rules apply. Your gain is the sale price minus this basis.
Does this include state tax?
You can enter a flat state rate and it is added on top of the federal tax. Most states tax capital gains as ordinary income; a few have no income tax at all.
Related calculators
⚠️ Estimates use 2025 federal rules and are for information only, not tax advice. They exclude the 3.8% net investment income tax and the 28% collectibles rate. Confirm with a tax professional.