Capital Gains Tax Calculator

Estimate Short-Term & Long-Term Tax on Stocks, Crypto, Real Estate — 2026 Rates

Estimate short-term and long-term capital gains tax for 2026. Covers stocks, crypto, real estate, NIIT, state taxes and tax-loss harvesting | Calculator4U

Calculate Short Term and Long Term Capital Gains.

About This Calculator

The Capital Gains Calculator is an essential tool for investors, traders, and anyone selling appreciated assets. Capital gains tax applies when you sell an investment or asset for more than you originally paid—affecting stocks, bonds, mutual funds, ETFs, real estate, cryptocurrency, collectibles, and other property. Understanding your potential tax liability before selling can help you make smarter decisions about timing, asset selection, and tax-efficient investing strategies.

The U.S. tax code distinguishes between short-term and long-term capital gains based on how long you held the asset. Short-term gains (assets held one year or less) are taxed at your ordinary income rate, which ranges from 10% to 37%. Long-term gains (assets held more than one year) receive preferential tax treatment with brackets of 0%, 15%, or 20% depending on your total taxable income. This significant difference makes holding period planning one of the most powerful tax strategies available to investors.

Beyond federal taxes, state taxes vary dramatically and can drastically change your net proceeds. For example, states like California tax capital gains as ordinary income up to 13.3%, while states like Florida, Texas, and Nevada have no state capital gains tax at all. On a $100,000 long-term gain, a California investor in the 15% federal bracket pays $28,300 in total taxes compared to just $15,000 in Florida—an $13,300 difference from state tax alone. Additionally, high earners may owe an extra 3.8% Net Investment Income Tax (NIIT), raising the effective top federal rate to 23.8%.

Capital Gains Formula

Capital Gain = Selling Price - Purchase Price - Expenses

Selling Price = Total proceeds from the sale (after broker commissions)

Purchase Price (Cost Basis) = Original purchase price + acquisition costs

Expenses = Transaction fees, commissions, legal fees, transfer costs

Your cost basis may include reinvested dividends, stock splits, and capital improvements (for real estate). Keep detailed records to maximize your basis and minimize taxable gains.

Short-Term vs Long-Term Capital Gains Tax Rates (2026)

Tax rates vary significantly based on holding period and income level:

Type Tax Rate Holding Period Income Threshold (Single Filer)
Short-Term10% - 37%≤ 1 yearTaxed as ordinary income
Long-Term (0%)0%> 1 yearUp to $49,449 (Many retirees and lower-income investors pay 0%)
Long-Term (15%)15%> 1 year$49,450 - $545,500
Long-Term (20%)20%> 1 yearOver $545,500
NIIT (Additional)+3.8%AnyMAGI over $200,000 (Brings top effective federal rate to 23.8%)

Note: Collectibles (art, coins, antiques, wine) are taxed at a maximum 28% rate. Qualified small business stock may qualify for exclusions under Section 1202.

Types of Capital Assets & Tax Treatment

Capital gains rules apply to virtually all investment property, though some assets carry special rules:

  • Stocks and Bonds: Publicly traded securities, including dividends reinvested.
  • Mutual Funds and ETFs: Capital gain distributions plus gains from selling shares.
  • Cryptocurrency & NFTs: Treated explicitly as property by the IRS. Every individual sale, trade (crypto-to-crypto), or spend is a taxable event requiring cost basis tracking.
  • Real Estate: Investment properties, land, or commercial buildings. However, for a primary residence, a special exclusion shelters up to $250,000 (single) or $500,000 (married filing jointly) of the profit tax-free if you owned and lived in the home for 2 out of the last 5 years.
  • Collectibles: Art, antiques, coins, stamps, and fine wine (taxed at a maximum 28% rate).
  • Business Assets: Equipment, intellectual property, and goodwill from business sales.

How to Use This Calculator

  1. Enter your sale value: Input the total proceeds you received (or expect to receive) from selling the asset.
  2. Input your purchase value: Enter your cost basis—the original purchase price plus any acquisition costs.
  3. Add transfer expenses: Include broker commissions, legal fees, transfer taxes, and other selling costs.
  4. Select your holding period: Choose short-term (≤1 year) or long-term (>1 year) based on your ownership duration.
  5. Choose your tax bracket & state: Select your filing status, marginal income tax bracket, and state of residence to calculate applicable federal and state rates.
  6. Review your results: See your total net gain, total tax owed (including potential NIIT and state allocations), and net proceeds after taxes.

Common Capital Gains Mistakes to Avoid

❌ Not tracking your cost basis: Keep meticulous records of purchase prices, reinvested dividends, and stock splits. Without accurate basis, the IRS defaults to a $0 basis, causing you to overpay taxes significantly.

❌ Ignoring holding periods: Selling an asset even one day before the one-year mark triggers short-term rates instead of preferential long-term rates—potentially doubling your tax bill.

❌ Forgetting wash sale rules: If you sell a security at a loss and repurchase the same or a substantially identical security within 30 days (before or after the sale), the loss is disallowed for tax purposes.

❌ Missing state tax impacts: Failing to account for local tax codes can catch you off guard. High-tax states like California add up to 13.3% on top of your federal burden, whereas states like Florida or Texas charge 0% state capital gains tax.

