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.
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.
Your ordinary income fills the brackets first. Capital gains are taxed starting from where your income leaves off — not from $0.
Assets held 1 year or less are taxed at your ordinary income rate (10%–37%). No preferential treatment applies here.
High earners (>$200k single / $250k joint) owe an extra 3.8% on investment income to fund Medicare programs.
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.
Monthly tool updates, finance insights, no spam.