Roboculator
Online CalculatorsCategoriesDate & EventsNews
Get Started
Online CalculatorsCategoriesDate & EventsNewsGet Started
Roboculator

Smart calculators for every challenge. Free, fast, and private.

Categories

  • Finance
  • Health
  • Math
  • Construction
  • Conversion
  • Everyday Life

Popular Tools

  • Date & Events
  • Loan Calculator
  • BMI Calculator
  • Percentage Calc
  • Latest News
  • Search All

Resources

  • Glossary
  • Topic Tags
  • News & Insights

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy
  • Disclaimer
© 2026 Roboculator. All rights reserved.
Roboculator

roboculator.com

  1. Home
  2. /Finance
  3. /Tax Calculators
  4. /Capital Gains Tax Calculator

Capital Gains Tax Calculator

Calculator

Results

Gross Gain Before Selling Costs

$5,000.00

Taxable Capital Gain

$5,000.00

Federal Tax

$750.00

State Tax

$250.00

Total Tax

$1,000.00

After-Tax Cash From Sale

$14,000.00

After-Tax Profit

$4,000.00

Effective Tax Rate on Gain

2,000

%

After-Tax ROI

40

%

Results

Gross Gain Before Selling Costs

$5,000.00

Taxable Capital Gain

$5,000.00

Federal Tax

$750.00

State Tax

$250.00

Total Tax

$1,000.00

After-Tax Cash From Sale

$14,000.00

After-Tax Profit

$4,000.00

Effective Tax Rate on Gain

2,000

%

After-Tax ROI

40

%

The Capital Gains Tax Calculator estimates the tax you owe when you sell an investment, property, or other capital asset for a profit. Capital gains are classified as either short-term (assets held for one year or less, taxed as ordinary income) or long-term (held for more than one year, taxed at preferential rates of 0%, 15%, or 20%).

Understanding capital gains tax is essential for investment strategy. The distinction between short-term and long-term rates creates a powerful incentive to hold investments longer. For example, a single filer with $60,000 in other income who realizes a $5,000 gain pays $1,100 in tax (22% short-term) if held under a year, but only $750 (15% long-term) if held over a year — a 32% tax savings.

The 2024 long-term capital gains rates depend on your total taxable income including the gain: 0% for income up to $47,025 (single) or $89,250 (married filing jointly), 15% for income up to $518,900 (single) or $553,850 (married filing jointly), and 20% for income above those thresholds. High-income taxpayers may also owe the 3.8% Net Investment Income Tax (NIIT) on top of these rates.

This calculator also shows your net proceeds after tax and total return percentage, helping you evaluate whether selling now makes sense versus continuing to hold the investment. Common capital assets include stocks, bonds, mutual funds, real estate, and cryptocurrency.

Tax-smart strategies include tax-loss harvesting (selling losers to offset gains), timing sales to qualify for long-term rates, donating appreciated assets to charity, and using tax-advantaged accounts (IRA, 401(k)) where gains aren't immediately taxable.

Visual Analysis

How It Works

The calculation depends on holding period:

  • Short-term gains (≤ 1 year): Taxed at your ordinary income tax rate based on your tax bracket.
  • Long-term gains (> 1 year): Taxed at 0%, 15%, or 20% depending on total taxable income.

Capital Gain = Sale Price - Purchase Price. Tax = Gain × Applicable Rate. Net Proceeds = Sale Price - Tax. The calculator uses simplified brackets; actual calculations may involve stacking gains on top of ordinary income.

Understanding Your Results

If your tax rate shows 0%, your total income including the gain falls within the 0% long-term capital gains bracket — a significant tax benefit. At 15%, you're in the most common long-term rate. If you're close to a bracket boundary, consider spreading sales across multiple tax years.

Worked Examples

Stock Sale — Long Term

Inputs

purchase price10000
sale price15000
holding periodlong
taxable income60000
filing statussingle

Results

capital gain5000
tax rate15
tax owed750
net proceeds14250
total return42.5

Long-term gain of $5,000 taxed at 15% = $750 tax.

Short-Term Day Trade

Inputs

purchase price20000
sale price28000
holding periodshort
taxable income90000
filing statussingle

Results

capital gain8000
tax rate24
tax owed1920
net proceeds26080
total return30.4

Short-term gain of $8,000 taxed at 24% marginal rate.

Frequently Asked Questions

Short-term gains (assets held ≤ 1 year) are taxed as ordinary income at rates up to 37%. Long-term gains (held > 1 year) get preferential rates of 0%, 15%, or 20%. Holding investments longer can save significant taxes.

For single filers: 0% on income up to $47,025, 15% up to $518,900, and 20% above that. For married filing jointly: 0% up to $89,250, 15% up to $553,850, and 20% above.

Yes. Capital losses offset capital gains dollar-for-dollar. If losses exceed gains, you can deduct up to $3,000 of net losses against ordinary income per year, with excess losses carried forward.

Selling investments at a loss to offset capital gains. Be aware of the wash sale rule: you cannot repurchase a substantially identical security within 30 days before or after the sale.

Yes. The IRS treats cryptocurrency as property. Selling, trading, or using crypto triggers capital gains or losses, with the same short-term/long-term distinction as stocks.

High-income taxpayers with modified AGI above $200,000 (single) or $250,000 (married filing jointly) pay an additional 3.8% tax on investment income, including capital gains.

Cost basis is the original purchase price plus commissions, fees, and improvements. For stocks, consider methods like FIFO (first in, first out), specific identification, or average cost for mutual funds.

Yes. You can exclude up to $250,000 ($500,000 married filing jointly) of gain on the sale of your primary residence if you've lived in it for at least 2 of the last 5 years.

Most states tax capital gains as ordinary income. Some states (like California at 13.3%) have high rates. States with no income tax (TX, FL, etc.) don't tax capital gains.

Hold investments over a year for long-term rates, use tax-loss harvesting, contribute to tax-advantaged accounts, donate appreciated assets to charity, consider opportunity zone investments, and time sales strategically across tax years.

Sources & Methodology

IRS Topic 409 — Capital Gains and Losses (2024); IRS Publication 550 — Investment Income and Expenses; Tax Foundation — Capital Gains Tax Rates by State (2024)
R

Roboculator Team

The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.

How helpful was this calculator?

Be the first to rate!

Related Calculators

Income Tax Calculator

Tax Calculators

Salary Tax Calculator

Tax Calculators

Payroll Tax Calculator

Tax Calculators

Self-Employment Tax Calculator

Tax Calculators

Estimated Tax Calculator

Tax Calculators

Tax Bracket Calculator

Tax Calculators