Capital Gains Tax Calculator
Calculate capital gains tax owed on stocks, cryptocurrency, and real estate sales, comparing short-term (ordinary income) vs.
What this calculator does
The Capital Gains Tax Calculator estimates your result instantly from the values you enter, using standard taxes & income formulas. Calculate capital gains tax owed on stocks, cryptocurrency, and real estate sales, comparing short-term (ordinary income) vs. Calculations run in your browser, so nothing you type is sent to a server, and the output is an estimate for planning rather than financial advice.
About Capital Gains Tax Calculator
The Capital Gains Tax Calculator computes federal and state capital gains taxes on asset sales, distinguishing between short-term gains (held ≤ 1 year, taxed as ordinary income) and preferential long-term gains (held > 1 year, taxed at 0%, 15%, or 20%), plus the 3.8% Net Investment Income Tax (NIIT).
Formula & Mathematical Calculation
Capital Gain ($) = Selling Price - Purchase Price (Cost Basis) - Transaction Fees
Long-Term Federal Tax = Capital Gain × Long-Term Bracket Rate (0%, 15%, or 20%) + NIIT (3.8% if applicable)
Calculation Example
$40,000 Profit on Stock ($60k Sale - $20k Cost Basis, Single Filer, $90k Income): Short-Term (Held 8 mos @ 22% tax) = $8,800 Tax. Long-Term (Held 18 mos @ 15% tax) = $6,000 Tax (Holding over 1 year saves $2,800 in taxes!).
Key Benefits
- Differentiates short-term vs. preferential long-term capital gains tax rates
- Applies IRS long-term tax brackets (0%, 15%, 20%) based on taxable income
- Includes 3.8% Net Investment Income Tax (NIIT) for high earners
- Supports stocks, ETFs, crypto, precious metals, and real estate
- Essential year-end tax planning tool
How to Use this Calculator
-
Enter Purchase Price (Cost Basis) & Sale Price
Input original cost and final proceeds. -
Select Holding Period
Choose Short-Term (≤ 1 Year) or Long-Term (> 1 Year). -
Select Tax Filing Status & Annual Income
Input taxable income bracket to determine rate. -
Calculate Capital Gains Tax
Click Calculate to view federal and state tax liabilities.
Assumptions & Limitations
What the calculation assumes
- Every value you enter is treated as an exact, known amount.
- Rates and contributions are assumed to stay constant for the whole period unless the form asks for them separately.
- Results use standard financial formulas and ignore fees, penalties and promotional terms that are not entered above.
- Inflation, tax changes and market volatility are not modelled unless a field for them is provided.
- Amounts are unit-agnostic: results are returned in the same currency you enter.
What it does not cover
- Capital Gains Tax Calculator produces estimates for education and planning, not a quote, offer or professional advice.
- Real-world outcomes differ when fees, taxes, rounding rules or provider-specific terms apply.
- Local regulations and tax rules vary by country and change over time; verify current rules for your jurisdiction.
- Figures are only as accurate as the inputs you supply — check them before acting on the result.
- For decisions with lasting financial impact, confirm the numbers with a qualified professional.
Frequently Asked Questions
You May Also Need
Next step: browse the full Taxes & Income calculators or read the related guides for context before you decide.