Capital Gains Tax Calculator

Estimate your capital gains tax before you sell.

Calculate your 2024 federal capital gains tax on any stock or investment sale. Includes long-term and short-term rates, the 3.8% Net Investment Income Tax, and optional state tax. See your exact net profit after all taxes.

Your sale

$
$
Cost basis: $5,000 · Proceeds: $12,000
Held > 1 year — qualifies for preferential long-term rates (0%, 15%, 20%)
$
Excluding this gain — used to determine your tax bracket
%
CA: 13.3% · NY: 10.9% · TX/FL: 0% · Leave blank to show federal only
Total Capital Gain$7,000
Total Tax Owed$1,050
Net Profit After Tax$5,950
Effective total rate15.0%
Federal rate15% LTCG
Where your money goes
// WHAT IS CAPITAL GAINS TAX

The tax you owe when an investment pays off.

A capital gain is the profit you make when you sell an investment for more than you paid for it. The IRS taxes that profit — but at very different rates depending on one factor: how long you held the asset. Hold for more than one year and you qualify for long-term capital gains rates of 0%, 15%, or 20%. Sell within a year and the profit is taxed as ordinary income, the same rate as your salary — up to 37% in 2024.

Your tax bracket is determined by your total taxable income including the gain. Your ordinary income fills the brackets first, and the capital gain is stacked on top. This means a $50,000 gain on top of a $100,000 salary is taxed differently than the same gain on top of a $40,000 salary. Income matters as much as the gain itself.

High-income investors face an additional layer: the Net Investment Income Tax (NIIT) adds 3.8% on top of the regular rate once your income exceeds $200,000 as a single filer or $250,000 married filing jointly. Combined with the top 20% long-term rate, the maximum effective federal rate on long-term gains is 23.8% — before any state tax. This calculator shows your complete picture.

0%
Minimum long-term capital gains rate
For single filers with income up to $47,025 in 2024
23.8%
Maximum federal rate on long-term gains
20% LTCG rate plus 3.8% NIIT for high-income investors
1 year
The holding period that changes everything
One extra day past 12 months can cut your tax rate in half
// HOW IT WORKS

2024 capital gains tax rates.

Long-Term Capital Gains — 2024 Brackets
Tax Rate0%
Single≤ $47,025
Married Joint≤ $94,050
Head of Household≤ $63,000
Tax Rate15%
Single≤ $518,900
Married Joint≤ $583,750
Head of Household≤ $551,350
Tax Rate20%
Single> $518,900
Married Joint> $583,750
Head of Household> $551,350
Tax Filing Rules & Details

Gains stack on top

Your ordinary income fills the brackets first. Capital gains are taxed starting from where your income leaves off — not from $0.

Short-term = income rate

Assets held 1 year or less are taxed at your ordinary income rate (10%–37%). No preferential treatment applies here.

NIIT: +3.8% Surcharge

High earners (>$200k single / $250k joint) owe an extra 3.8% on investment income to fund Medicare programs.

State tax is separate

Most states tax gains as ordinary income. California (13.3%) and New York (10.9%) are highest; others have none.

This calculator estimates federal tax only unless you enter a state rate. It does not account for AMT, qualified opportunity zones, installment sales, or wash sale rules. Consult a tax professional before making final decisions.

// FAQ

Common questions.

// STAY UPDATED

Get notified when new tools drop.

Monthly tool updates, finance insights, no spam.

No spam. Unsubscribe anytime.