Free Tool

Capital Gains Tax Calculator

Estimate federal tax on investment profits including the 0%/15%/20% long-term rates and the 3.8% Net Investment Income Tax under IRC Section 1411.

Instant Results
No Data Stored
100% Free

What Is the Capital Gains Tax Calculator?

Capital gains tax applies when you sell a capital asset (stocks, bonds, real estate, cryptocurrency, collectibles) for more than your cost basis. The tax rate depends on how long you held the asset. Short-term gains on assets held one year or less are taxed as ordinary income at your marginal bracket rate (up to 37% for 2025). Long-term gains on assets held more than one year receive preferential rates: 0% for taxable income up to $48,350 (single) or $96,700 (MFJ), 15% up to $533,400 (single) or $600,050 (MFJ), and 20% above those thresholds. On top of that, the Net Investment Income Tax (NIIT) under IRC Section 1411 imposes a 3.8% surtax on investment income (including capital gains) for taxpayers with modified AGI exceeding $200,000 (single) or $250,000 (MFJ). Collectibles (art, coins, antiques) are taxed at a maximum 28% rate regardless of holding period. Unrecaptured Section 1250 gain on depreciated real property is taxed at a maximum 25% rate. Capital losses offset capital gains dollar-for-dollar, and up to $3,000 of excess losses can be deducted against ordinary income annually, with the remainder carrying forward indefinitely.

How to Use This Calculator

1

Enter Sale Price and Cost Basis

Input the total proceeds from the sale and your original cost basis (purchase price plus commissions, fees, and improvements). The difference is your capital gain.

2

Select Holding Period

Choose short-term (1 year or less) or long-term (more than 1 year). This determines which tax rate schedule applies.

3

Enter Other Taxable Income

Provide your other taxable income (wages, business income, etc.) to determine which long-term rate bracket applies and whether the NIIT surtax is triggered.

4

Review Total Tax Impact

The calculator shows capital gains tax, NIIT if applicable, total tax, and your net after-tax proceeds from the sale.

Key Concepts

Long-Term vs. Short-Term

Assets held over one year qualify for preferential 0%/15%/20% rates. Assets held one year or less are taxed at ordinary income rates up to 37%.

Net Investment Income Tax (NIIT)

A 3.8% surtax on investment income for AGI above $200K (single) or $250K (MFJ). These thresholds are not indexed for inflation.

Cost Basis

Your original purchase price plus commissions, fees, and improvements. Inherited assets receive a stepped-up basis to FMV at date of death under IRC Section 1014.

Capital Loss Offset

Losses offset gains dollar-for-dollar. Net losses up to $3,000/year ($1,500 MFS) deduct against ordinary income. Excess carries forward indefinitely.

Wash Sale Rule (IRC 1091)

You cannot deduct a loss if you buy substantially identical securities within 30 days before or after the sale. The disallowed loss is added to the new position's basis.

Section 121 Home Sale Exclusion

Exclude up to $250K ($500K MFJ) of gain on the sale of a primary residence if you lived there 2 of the last 5 years.

Expert Insights

The One-Day Rule: The most impactful capital gains strategy is simply holding assets past the one-year mark. The rate difference between short-term (up to 37%) and long-term (0-20%) can be enormous. On a $100,000 gain for someone in the 35% bracket, selling one day early costs an additional $15,000-$20,000 in federal tax. For investors, this means resisting the urge to sell profitable positions before the 366-day holding period is reached.

Tax-Loss Harvesting: By strategically selling losing positions to offset gains, you can reduce your current-year tax bill while maintaining market exposure by purchasing a similar (but not "substantially identical") security. A total market fund can replace an S&P 500 fund without triggering the wash sale rule. At higher income levels, the NIIT surtax adds 3.8%, making the effective maximum rate on long-term gains 23.8%. Since the NIIT thresholds ($200K/$250K) are not indexed for inflation, more taxpayers are caught by it each year.

Gain Harvesting at 0%: If you are in the 0% long-term capital gains bracket (taxable income under $48,350 single / $96,700 MFJ for 2025), consider intentionally realizing gains to "reset" your cost basis to a higher level. This is especially valuable in early retirement or gap years when your income dips below the 0% threshold.

Frequently Asked Questions

The IRS treats cryptocurrency as property, not currency. Every sale, exchange, or use of crypto to purchase goods triggers a taxable event. Gains are subject to the same short-term/long-term capital gains rates as stocks. Crypto-to-crypto trades (e.g., BTC to ETH) are also taxable events. Mining and staking rewards are taxed as ordinary income at fair market value when received. The IRS requires reporting on Form 8949 and Schedule D.
Under IRC Section 1014, when you inherit a capital asset, your cost basis is "stepped up" (or down) to the fair market value on the date of the decedent's death. If your parent bought stock for $10,000 and it was worth $100,000 at death, your basis is $100,000. If you immediately sell for $100,000, you owe zero capital gains tax. This is one of the most significant tax benefits in the code and a key reason financial advisors recommend holding appreciated assets until death rather than gifting them during life.
After netting all capital gains and losses, if you have a net capital loss, you can deduct up to $3,000 per year ($1,500 if married filing separately) against ordinary income. Any remaining net loss carries forward to future years indefinitely. There is no limit on the amount of capital losses that can offset capital gains; the $3,000 limit applies only to the excess loss used against ordinary income.
For 2025, long-term capital gains are taxed at 0% to the extent they fall within the lowest bracket: up to $48,350 for single filers or $96,700 for married filing jointly. Your other taxable income fills the bracket first, and capital gains "stack" on top. If your ordinary taxable income is $40,000 (single), you have $8,350 of room in the 0% bracket for long-term gains. Gains above that threshold are taxed at 15%.
Under IRC Section 1202, if you hold stock in a qualified small business (C-corporation with less than $50 million in gross assets at issuance) for more than 5 years, you can exclude up to 100% of the gain (up to the greater of $10 million or 10x your basis) from federal income tax. The stock must have been acquired at original issuance. This is one of the most powerful tax incentives for startup founders and early-stage investors.

This calculator provides estimates for educational purposes only. Tax laws change frequently and individual circumstances vary. These estimates do not constitute tax advice. Consult a qualified CPA or tax professional before making tax-related decisions.

Minimize Your Capital Gains Tax

Compare top-rated investment platforms and tax-efficient strategies reviewed by our editorial team.

See Best Investing Platforms