Skip to main content
EverydayToolsSIMPLE • FREE • FAST
HomeCategories
Search tools...
  1. Home
  2. Finance & Money
  3. Capital Gains Tax Calculator
Advertisement
Loading...
Advertisement
Loading...

Estimate your 2025 federal, NIIT, and state capital gains taxes using progressive bracket stacking

When you sell an asset for more than you paid for it, the profit is called a capital gain, and it is subject to capital gains tax. Understanding how much tax you will owe before you sell can help you make better financial decisions — including whether to sell now or wait, how much to set aside for taxes, and how to minimize your liability legally. Our free Capital Gains Tax Calculator covers the full range of 2025 tax rules: federal long-term and short-term rates, the Net Investment Income Tax (NIIT), all 50 state rates, depreciation recapture for real estate, the Section 121 primary residence exclusion, and capital loss carryforward offsets. Capital gains are classified as either short-term or long-term based on how long you held the asset before selling. If you held the asset for one year or less (365 days or fewer), the gain is short-term and is taxed at your ordinary income tax rate, which can be as high as 37% for high earners. If you held the asset for more than one year (366+ days), the gain is long-term and benefits from preferential tax rates of 0%, 15%, or 20%, depending on your total taxable income. This distinction alone can mean tens of thousands of dollars in tax savings, which is why the holding period is one of the most important factors in capital gains tax planning. For long-term gains, the applicable tax rate is determined not by your gain alone, but by where your total taxable income — ordinary income plus capital gains combined — falls in the long-term capital gains brackets. This is called bracket stacking. For example, a single filer with $40,000 of ordinary income and $20,000 of long-term capital gains will pay 0% on the first $8,350 of their gain (because $40,000 + $8,350 = $48,350, the top of the 0% bracket for 2025) and 15% on the remaining $11,650. Our calculator applies this progressive stacking logic automatically, which is how the IRS actually computes your tax. The 2025 long-term capital gains brackets are: 0% for total income up to $48,350 (single) or $96,700 (married filing jointly); 15% for total income between $48,351 and $533,400 (single) or $96,701 and $600,050 (MFJ); and 20% for total income above those thresholds. These figures have been updated for 2025 inflation adjustments. High-income taxpayers also face the Net Investment Income Tax (NIIT), a 3.8% Medicare surtax that applies when your Modified Adjusted Gross Income (MAGI) exceeds $200,000 for single filers or $250,000 for married filing jointly (these thresholds are not inflation-adjusted). The NIIT applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold. Our calculator handles this correctly, avoiding any double-counting. State capital gains taxes vary dramatically across the country. Nine states have no income tax and therefore no capital gains tax: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Wyoming, and Missouri (where a 100% capital gains deduction became effective in 2025). At the other extreme, California taxes capital gains at up to 13.3% as ordinary income with no preferential rate. New York's combined state and city rate can reach 14.7% for New York City residents. Our calculator includes current 2025 rates for all 50 states plus Washington D.C. For real estate investors, two additional rules apply. First, the Section 121 primary residence exclusion allows you to exclude up to $250,000 of gain (or $500,000 if married filing jointly) from capital gains tax if you have owned and used the home as your primary residence for at least 2 of the past 5 years. Second, depreciation recapture under Section 1250 requires you to pay 25% tax on any depreciation previously claimed, even if the overall sale qualifies for the lower long-term capital gains rate. Both of these are handled automatically when you select Real Estate as your asset type and enter the relevant amounts. For collectibles — art, antiques, coins, precious metals, wine, and stamps — the maximum long-term capital gains rate is 28% rather than 20%. This special rate applies to the lesser of the actual gain or the collectibles gain. Our calculator correctly applies the 28% cap for collectibles. Capital losses from other investments can offset your capital gains dollar for dollar, reducing or eliminating your tax liability. If your capital losses exceed your capital gains in a given year, you can deduct up to $3,000 against ordinary income, and the remainder carries forward indefinitely to future tax years. Enter your capital loss carryforward amount to see how it reduces your taxable gain. All calculations run entirely in your browser. No data is sent to any server. Results are estimates for planning purposes; consult a qualified tax professional before making significant financial decisions.

Understanding Capital Gains Tax

