Capital Gains Tax Estimator

Approximate US federal capital gains tax (long vs short term).

Open tool

Overview

A capital gains tax estimator approximates the US federal tax owed when an investor sells an asset for more than they paid for it. The Internal Revenue Code treats gains differently depending on how long the asset was held. Positions held one year or less generate short-term gains taxed at ordinary income rates; positions held more than one year generate long-term gains taxed at preferential rates of 0%, 15%, or 20% depending on taxable income.

This tool produces a rough estimate, not a tax return. It ignores state taxes, the Net Investment Income Tax (NIIT), wash-sale adjustments, the qualified small business stock exclusion, depreciation recapture on real estate, Section 1256 contracts, and any tax-loss carryforwards. The output is most useful for back-of-the-envelope planning — comparing a "sell now" versus "wait a few months for long-term treatment" scenario, for example.

How it works

The calculator computes gain as Sale Proceeds − Cost Basis − Selling Costs. Cost basis includes the original purchase price plus commissions and reinvested dividends. If holding period is one year or less, the gain is taxed at the user's marginal ordinary income rate. If it exceeds one year, the long-term schedule applies: 0% up to a threshold of taxable income, 15% in the middle band, and 20% above the upper threshold. The thresholds depend on filing status and shift slightly each year for inflation. Losses offset gains of the same character first, then up to $3,000 of ordinary income, with the remainder carried forward.

Examples

  • Bought 100 shares at $50 ($5,000 basis), sold 18 months later at $80 ($8,000), gain of $3,000. Filer in the 15% long-term bracket owes about $450 in federal capital gains tax.
  • Same trade but sold after only 10 months — short-term. At a 24% ordinary rate the tax is $720.
  • Bought a stock for $20,000 and sold it for $15,000 — a $5,000 loss. Offsets up to $3,000 of ordinary income this year, with $2,000 carried into next year.
  • Sold a long-held investment producing a $500,000 gain with $400,000 of other taxable income. The first portion falls in the 15% bracket and the upper portion crosses into the 20% bracket, producing tax in the high five figures.

FAQ

Does this include state tax?
No. States like California tax gains as ordinary income, which can add 13.3% on top.

What about the Net Investment Income Tax?
Higher earners pay an additional 3.8% NIIT on investment income, which the basic estimate does not include.

How are crypto sales treated?
For federal tax, the IRS treats crypto as property — same long-term/short-term framework as stocks.

Can losses reduce my taxes forever?
Capital losses carry forward indefinitely until used against future gains or the $3,000 annual ordinary income limit.

Should I rely on this number to plan a sale?
No. Verify with a tax professional, especially for material amounts, real estate, or multi-state situations.

Try Capital Gains Tax Estimator

An unhandled error has occurred. Reload ×