TakeHomeTax

Capital Gains Tax Calculator

Calculate capital gains tax on stocks, crypto, and real estate sales. See federal, NIIT, and state tax by holding period.

$
$
salary, wages, etc.
$
Net Proceeds After Tax
$21,70022.0% effective rate on gain
$15,000 capital gain → $3,300 total tax
Capital Gain
$15,000
Short-term
Federal CG Tax
$3,300
At ordinary income rates
NIIT (3.8%)
$0
Below threshold
State CG Tax
$0
No state capital gains tax
Save by Holding 1 More Year
$1,050
Long-term tax would be $2,250 vs $3,300 short-term
Tax Breakdown
Sale Price$25,000
Cost Basis−$10,000
Capital Gain$15,000
Federal CG Tax (short-term)−$3,300
Net Investment Income Tax (3.8%)$0
Texas State Tax$0
Total Tax$3,300
Net Proceeds$21,700
Effective Rate on Gain22.0%

Frequently Asked Questions

How are capital gains taxed federally?

Short-term capital gains (assets held one year or less) are taxed at your ordinary income tax rate, which ranges from 10% to 37% depending on your bracket. Long-term capital gains (assets held more than one year) receive preferential rates of 0%, 15%, or 20% based on your taxable income. The long-term rates are significantly lower for most taxpayers, making holding period one of the most important factors in investment tax planning.

Do all states tax capital gains?

No. Nine states have no income tax and therefore do not tax capital gains: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, and Wyoming. The remaining 41 states and Washington D.C. tax capital gains, typically at the same rate as ordinary income. California has the highest state capital gains rate at 13.3%, while states like Arizona (2.5% flat) and North Dakota (1.95%) are among the lowest.

Is crypto taxed differently than stocks?

Crypto and stocks are taxed at the same federal capital gains rates. The key difference is that wash sale rules currently apply to stocks but not to cryptocurrency. This means you can sell crypto at a loss, immediately repurchase it, and still claim the tax loss. With stocks, you must wait 31 days to repurchase a substantially identical security after a loss sale. Every crypto trade, swap, and spending event is a taxable event that must be reported to the IRS.

What is the Net Investment Income Tax?

The Net Investment Income Tax (NIIT) is an additional 3.8% surtax on investment income including capital gains, dividends, interest, and rental income. It applies when your modified adjusted gross income (MAGI) exceeds $200,000 for single filers or $250,000 for married filing jointly. The tax is calculated on the lesser of your net investment income or the amount your MAGI exceeds the threshold. Unlike regular tax brackets, these NIIT thresholds are not indexed for inflation.

Related Tax Calculators

Stock Option Tax Calculator
ISO vs NSO tax treatment
Retirement Withdrawal Calculator
401(k) and IRA tax impact
RSU Tax Calculator
Restricted stock unit vesting taxes
State Tax Guides
Compare all 50 states

How This Works

Capital gains are taxed at two distinct rates depending on how long you held the asset. Short-term capital gains apply to assets held for one year or less and are taxed at your ordinary income tax brackets, which range from 10% to 37% for 2026. Long-term capital gains apply to assets held for more than one year (specifically, one year and one day or longer) and receive preferential tax rates of 0%, 15%, or 20% depending on your taxable income. For single filers in 2026, the 0% rate applies to taxable income up to $50,600, the 15% rate applies up to $559,750, and the 20% rate applies above that threshold. Married filing jointly filers get roughly double those bracket thresholds. This difference in rates is the single biggest lever you have for reducing investment taxes.

The Net Investment Income Tax (NIIT) is an additional 3.8% surtax on investment income that applies to high earners. The NIIT thresholds are $200,000 for single filers and $250,000 for married filing jointly. The tax applies to the lesser of your net investment income or the amount by which your modified adjusted gross income (MAGI) exceeds the threshold. This means that if your ordinary income plus capital gains pushes you over the threshold, you could owe an extra 3.8% on some or all of your capital gain. The NIIT applies to both short-term and long-term capital gains, as well as dividends, interest, rental income, and royalties.

State capital gains tax varies dramatically across the country. Nine states have no income tax at all and therefore do not tax capital gains: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, and Wyoming. On the other end of the spectrum, California taxes capital gains at the same rate as ordinary income, with a top rate of 13.3%. New York, New Jersey, Oregon, and Hawaii also impose high rates on capital gains. Some states offer preferential treatment for long-term gains or provide exclusions for certain types of investments. Your state of residence can make a difference of tens of thousands of dollars on a large capital gain.

The IRS treats cryptocurrency as property, not currency. This means every trade, swap, or spending of crypto triggers a taxable event. If you trade Bitcoin for Ethereum, that is a sale of Bitcoin and a purchase of Ethereum, and you owe capital gains tax on any appreciation in the Bitcoin. DeFi transactions such as providing liquidity, yield farming rewards, and token swaps each create taxable events. NFT sales are taxed as capital gains, and airdrops and hard fork tokens are generally treated as ordinary income at the time of receipt. Accurate cost basis tracking across wallets and exchanges is essential for crypto tax compliance.

Wash sale rules currently apply to stocks, bonds, and other securities but do not apply to cryptocurrency as of 2026. Under wash sale rules, if you sell a stock at a loss and repurchase the same or substantially identical security within 30 days before or after the sale, you cannot claim the tax loss. However, because the IRS classifies crypto as property rather than a security, you can sell crypto at a loss and immediately repurchase the same token to harvest the tax loss. This provides a significant tax planning advantage for crypto investors. Be aware that Congress has considered extending wash sale rules to crypto, and this loophole may close in future legislation.

Real estate capital gains have several special provisions. If you sell your primary residence and have lived in it for at least two of the last five years, you can exclude up to $250,000 of gain (single) or $500,000 (married filing jointly) from taxation under Section 121. For investment properties, Section 1031 like-kind exchanges allow you to defer capital gains indefinitely by reinvesting proceeds into another qualifying property within specific time limits. However, depreciation recapture applies to rental property at a flat 25% rate on the portion of gain attributable to depreciation deductions taken during ownership, regardless of your income level or holding period.

Several strategies can help minimize your capital gains tax burden. Tax-loss harvesting involves selling losing investments to offset gains, reducing your net taxable gain. Managing your holding period to ensure assets qualify for long-term treatment can cut your federal rate from as high as 37% to a maximum of 20%. Investing in Qualified Opportunity Zones can defer and partially reduce capital gains taxes. Donating appreciated assets to charity lets you deduct the full market value without paying capital gains tax on the appreciation. Timing sales across tax years can keep you in lower brackets, and using tax-advantaged accounts like Roth IRAs for investments with high growth potential eliminates capital gains entirely on those assets.

More Tax Tools

PaycheckFreelance TaxOvertime (OBBBA)Quarterly EstimatesBonus TaxW-4 WithholdingTax RefundStock OptionsRSU TaxSelf-EmploymentSide IncomeRetirementSalary → HourlyHourly → SalaryMarriage TaxRelocationCost of LivingEmployer Cost1099 vs W2Social Security
The Take-Home Tax Guide
Weekly tips on reducing your tax burden, state tax changes, and salary negotiation strategies. Free.