Capital gains tax is levied on the profit from selling a capital asset such as stocks, real estate, cryptocurrency, or collectibles. The tax rate depends on how long you held the asset, your total income, your filing status, and the state where you live.

Short-Term vs. Long-Term Rates

The single most impactful factor in capital gains tax is the holding period. Assets held for one year or less are taxed as short-term capital gains at ordinary income rates of 10%–37%. Assets held for more than one year qualify for long-term rates of 0%, 15%, or 20%. For most investors in the middle tax brackets, holding an asset just one extra day past the one-year mark can cut their capital gains tax rate in half — from 22% or 24% (short-term) to 15% (long-term). This is the foundational principle of capital gains tax planning.

Progressive Bracket Stacking

Long-term capital gains do not have their own separate brackets that ignore your other income. Instead, the rates are determined by your total taxable income — ordinary income stacked first, then capital gains layered on top. This means if your ordinary income fills up the 0% bracket, your capital gains immediately land in the 15% bracket, even though the gain itself might be small. The calculator applies this stacking logic precisely, as required by the IRS. Always consider your total income for the year, not just the gain in isolation.

NIIT and Combined Federal Rate

The Net Investment Income Tax (NIIT) of 3.8% is a Medicare surtax that applies to investment income for high earners. For single filers with MAGI over $200,000 or married filers with MAGI over $250,000, the NIIT applies to the lesser of their net investment income or their excess MAGI. This means the effective maximum federal rate on long-term capital gains is 23.8% (20% + 3.8% NIIT) for the highest earners. For short-term gains, the combined maximum is up to 40.8% (37% + 3.8%). The $200,000 and $250,000 thresholds are fixed and not adjusted for inflation.

State Taxes and Special Rules

Most states tax capital gains as ordinary income at their top marginal rate, without the preferential federal rates. A handful of states have no income tax at all. Others like Arizona, North Dakota, and Wisconsin offer partial exclusions or deductions that reduce the effective state rate on capital gains. Real estate sales trigger two special federal rules: depreciation recapture (25% tax on depreciation previously claimed) and the Section 121 exclusion ($250K/$500K for primary residences). Collectibles face a 28% maximum long-term rate rather than 20%.

Tax Formulas

Adjusted Cost Basis

Basis = Purchase Price + Capital Improvements + Closing Costs − Accumulated Depreciation

The adjusted cost basis is what you actually paid for the asset, including improvements and purchase costs, minus any depreciation deductions previously claimed.

Capital Gain

Gain = Sale Price − Adjusted Basis − Selling Expenses

Your capital gain is the net profit after subtracting your cost basis and any costs to sell the asset (commissions, closing costs, transfer taxes).

Taxable Gain

Taxable Gain = max(0, Gain − Section 121 Exclusion − Loss Carryforward)

The taxable gain after applying the primary residence exclusion and capital loss carryforward. This is the amount subject to capital gains tax.

NIIT

NIIT = 3.8% × min(Net Investment Income, max(0, MAGI − Threshold))

The Net Investment Income Tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds $200,000 (single) / $250,000 (MFJ).

Depreciation Recapture

Recapture Tax = min(Depreciation Claimed, Gain) × 25%

Section 1250 requires depreciation previously claimed on real property to be recaptured at a 25% rate, separate from and in addition to the long-term capital gains tax.

2025 Tax Rate Tables

2025 Long-Term Capital Gains Brackets

Rates based on total taxable income (ordinary income + capital gains combined). Thresholds are inflation-adjusted for 2025.

RateSingleMarried Filing JointlyHead of Household
0%$0 – $48,350$0 – $96,700$0 – $64,750
15%$48,351 – $533,400$96,701 – $600,050$64,751 – $566,700
20%Over $533,400Over $600,050Over $566,700

Combined Federal + NIIT Maximum Rates

When MAGI exceeds NIIT thresholds, the 3.8% surtax is added to the capital gains rate.

Gain TypeBase RateWith NIITMax Combined
Long-Term0% / 15% / 20%+ 3.8%23.8%
Short-Term10%–37%+ 3.8%40.8%
Collectibles (LT)up to 28%+ 3.8%31.8%
Depreciation Recapture25%+ 3.8%28.8%

Worked Examples

Example 1: Stock Sale — Long-Term Gain with Bracket Stacking

