The Capital Gains Tax Calculator is a free browser-based tool that estimates the US federal tax on a single investment sale and shows how much of the profit survives it. The gap it exists to expose is the holding period: a position sold inside a year is taxed at your ordinary income rate, while the same profit held past a year qualifies for the preferential long-term rates of 0%, 15%, or 20%. Enter what you paid, what you sold for, how long you held it, your other income, and your filing status, and the tool returns the gain, the tax, the rate applied, and the net profit.
What people use it for
Deciding whether to wait out the one-year mark
An investor holding a position at a $5,000 profit is eleven months in and tempted to sell before the market turns. Running the same sale as short-term and then as long-term puts a dollar value on waiting four more weeks, which is usually a far larger number than people expect from what looks like a calendar technicality rather than a tax decision.
Selling into a deliberately low-income year
Someone between jobs with modest income for the year checks whether a long-held position falls inside the 0% long-term band. At $30,000 of ordinary income the tool returns zero federal tax on a long-term gain, which turns an unplanned sabbatical into a deliberate window for realising appreciation that would be taxed in any normal year.
Sizing a sale that has to fund a house deposit
A buyer needs $60,000 in cash and plans to liquidate part of a brokerage account to get it. Working backwards from the net profit figure shows how much actually has to be sold to clear $60,000 after tax, rather than discovering the shortfall when the transfer lands and the completion date has already been agreed.
Checking a bonus-driven change of band
A large bonus pushes ordinary income into a higher range, and the long-term rate applied to an entirely unrelated stock sale moves from 15% to 20%. Entering the higher ordinary income exposes the interaction, which is easy to miss because the bonus and the share sale look like independent events with nothing to do with each other.
Worked examples
Input: Bought $10,000, sold $15,000, long-term, ordinary income $50,000, single
Result: Capital gain $5,000, tax rate 15.0%, federal tax $750, net profit $4,250, return on investment 50.0%. At $50,000 of ordinary income a single filer sits in the middle long-term band, so the profit is taxed well below the ordinary rate.
Input: The same $5,000 gain sold short-term, ordinary income $50,000, single
Result: Federal tax $1,100 at an effective rate of 22.0%, leaving $3,900. The gain stacks on top of ordinary income and falls entirely in the 22% bracket, so holding past the one-year mark would have been worth $350 on this trade alone.
Input: Bought $8,000, sold $13,000, long-term, ordinary income $30,000, single
Result: Capital gain $5,000, tax rate 0.0%, federal tax $0, net profit $5,000, return on investment 62.5%. The identical profit costs nothing federally because the ordinary income sits inside the 0% long-term band for a single filer.
Written by Ahsan Mahmood. Last updated . This calculator runs entirely in your browser and produces estimates, not tax advice.