❌ Not harvesting losses: Realized losses can offset capital gains dollar-for-dollar. If your losses exceed your gains, you can use up to $3,000 to offset ordinary income annually, with unlimited carryforward to future tax years.

Tax-Saving Strategies for Capital Gains

Strategy How It Works Best For
Tax-Loss HarvestingSell losing investments before the end of the year to offset realized gainsActive investors with mixed portfolio performance
1031 Like-Kind ExchangeDefer capital gains taxes by reinvesting the proceeds into a similar "like-kind" propertyReal estate investors and commercial property owners
Qualified Opportunity ZonesInvest realized capital gains into designated, economically distressed communities for tax deferral and step-upsLong-term investors holding significant gains from any asset type
Charitable GivingDonate appreciated assets directly to a qualified charity to completely avoid the capital gains tax while securing a full deductionPhilanthropic investors looking to maximize charitable impacts
Specific IdentificationInstruct your broker to sell specific shares (e.g., those with the highest cost basis first) rather than defaulting to First-In, First-OutInvestors who accumulated a single stock across multiple purchase lots
Installment SalesSpread out the payment received from an asset sale over multiple years to avoid being pushed into a higher tax bracketLarge, one-time transactions such as selling a business or land

Related Investment Calculators

Sources & Disclaimer: Tax rates and thresholds based on IRS Publication 550 (Investment Income and Expenses) and IRS Topic No. 409 (Capital Gains and Losses). 2026 brackets reflect inflation adjustments per IRS Revenue Procedure. State taxes vary; consult your state's tax authority for specific rates. Primary residence exclusions are subject to eligibility under Section 121. This calculator provides estimates for educational purposes only and does not constitute tax or financial advice. Consult a qualified tax professional or certified public accountant (CPA) for personalized guidance. Calculator updated January 2026.

Frequently Asked Questions

How do you calculate capital gains tax?

Capital Gain = Selling Price minus Cost Basis minus Expenses. Short-term gains (held ≤1 year) are taxed at ordinary income rates of 10–37%. Long-term gains (held >1 year) are taxed at 0% (income up to $49,450 single), 15% ($49,451–$545,500), or 20% (above $545,500). Add 3.8% NIIT if your MAGI exceeds $200,000 single or $250,000 married.

What is the difference between short-term and long-term capital gains?

Short-term gains apply to assets held 1 year or less and are taxed as ordinary income (10–37%). Long-term gains apply to assets held more than 1 year and qualify for preferential rates of 0%, 15%, or 20%. On a $50,000 gain, a taxpayer in the 22% ordinary bracket pays $11,000 short-term vs $7,500 long-term — a $3,500 difference from waiting one extra day past the one-year mark.

How can I legally reduce my capital gains tax?

Seven legal strategies: (1) Hold assets over 1 year for long-term rates. (2) Tax-loss harvest — sell losing positions to offset gains dollar-for-dollar. (3) Use 1031 like-kind exchanges for real estate to defer gains indefinitely. (4) Invest in Qualified Opportunity Zones. (5) Donate appreciated assets to charity — avoid the gain and get a deduction. (6) Use specific identification to sell highest-cost shares first. (7) Max out tax-advantaged accounts (401k, IRA) where gains aren't taxed.

How is cryptocurrency taxed as capital gains?

The IRS treats all cryptocurrency — Bitcoin, Ethereum, NFTs, altcoins — as property, not currency. Every sale, trade, crypto-to-crypto swap, or purchase using crypto is a taxable event. Short-term crypto gains (held ≤1 year) are taxed at ordinary rates up to 37%. Long-term crypto gains (held >1 year) qualify for 0%, 15%, or 20% rates. Mining income and staking rewards are taxed as ordinary income at receipt.

What is the capital gains tax on selling a house?

If you've owned and lived in your primary residence for at least 2 of the last 5 years, you can exclude $250,000 of gain (single filers) or $500,000 (married filing jointly) from federal capital gains tax. Gains above the exclusion are taxed at long-term capital gains rates. Investment properties and rental homes do not qualify. You can only use the primary residence exclusion once every 2 years.

What is NIIT and who owes the 3.8% tax?

The Net Investment Income Tax (NIIT) is an additional 3.8% federal tax on investment income including capital gains, dividends, and rental income. It applies when your Modified Adjusted Gross Income exceeds $200,000 for single filers or $250,000 for married filing jointly. These thresholds are not inflation-adjusted, so more investors hit NIIT each year. At the 20% long-term rate plus 3.8% NIIT, the effective top federal capital gains rate is 23.8%.

Which states have the highest capital gains tax in 2026?

Top state capital gains rates in 2026: California 13.3% (taxed as ordinary income), New York 10.9%, New Jersey 10.75%, Oregon 9.9%, Washington 9.9%, Minnesota 9.85%. States with zero capital gains tax: Florida, Texas, Nevada, Wyoming, South Dakota, and Tennessee. In 2026, Mississippi (4%), Nebraska (4.55%), North Carolina (3.99%), and Ohio (2.75%) all reduced rates. Always add state tax to your federal estimate for total liability.