Single filer with $60,000 of ordinary income sells stocks held for 2 years. Purchase price: $30,000. Sale price: $50,000. No state income tax (Texas). No selling expenses.

1

Capital gain = $50,000 − $30,000 = $20,000

2

2025 0% bracket for single = up to $48,350 total income

3

Room in 0% bracket = $48,350 − $60,000 = −$11,650 (negative — already past 0% band)

4

All $20,000 falls in the 15% bracket

5

Federal tax = $20,000 × 15% = $3,000

6

MAGI = $60,000 + $20,000 = $80,000 — below $200,000 NIIT threshold

7

NIIT = $0. State tax = $0 (Texas). Total tax = $3,000

8

Net proceeds = $50,000 − $3,000 = $47,000

Federal capital gains tax of $3,000 (15% rate). Effective rate = 15% on the gain. Net proceeds = $47,000.

Example 2: Real Estate Sale with Depreciation Recapture

Married filing jointly, $120,000 combined ordinary income. Rental property: purchased for $200,000, sold for $350,000. Improvements: $20,000. Selling costs: $21,000 (6%). Depreciation claimed: $30,000. Held 5 years.

1

Adjusted basis = $200,000 + $20,000 − $30,000 = $190,000

2

Capital gain = $350,000 − $190,000 − $21,000 = $139,000

3

Taxable gain = $139,000 (no exclusion — not primary residence)

4

Depreciation recapture = $30,000 × 25% = $7,500

5

Remaining LT gain = $139,000 − $30,000 = $109,000

6

MFJ 0% bracket = up to $96,700. Room above $120,000 ordinary income = $0 (already above $96,700)

7

MFJ 15% bracket cap = $600,050. Room = $600,050 − $120,000 = $480,050. All $109,000 at 15%

8

LT federal tax = $109,000 × 15% = $16,350

9

MAGI = $120,000 + $139,000 = $259,000. Excess over $250,000 threshold = $9,000

10

NIIT = 3.8% × min($139,000, $9,000) = 3.8% × $9,000 = $342

11

Total federal = $7,500 + $16,350 + $342 = $24,192

Total federal tax of approximately $24,192 (17.4% effective rate on the $139,000 gain). Net proceeds after costs and taxes = $350,000 − $21,000 − $24,192 = $304,808.

How to Use the Capital Gains Tax Calculator

1

Select Asset Type and Filing Status

Choose the type of asset you are selling — stocks/ETFs, real estate, cryptocurrency, collectibles, or other. Then select your federal tax filing status: single, married filing jointly, married filing separately, head of household, or qualifying widow(er). These selections determine which tax brackets and special rules (like the collectibles 28% cap or real estate depreciation recapture) apply to your sale.

2

Enter Purchase Price, Sale Price, and Income

Enter the original purchase price (your cost basis), the gross sale price (before selling expenses), and your other annual taxable income before this sale. The income field is critical because it determines how your capital gains are stacked onto your existing income in the progressive brackets. If your ordinary income is $60,000 and you are single, only gains above $48,350 will be taxed at the long-term 15% rate in 2025.

3

Set Purchase and Sale Dates

Use the date pickers to enter the exact dates you purchased and sold the asset. The calculator automatically computes how many days you held the asset and classifies the gain as short-term (365 days or fewer) or long-term (366 or more days). This is the most important factor in determining your tax rate. The Hold vs. Sell tab shows how much tax you could save by waiting to qualify for long-term rates if you are currently short-term.

4

Add State, Selling Costs, and Advanced Options

Select your state to add state capital gains tax to your total. Enter selling expenses such as agent commissions and closing costs — these reduce your capital gain dollar for dollar. Click 'Show Advanced Options' to enter capital improvements, purchase closing costs, capital loss carryforward from prior years, accumulated depreciation (real estate), and the primary residence exclusion toggle. Review the Tax Breakdown tab for a full breakdown and the donut chart showing the split between federal, NIIT, state, and net proceeds.

Frequently Asked Questions

What is the capital gains tax rate for 2025?

