Skip to main content

Capital Gains Tax Calculator — Short vs Long Term Federal Estimate

Capital gains tax calculator for short vs long term US federal estimates on asset sales. Try free—no signup.

Last updated 2026-05-28 · Davi Baptista

Read also: Full calculator guide, US tax & equity compensation guide, Crypto capital gains tax calculator

How it works

A capital gains tax calculator estimates US federal tax on an asset sale using basis, proceeds, and whether the gain is short- or long-term.

This capital gains tax calculator estimates US federal tax on asset sales using purchase basis, sale proceeds, and holding period. A capital gains tax calculator should separate short-term ordinary rates from long-term preferential rates on stocks, real estate, or business assets. Enter basis, sale price, improvements, and holding months for capital gains tax calculator outputs before year-end planning. Capital gains tax calculator results are educational—state tax, NIIT, and installment sales need professional review. Pair the capital gains tax calculator with our US tax planning guide for equity comp and crypto context.

US capital gains: short vs long term

Capital gains tax depends on holding period and taxable income. Short-term gains on assets held one year or less generally follow ordinary federal brackets; long-term gains often use 0%, 15%, or 20% rates.

Cost basis includes purchase price plus buy-side fees. RSU sales use vest FMV as basis—not zero—so plan vest ordinary income separately from post-vest appreciation.

Loss harvesting can offset gains; wash-sale rules apply to securities. Pair this calculator with crypto and RSU tools if your sale spans multiple asset types.

Guide, examples, and methodology

Capital gains tax calculator

Estimate US federal tax on asset sales using proceeds, adjusted basis, and holding period. Short-term gains generally follow ordinary brackets; long-term may qualify for preferential rates.

Long term capital gains calculator

State tax, NIIT, and loss harvesting are not fully modeled—confirm with a CPA for large sales.

How to use this capital gains tax calculator

Enter sale proceeds, cost basis (purchase price plus buy-side fees), and holding period. Short-term gains (held one year or less) generally follow ordinary federal income brackets; long-term gains often use preferential rates of 0%, 15%, or 20% depending on taxable income. State tax, Net Investment Income Tax (NIIT), and loss carryforwards are not fully modeled—use results as a planning estimate.

Example (USD)

ScenarioProceedsBasisGain type
Stock held 18 months$25,000$14,000Long-term $11,000
Crypto held 8 months$8,000$6,200Short-term $1,800
ETF lot sale$42,000$38,500Long-term $3,500

Short-term vs long-term holding period

The IRS counts from the day after purchase through the sale date. Selling at 366 days can change treatment versus 364 days. For RSU shares, basis for a later sale is usually FMV included in W-2 at vest—not zero—so immediate sales after vest often show small capital gain or loss, not the full sale amount.

Loss harvesting and wash sales

Capital losses offset gains in the same tax year; excess losses deduct up to $3,000 of ordinary income annually with carryforward. Tax-loss harvesting in stocks triggers wash-sale rules if you repurchase a substantially identical security within 30 days. Crypto wash-sale rules depend on current legislation—confirm before year-end trades for tax optics only.

Home sale exclusion (overview)

Primary residence sales may exclude up to $250,000 ($500,000 married filing jointly) of gain if ownership and use tests are met. This calculator focuses on securities and general assets—not the full home-sale worksheet.

Common mistakes

Related tools

For crypto disposals, use the crypto capital gains calculator. For equity comp, pair with RSU and ISO/AMT calculators before a large sale in the same year as vest or exercise.

Related calculators in this topic

Frequently asked questions

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

Short-term capital gains apply to assets held for one year or less, taxed at your ordinary marginal income tax rate. Long-term capital gains apply to assets held for over a year and are taxed at much lower preferential rates (0%, 15%, or 20% in the US).

Can I offset capital gains tax with past investment losses?

Yes. Under most tax jurisdictions (like the US IRS), capital losses can be used to net out capital gains realized in the same tax year. Unlimited losses can carry forward to subsequent tax years subject to local limits.

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

Short-term usually means held one year or less (taxed like ordinary income in the U.S.). Long-term often gets lower rates when held more than a year — rules vary by country.

How do I reduce capital gains tax legally?

Tax-loss harvesting, holding longer for long-term rates, maximizing basis (document improvements), and using tax-advantaged accounts where allowed.