Capital Gains Tax Calculator (2026): Short-Term vs Long-Term, State Included

The difference between a 9-month sale and a 13-month sale of the same stock can be tens of thousands of dollars in tax — entirely due to the holding period crossing the long-term threshold. The same is true for home sales (the $250K/$500K exclusion makes selling at the wrong moment astronomically more expensive), inherited assets (basis step-up rules), and high-income earners (Net Investment Income Tax adds 3.8% you might not know about).
This guide explains how capital gains tax actually works in 2026, why short-term vs long-term matters more than people realize, and the best free capital gains tax calculators, tax software, and IRS resources — all linked below so you can run scenarios accurately and time your sales correctly.
Why short-term vs long-term changes everything
US federal tax law splits capital gains into two categories:
- Short-term (held one year or less): taxed at your ordinary income tax rate. For high earners, that’s 32–37% federal.
- Long-term (held more than one year): taxed at preferential rates of 0%, 15%, or 20% depending on income.
A $100,000 gain held 364 days vs 366 days, for a single filer earning $250K total income:
- Short-term: ~37% federal + state + NIIT = roughly 42–48% total = $42K–$48K of tax
- Long-term: 20% federal + state + NIIT = roughly 24–32% total = $24K–$32K of tax
The two-day delay saves you $15K–$20K. This is not a tax loophole; it’s the law operating as designed.
For real-estate investors, the math gets more complex because depreciation recapture (taxed at up to 25%) interacts with capital gains. For inheritors, the step-up in basis can eliminate decades of accumulated gain. For homeowners selling primary residences, the $250K/$500K exclusion can wipe out the tax bill entirely.
A calculator that handles all of these surfaces decisions you might otherwise miss.
What capital gains tax is and how brackets work in 2026
A capital gain is the profit from selling a capital asset (stocks, bonds, real estate, collectibles, crypto, business interests). It equals sale price minus cost basis (what you paid plus any improvements, fees, or adjustments).
The federal brackets in 2026:
Long-term capital gains (held > 1 year)
| Filing status | 0% rate up to | 15% rate up to | 20% rate above |
|---|---|---|---|
| Single | $48,350 | $533,400 | $533,400 |
| Married filing jointly | $96,700 | $600,050 | $600,050 |
| Married filing separately | $48,350 | $300,025 | $300,025 |
| Head of household | $64,750 | $566,700 | $566,700 |
Note: these brackets are indexed annually for inflation; 2026 numbers shown are estimates based on projected adjustments.
Short-term capital gains
Short-term gains are taxed as ordinary income. The 2026 federal brackets:
| Single | Married filing jointly |
|---|---|
| 10% up to $11,925 | 10% up to $23,850 |
| 12% to $48,475 | 12% to $96,950 |
| 22% to $103,350 | 22% to $206,700 |
| 24% to $197,300 | 24% to $394,600 |
| 32% to $250,525 | 32% to $501,050 |
| 35% to $626,350 | 35% to $751,600 |
| 37% above | 37% above |
Net Investment Income Tax (NIIT)
An additional 3.8% tax on investment income for high earners:
- Single: MAGI > $200,000
- Married filing jointly: MAGI > $250,000
NIIT applies to the lesser of net investment income or the excess of MAGI over the threshold. In practice, most high earners with significant investment income pay it on most of their gains.
State capital gains tax
Most states tax capital gains as ordinary income. A few highlights:
- No state income tax (no CGT): Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington (mostly), Wyoming
- Highest state CGT: California (13.3% top), New York (10.9%), Hawaii (11%), New Jersey (10.75%), Oregon (9.9%), Minnesota (9.85%)
- Special: Washington has a 7% tax on long-term gains over $262K (excluding real estate, retirement accounts)
The calculator pulls your state’s current treatment automatically.
Tool usage guide with stock and home-sale examples
The calculator handles three asset classes plus generic gains. Here’s the flow.
Stock or fund example
Inputs:
- Purchase date: April 5, 2024
- Purchase price (basis): $50,000
- Sale date: June 12, 2025
- Sale price: $90,000
- Filing status: Single
- Other 2025 taxable income: $130,000
- State: California
Output:
- Holding period: 14 months (long-term ✓)
- Capital gain: $40,000
- Federal LT rate: 15% (single, total income falls in the 15% LTCG bracket)
- Federal tax: $6,000
- NIIT (income $170K, under $200K threshold): $0
- California tax (13.3% top, but their income lands in 9.3%): $3,720
- Total tax: $9,720 (24.3% effective)
If the same sale had been on April 4, 2025 (less than a year), it would be short-term:
- Federal ordinary rate at marginal income: 24%
- Federal tax: $9,600
- California tax: $3,720
- Total tax: $13,320 (33.3% effective)
Cost of selling 60 days too early: $3,600.
Home sale example
Inputs:
- Purchase date: March 2018
- Purchase price (basis): $400,000 (including $20K of improvements + closing costs)
- Sale date: April 2026
- Sale price: $750,000 (after agent fees and closing)
- Filing status: Married filing jointly
- Primary residence: Yes (lived in for full 8 years)
- State: Texas
Output:
- Gross gain: $350,000
- Section 121 exclusion (MFJ): $500,000 (covers full gain)
- Taxable gain: $0
- Federal tax: $0
- Texas tax: $0 (no state income tax)
- Total tax: $0
If the same sale was on a vacation home (not primary residence), no exclusion would apply:
- Taxable gain: $350,000
- Federal LT rate: ~15–20% depending on total income
- Texas tax: $0
- Estimated total tax: $52,000–$70,000
Inherited stock example
Inputs:
- Original purchase by deceased: 1995, $20,000 basis
- Stepped-up basis at death: $200,000 (March 2024 value)
- Sale by heir: $230,000 in May 2026
- Heir’s filing status: Single, $80K other income
- State: Florida
Output:
- Capital gain (using stepped-up basis): $30,000
- Holding period: long-term (heirs always long-term regardless of holding time)
- Federal LT rate: 15%
- Federal tax: $4,500
- Florida tax: $0
- Total tax: $4,500
If basis weren’t stepped up: $210,000 of gain → $42,000+ federal tax. The step-up saves the heir $37,500.
Benefits: tax-loss harvesting decisions, sale timing
Three practical benefits surface when you can quickly model gains:
1. Tax-loss harvesting
If you have $30K in unrealized gains and $20K in unrealized losses elsewhere, selling both produces a net $10K gain — taxed at low rates. Without harvesting, the $30K gain stands alone with full tax. The calculator’s “Net gain calculator” runs both legs.
Watch the wash-sale rule: you can’t repurchase the same or substantially identical security within 30 days before or after the loss sale.
2. Sale timing
Holding period crossings produce sharp tax differences. Crossing from short-term to long-term often produces 10–15 percentage points of savings. The calculator highlights when you’re approaching the threshold.
3. Bunching realizations
If you’ll have a low-income year (sabbatical, retirement transition, business loss), realizing more gains that year may push them into the 0% LTCG bracket. The calculator’s multi-year mode shows the optimal allocation.
Use cases: stocks, home sale, inherited assets, ESPP/RSUs
Selling stocks
The most common use. The tool handles individual stocks, ETFs, mutual funds, and crypto identically — they’re all capital assets to the IRS.
Selling a home
The Section 121 exclusion is the most valuable tax break in personal finance. To qualify: you must have owned the home for at least 2 of the last 5 years AND lived in it as your primary residence for at least 2 of the last 5 years. Partial exclusion possible for some hardships (job change, health, unforeseen circumstances).
Inherited assets (stepped-up basis)
When you inherit assets, the basis is “stepped up” to the value at the date of death (or alternative valuation date 6 months later). All prior accumulated gains are erased for tax purposes. Critical to know before selling.
ESPP (Employee Stock Purchase Plan)
ESPP shares have a holding period component for “qualifying” vs “disqualifying” disposition. Qualifying: held 2 years from grant + 1 year from purchase = lower tax. Disqualifying: shorter holding = higher tax. The calculator’s ESPP mode applies the right treatment.
RSU (Restricted Stock Units)
RSUs are taxed as ordinary income at vesting (employer withholds). Subsequent gains/losses from the vest price are capital gains. The calculator handles the post-vest holding period.
1031 exchanges (real estate investors)
Sell investment property and roll proceeds into a like-kind property within 180 days = defer capital gains. The calculator’s 1031 mode shows the deferral and what would happen on a future direct sale.
Collectibles
Gold, art, coins, wine — taxed at a maximum 28% LT rate (different from regular LT), plus state tax. The calculator handles collectibles with the right rate.
Cryptocurrency
Same rules as stocks. Each sale is a separate gain/loss event. The calculator handles crypto for reporting; for traders with hundreds of transactions, dedicated crypto-tax tools (CoinTracker, Koinly) are needed for the underlying ledger work.
State-by-state differences (CA, NY, TX, FL, WA)
States vary widely:
California
Top rate 13.3%. No preferential treatment for capital gains — all taxed as ordinary income. High earners selling significant gains in CA face combined federal + state tax pushing 35–37%.
New York
Top rate 10.9%. NYC residents face additional NYC tax of up to 3.876%, totaling 14.8%+. New York treats CG as ordinary income.
Texas
No state income tax. State-level CG tax: 0%. Federal-only.
Florida
No state income tax. State-level CG tax: 0%. Major reason for high-net-worth migration.
Washington
7% tax on long-term gains over $262,000 (excluding real estate sales, retirement accounts). The first $262K of long-term gain is tax-free at the state level. Mid-range earners often pay $0 in state CGT.
Other notable states
Tennessee and New Hampshire: no income tax on wages but may tax investment income (NH’s interest/dividend tax phases out by 2027; TN no state tax at all).
Net Investment Income Tax (NIIT) explained
NIIT is a 3.8% additional tax that high earners often miss until tax season. It applies to:
- Interest, dividends, royalties
- Capital gains (short-term and long-term)
- Rental income (passive)
- Income from passive partnerships and S-corps
The tax kicks in at MAGI thresholds:
- Single: $200,000
- Married filing jointly: $250,000
- Married filing separately: $125,000
The 3.8% applies to the smaller of your net investment income or MAGI excess over the threshold. Example: single filer with $300K MAGI ($150K wages + $150K capital gains). MAGI excess = $100K. Net investment income = $150K. NIIT = 3.8% of $100K = $3,800.
The calculator applies NIIT automatically when your inputs cross the threshold.
Pro tips
Hold positions to long-term. When you’re 30 days away from the long-term threshold and tempted to sell, wait. The tax savings almost always exceed any market move risk over 30 days.
Harvest losses in down years. Carrying capital losses forward to offset future gains is one of the most underused tools in personal finance. Up to $3,000/year of net loss can offset ordinary income; excess carries forward indefinitely.
Use specific identification for stock lots. When you sell a partial position, you can choose which lots to sell (high-basis to minimize gain, or low-basis if you want to harvest gain in a low-income year). FIFO is the default; specific ID requires explicit instruction to your broker.
Time large gains around income changes. Selling between jobs, after retirement, during sabbatical, or in a low-bonus year often pushes gains into lower brackets.
Donate appreciated stock instead of cash. Donate stock held >1 year directly to charity → you get the full FMV deduction AND avoid the gain. Better than selling and donating proceeds.
Use Qualified Opportunity Zones for big gains. Reinvesting capital gains into a QOZ within 180 days defers the tax until 2026 (under the original program). Some current proposals extend or modify; check current law.
Don’t forget basis adjustments. Improvements to real estate increase basis. Stock split adjustments. ESPP discount adjustments. Wash sale loss disallowance basis additions. Track them.
Plan around state moves. Establishing residency in a no-state-tax state (FL, TX, WA, etc.) before realizing a large gain can save 5–13% of the gain. The “before” matters; you can’t move after the sale and avoid the tax.
Best capital gains calculators and tax tools (2026)
For pre-sale modeling, several free calculators are accurate. For actual tax filing, use full-featured tax software that handles Form 8949 and Schedule D automatically.
Free capital gains tax calculators
- SmartAsset Capital Gains Tax Calculator — Strong UX with state inclusion.
- NerdWallet Capital Gains Tax Calculator — Quick estimates with educational context.
- H&R Block Capital Gains Tax Calculator — Free estimate, optional integration with H&R Block filing.
- Bankrate Capital Gains Calculator — Includes home-sale exclusion modeling.
- Investor.gov Compound Interest + Capital Gains — Free calculators from the SEC.
Best tax software for capital gains filing
- TurboTax Premier — Most comprehensive for investors; imports brokerage 1099-B automatically.
- H&R Block Premium — TurboTax alternative; can be cheaper.
- TaxAct Premier — Good middle-ground option.
- FreeTaxUSA — Federal filing free including investments; $14.99 state.
- Cash App Taxes (formerly Credit Karma Tax) — Completely free federal + state.
- TaxSlayer — Affordable alternative with good investor coverage.
Crypto capital gains tax tools
- CoinTracker — Most popular crypto-tax aggregator; integrates with TurboTax.
- Koinly — International support; multi-exchange coverage.
- CoinLedger (formerly CryptoTrader.Tax) — Simple, fast crypto tax reports.
- ZenLedger — Strong DeFi support.
- TokenTax — Has CPAs on staff for complex crypto situations.
Real-estate capital gains specialists
- Realized 1031 — Specializes in 1031 exchanges.
- 1031 Crowdfunding — DST and 1031 exchange platform.
- IRS Section 121 Guidance — Official home-sale exclusion rules.
Official US tax resources
- IRS Topic 409 — Capital Gains and Losses — Official IRS overview.
- IRS Schedule D Instructions — Official filing instructions.
- IRS Form 8949 — Sales and dispositions reporting.
- Tax Foundation — State Capital Gains Tax Rates — Annual state-by-state comparison.
Tax-loss harvesting tools
- Wealthfront Tax-Loss Harvesting — Automated, included with managed accounts.
- Betterment Tax-Loss Harvesting+ — Similar offering.
- Schwab Personalized Indexing — Direct-indexing tax-loss harvesting.
Frequently asked questions
What is the long-term capital gains tax rate in 2026?
For US federal tax in 2026, long-term capital gains are taxed at 0%, 15%, or 20% depending on taxable income. Single filers: 0% up to ~$48,350, 15% from there to ~$533,400, 20% above. Married filing jointly: 0% up to ~$96,700, 15% to ~$600,050, 20% above. NIIT adds 3.8% if your modified AGI exceeds $200K single / $250K MFJ.
How do I avoid capital gains tax on a home sale?
The Section 121 home-sale exclusion lets you exclude up to $250,000 of gain ($500,000 for MFJ) on the sale of your primary residence if you owned and lived in it for at least 2 of the last 5 years.
Does the calculator include state tax?
Yes. The calculator covers all 50 states plus DC.
How are crypto gains taxed (reporting purposes only)?
Crypto is treated as property by the IRS, so capital gains rules apply just like stocks.
What’s a wash sale?
Selling a security at a loss and buying the same or “substantially identical” security within 30 days before or after. The loss is disallowed and added to the basis of the replacement security. Wash sale rules apply to stocks; the IRS has issued guidance suggesting they may apply to crypto going forward but enforcement is uncertain.
How do I report capital gains?
Schedule D and Form 8949 in the US. Most brokers (Fidelity, Schwab, Vanguard, Robinhood) provide consolidated 1099-B forms with all the data you need. Crypto exchanges’ reporting has been improving but is still inconsistent — keep your own records.
What if I had a capital loss?
You can offset capital gains with capital losses in the same year. Net loss can offset up to $3,000 of ordinary income per year; excess carries forward indefinitely. Long-term losses must first offset long-term gains, short-term first against short-term, then they cross over.
Are gains from selling a business taxable?
Yes, generally as capital gains. Some specific provisions: Section 1202 (Qualified Small Business Stock) can exclude up to $10M or 10× basis in qualifying small-business stock held 5+ years. Section 1244 ordinary loss treatment for small-business stock losses. Speak with a tax pro for sale of a business — the structure (asset vs stock sale, allocation of purchase price) significantly impacts taxes.
Capital gains math is full of sharp edges — holding periods, brackets, NIIT, exclusions, basis adjustments. Run the calculator before you sell, time the realization correctly, and keep more of the gain.