Capital Gains Tax Calculator: Estimate Your Tax on Investment Gains for 2026

Calculate federal and state capital gains taxes on stocks, real estate, and other investments. Compare short-term vs. long-term rates.

Mathematical Audit

How Capital Gains Tax Is Calculated

Capital gains tax is applied to the profit from selling an asset. Rates differ based on holding period and income level.

Capital Gain = Sale Price − Purchase Price
Federal Tax = Capital Gain × Federal Tax Rate
State Tax = Capital Gain × State Tax Rate
NIIT = Capital Gain × 3.8% (if applicable)
Net Proceeds = Sale Price − Total Tax

Long-term capital gains (held > 1 year) are taxed at 0%, 15%, or 20% based on income. Short-term gains are taxed as ordinary income. The 3.8% NIIT applies to high earners above $200K (single) or $250K (married).

Operational Guide

How to Use the Capital Gains Tax Calculator

1

Enter purchase and sale prices

Use the total cost basis (including commissions) and total sale proceeds.

2

Select holding period

Long-term means held for more than one year; short-term is one year or less.

3

Choose your tax bracket

Select the long-term capital gains rate that applies to your income level.

4

Review tax breakdown

See federal tax, state tax, NIIT, and your net proceeds after all taxes.

Real-World Scenario Example

"An investor bought stock for $10,000 and sold it for $15,000 after 18 months, with a 15% federal rate and 5% state tax."

Inputs

purchasePrice:10000
salePrice:15000
holdingPeriod:long
taxBracket:15
stateTaxRate:5

Result

$5,000 capital gain. $750 federal tax + $250 state tax = $1,000 total. Net proceeds: $14,000.

Important Disclaimer

This calculator provides estimates for educational purposes. Tax laws are complex and vary by situation. Consult a qualified tax professional for personalized advice.