Introduction
When you sell something for more than you paid, the profit is called a capital gain. The IRS taxes that gain. This capital gains tax calculator shows you how much tax you may owe and how much cash you keep.
Enter what you paid, what you sold it for, your selling costs, and your income. The calculator then figures your federal tax, state tax, the 3.8% Net Investment Income Tax, and depreciation recapture if you sold a rental. It works for stocks, crypto, real estate, collectibles, and business assets. If you only need the raw profit before tax, the simpler Capital Gains Calculator and the Stock Profit Calculator handle that first step.
Time matters a lot. If you held the asset less than one year, your gain is short-term and taxed at your normal income rate. If you held it one year or more, it is long-term and taxed at 0%, 15%, or 20%. The tool compares both side by side, so you can see what waiting could save you. To see which ordinary bracket a short-term gain lands in, pair this with the Tax Bracket Calculator.
You also get a full tax breakdown, a step-by-step math solution, and a waterfall that tracks your sale price down to net cash in hand. Sold your main home? The calculator applies the Section 121 exclusion of up to $250,000, or $500,000 if you file jointly, and the Home Sale Calculator can walk through the closing side of that deal. All numbers use 2025 IRS brackets and are estimates, not tax advice.
How to use our Capital Gains Tax Calculator
Enter what you bought, what you sold it for, how long you owned it, and where you live. The calculator shows your estimated capital gains tax, your federal, state, local and recapture tax breakdown, your net cash after the sale, and a short-term vs. long-term comparison.
Asset Type: Pick what you sold, such as stocks, crypto, a rental property, your home, collectibles, or business assets. This choice sets the tax rules used. For digital assets, the Crypto Tax Calculator and Crypto Profit Calculator go deeper on coin-by-coin lots.
Section 121 Home Sale Exclusion: This box shows only for a primary residence. Check it if you lived in the home at least 2 of the last 5 years. It removes up to $250,000 of gain ($500,000 if married filing jointly).
Original Purchase Price: Type what you first paid for the asset.
Capital Improvements: Add money spent on upgrades that raise value, like a new roof or an addition. Do not count repairs.
Depreciation Taken: Enter the total depreciation you wrote off over the years. This matters most for rental property, since it gets taxed back at up to 25%. If you are not sure of the total, rebuild it with the Depreciation Calculator.
Sale Price: Type the full amount you sold the asset for, before any costs.
Selling Expenses: Add agent commissions, closing costs, and legal fees tied to the sale. The Closing Cost Calculator helps you estimate these if the sale has not closed yet.
Outstanding Loan / Mortgage Balance: Enter the loan amount paid off at closing. This is used to find your net cash in hand, not your tax. Check your current payoff figure with the Mortgage Payoff Calculator or the Home Equity Calculator.
How long did you own it: Choose less than one year (short-term) or one year or more (long-term). This has the biggest effect on your rate.
Filing Status: Pick single, married filing jointly, married filing separately, head of household, or qualifying widow(er). This sets your brackets and deduction.
Estimated Annual Taxable Income: Enter your other income for the year, like wages or business income, before this sale. The Taxable Income Calculator and AGI Calculator can help you pin down that figure.
State / Location: Choose your state. The calculator fills in a state rate for you. For a fuller picture of your state bill, see the State Tax Calculator or, for high-rate states, the California Tax Calculator.
State Capital Gains Tax Rate: Keep the filled-in rate or type your own if you know it.
Local / City Tax Rate: Add a city rate if your city taxes income, like New York City. Leave it at 0 if not. The NYC Paycheck Calculator shows how those local rates work.
401(k) / 403(b) Contributions: In the Advanced panel, enter pre-tax retirement contributions. These lower the income used for your bracket. See the 401k Calculator or 403b Calculator to plan those amounts.
IRA Contributions: Enter deductible traditional IRA contributions only. The IRA Calculator covers contribution limits and growth.
Itemized Deductions: Enter your itemized total. If it is smaller than the standard deduction, the standard one is used.
Number of Dependents: Enter how many dependents you claim. This does not change capital gains rates and is shown for context.
Click Calculate to see your results, or Reset to start over.
What Is Capital Gains Tax?
A capital gain is the profit you make when you sell something for more than you paid for it. This can be stocks, crypto, a rental house, land, art, or a business. The tax you pay on that profit is called capital gains tax. If you sell for less than you paid, you have a capital loss, and you owe no tax on that sale.
How Your Gain Is Figured
Your gain is not just the sale price minus the purchase price. The IRS uses your adjusted cost basis:
- Start with what you paid for the asset.
- Add capital improvements, like a new roof or an addition. Normal repairs do not count.
- Subtract any depreciation you wrote off on a rental or business property.
Then take your sale price, subtract that basis, and subtract selling costs like agent fees and closing costs. What is left is your gain. If you bought shares over time at different prices, the Stock Average Calculator is a quick way to find your blended cost.
Short-Term vs. Long-Term
How long you owned the asset matters more than anything else:
- Short-term (held under 1 year): taxed like your paycheck, at ordinary rates from 10% up to 37%. The Income Tax Calculator shows how those rates stack.
- Long-term (held 1 year or more): taxed at lower rates of 0%, 15%, or 20%, based on your income and filing status.
Waiting past the one-year mark can save you thousands of dollars on the same profit. To see what the tax actually costs you as a share of your total income, try the Effective Tax Rate Calculator.
Extra Taxes That Can Apply
- Depreciation recapture: if you claimed depreciation on a rental, that part of your gain is taxed at up to 25%. The Rental Property Calculator and Cap Rate Calculator help you weigh selling versus holding.
- Net Investment Income Tax (NIIT): a 3.8% surtax once your income passes $200,000 (single) or $250,000 (married filing jointly). Check the threshold with the MAGI Calculator.
- Collectibles: art, coins, and similar items have a higher long-term cap of 28%. For metals, the Gold Price Calculator and Silver Calculator help value what you sold.
- State and local tax: some states, like Florida and Texas, charge nothing. Others, like California, tax gains as regular income. A few cities add their own tax on top.
The Home Sale Break
If you sell your main home and lived in it at least 2 of the last 5 years, you can exclude up to $250,000 of gain if single, or $500,000 if married filing jointly. This is the Section 121 exclusion. Depreciation you claimed on the home cannot be excluded. If you are deciding whether to sell or stay put, the Rent vs Buy Calculator and Property Tax Calculator add useful context.
Ways to Lower the Tax
- Hold assets at least one year before selling.
- Sell in a year when your income is lower, such as an early retirement year — model it with the Retirement Calculator.
- Use losses on other sales to cancel out gains. This is called tax-loss harvesting.
- Keep receipts for improvements, since they raise your basis and cut your gain.
- For rentals, ask a tax pro about a 1031 exchange, which can delay the tax.
- Shift future growth into tax-sheltered accounts using the Roth IRA Calculator or HSA Calculator.
Losses that are bigger than your gains can cut up to $3,000 of your regular income each year ($1,500 if married filing separately). Anything left over carries into future years. Once you know your tax, the Investment Calculator can project what the after-tax proceeds might grow into.
These results are estimates for planning only. Tax law is complex, so check with a CPA or tax advisor before you file. For your overall bill, including wages and other income, see the Tax Calculator or the Tax Refund Calculator.