For 2025, long-term capital gains (assets held more than one year) are taxed at 0%, 15%, or 20% depending on your total taxable income. Single filers pay 0% if total income is under $48,350, 15% if total income is between $48,351 and $533,400, and 20% above $533,400. Married filing jointly thresholds are $96,700 (0%) and $600,050 (15% cap). Short-term gains (one year or less) are taxed at ordinary income rates of 10% to 37%. High earners also pay an additional 3.8% Net Investment Income Tax (NIIT), bringing the maximum effective rate to 23.8% on long-term gains or 40.8% on short-term gains. These rates apply to federal taxes only; state taxes vary widely.

How does the primary residence exclusion work?

Under Section 121 of the Internal Revenue Code, you can exclude up to $250,000 of capital gain from the sale of your primary residence ($500,000 if married filing jointly) from federal capital gains tax. To qualify, you must have owned the home and used it as your primary residence for at least 2 of the 5 years immediately before the sale. The 2-out-of-5-year rule does not require the 2 years to be consecutive. If you qualify for only a partial exclusion (due to a change in employment, health, or unforeseen circumstances), you may exclude a prorated portion of the maximum amount. Depreciation previously claimed on the home is still subject to recapture at 25% even when the Section 121 exclusion applies.

What is depreciation recapture and how much does it cost?

Depreciation recapture applies when you sell real estate or other depreciable assets that you previously deducted depreciation on. If you own a rental property and deducted $40,000 in depreciation over the years, the IRS requires you to 'recapture' those deductions when you sell by taxing that $40,000 at a flat 25% rate (called unrecaptured Section 1250 gain), rather than the potentially lower long-term capital gains rate of 0% or 15%. So the recapture tax on $40,000 of depreciation would be $10,000. This rule applies even if you qualify for the primary residence exclusion on the rest of the gain. Depreciation recapture is one of the most commonly overlooked costs in real estate sales.

Can I use capital losses to offset capital gains?

Yes. Capital losses from selling assets at a loss can offset capital gains dollar for dollar. For example, if you realize a $20,000 gain on one stock and a $12,000 loss on another, your net capital gain is only $8,000. If your total capital losses exceed your total capital gains in a given year, you can deduct up to $3,000 of the excess loss against ordinary income (wages, salary, etc.). Any remaining unused losses carry forward indefinitely to future tax years, where they can be used again to offset future gains or ordinary income. This is the basis of the tax-loss harvesting strategy used by investors at year-end. Enter your carryforward amount in the calculator to see the tax reduction.

How are cryptocurrency capital gains taxed?

Cryptocurrency is treated as property by the IRS, not currency. Every time you sell, exchange, or use cryptocurrency to buy goods or services, you trigger a taxable event. The gain or loss is calculated as the difference between your cost basis (what you paid, including fees) and the fair market value at the time of the transaction. If you held the crypto for more than one year before selling, the gain is long-term and qualifies for the preferential 0%/15%/20% rates. If you held it one year or less, it is taxed at ordinary income rates. Crypto-to-crypto swaps also trigger taxable events. The IRS requires reporting all crypto transactions on your tax return regardless of gain or loss amount.

What is the difference between the effective tax rate and the marginal rate?

Your marginal tax rate is the rate that applies to your last dollar of income — the rate at the highest bracket you reach. For example, if you are in the 22% ordinary income bracket, your marginal rate is 22%. Your effective tax rate is the actual percentage of your income (or capital gain) paid in taxes overall, accounting for the progressive bracket structure where lower income is taxed at lower rates. Because of bracket stacking and the progressive nature of capital gains rates, the effective rate on your capital gain is almost always lower than your marginal rate. Our calculator shows the effective total tax rate — total taxes divided by the taxable gain — so you can understand what portion of your actual gain goes to taxes.

Related Tools

Income Tax Calculator

Calculate your total federal income tax liability including all income sources

Self-Employment Tax Calculator

Estimate Social Security and Medicare taxes on self-employment income

Compound Interest Calculator

See how your after-tax investment proceeds can grow over time

Home Equity Loan Calculator

Calculate monthly payments and total cost of a home equity loan

EverydayToolsSIMPLE • FREE • FAST

Free online tools for non-IT professionals. Calculators, converters, generators, and more.

Popular Categories

  • Health Calculators
  • Finance Calculators
  • Conversion Tools
  • Math Calculators

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 EverydayTools.io. All rights reserved.