Capital Gains Tax Calculator
Estimate how much tax you'll owe when selling stocks, crypto, or real estate. See how holding your assets for over a year can drastically reduce your tax bill.
Asset Details
Stock, Crypto, or Real Estate
Tax Bracket Info
Your regular income determines your exact capital gains tax bracket.
Long-Term Advantage: Holding for over a year unlocks significantly lower capital gains rates (0%, 15%, or 20%).
Estimated Tax Owed
$2,250
Effective Tax Rate: 15.0%
Total Capital Gain
$15,000
Before Taxes
Net Profit
$12,750
In Your Pocket
What is Capital Gains Tax?
Whenever you sell a capital asset (like stocks, bonds, cryptocurrency, or real estate) for more than you paid for it, the profit you make is called a capital gain. The IRS requires you to pay taxes on this profit.
The amount of tax you owe depends heavily on one crucial factor: How long did you own the asset before selling it?
- Short-Term Gains: Assets held for 1 year or less. These are taxed at your standard ordinary income tax rate (up to 37%).
- Long-Term Gains: Assets held for more than 1 year. These are taxed at much lower, preferential rates (0%, 15%, or 20% depending on your income).
How to Use the Capital Gains Calculator

- Purchase Price (Cost Basis): Enter the total amount you originally paid for the asset, including any fees or commissions.
- Sale Price: Enter the total amount you sold the asset for, minus any selling fees.
- Asset Holding Period: Select whether you owned the asset for more than 1 year, or 1 year or less. This determines your tax bracket.
- Filing Status: Choose your IRS tax filing status (e.g., Single, Married Filing Jointly).
- Annual Taxable Income: Enter your estimated total income for the year from your job or business. This determines your exact capital gains tax rate.
The Capital Gains Formula
Calculating your estimated tax involves finding your net profit and then applying the correct tax rate bracket based on your income and holding period.
| Variable | Meaning |
|---|---|
| Sale Price | The final selling price minus commissions. |
| Purchase Price | Also known as the Cost Basis. What you initially paid. |
| Tax Rate | Determined by your holding period (Short vs Long) and your total taxable income bracket. |
Example Capital Gains Calculation
Let's look at the math for a single filer who makes $80,000 a year. They bought stocks for $10,000 and sold them years later for $25,000.
Step 1: Calculate Net Capital Gain
We find the pure profit by subtracting the initial investment from the final sale amount.
Step 2: Determine Tax Rate
Because they held the stock for more than one year, this is a Long-Term capital gain. For a Single filer making $80,000, the long-term capital gains tax bracket is 15%.
Step 3: Calculate Final Tax
Understanding Your Results
The estimated tax is the amount you will likely owe the IRS when tax season arrives. Note that if you are trading stocks on an app like Robinhood, they generally do not withhold capital gains taxes for you automatically. You are responsible for paying this out of pocket.
The One-Year Rule
If the investor in our example had sold their stock after only 11 months instead of holding it for over a year, their $15,000 profit would be taxed as ordinary income at 22%. They would owe $3,300 in taxes instead of $2,250. Simply waiting a few extra weeks to sell can save you thousands of dollars!
Important Limitations
This calculator estimates federal taxes based on standard tax brackets. It does not account for state capital gains taxes, which vary wildly (from 0% in states like Texas and Florida to 13.3% in California). Furthermore, high earners may be subject to the 3.8% Net Investment Income Tax (NIIT).
Common Capital Gains Mistakes
1. Forgetting to deduct capital losses
Always remember to offset your winning trades with your losing trades before calculating your final tax bill. This is essential for day traders and crypto investors.
2. Selling immediately for a quick profit
Day trading guarantees you will pay the absolute highest tax rates possible (short-term ordinary income). Buy-and-hold investing utilizes the long-term tax rates, which are significantly lower.
3. Not tracking cost basis correctly
If you bought Bitcoin in 10 different transactions over 3 years, tracking your exact "purchase price" when you sell a fraction of a coin can be a nightmare. Use tax software to track your cost basis automatically.
Frequently Asked Questions
What is the difference between short-term and long-term capital gains?
Short-term capital gains apply to assets held for one year or less. These profits are taxed at your ordinary income tax rate. Long-term capital gains apply to assets held for more than one year, and benefit from much lower tax rates (usually 0%, 15%, or 20%).
Do I have to pay capital gains tax if I don't sell the asset?
No. You only realize a capital gain (and owe tax on it) when you actually sell the asset for a profit. If your stocks go up in value but you hold onto them, you do not owe taxes on those 'unrealized' gains.
Can I offset my gains with losses?
Yes. This strategy is called tax-loss harvesting. If you sell one stock for a $5,000 profit, but sell another for a $2,000 loss, you only pay capital gains tax on the net $3,000 profit. You can also use up to $3,000 of excess losses to offset ordinary income.
Does this calculator apply to real estate?
Yes, but with caveats. If you sell your primary residence, you may qualify for the Section 121 exclusion, which allows you to exclude up to $250,000 (single) or $500,000 (married) of capital gains from taxes, provided you lived in the home for 2 of the last 5 years.
Related Calculators
Author / Reviewer: Anmol Giri
Last updated: August 2026