Capital Gains Tax Calculator
Estimate the tax owed on a capital gain from an investment or asset sale.
These calculators are for informational purposes only and do not constitute financial, legal, or tax advice.
This calculator provides estimates for educational purposes only and should not be considered tax, legal, or financial advice. Tax laws change frequently. Consult a qualified tax professional.
Capital Gains Tax Calculator
Estimate your federal tax on an investment or asset sale based on your gain, holding period, and income.
Quick Answer
Capital gains tax generally starts with calculating the difference between an asset’s sale price and its purchase price (or adjusted basis). The applicable tax treatment then depends on how long you held the asset, your taxable income, your filing status, and current federal tax rules. Enter your purchase price, sale price, holding period, filing status, and other taxable income above to get an estimate.
Jump to:
How to Use|
What Is It|
How It Works|
Short vs Long-Term|
Tax Rates|
How to Calculate|
Holding Period|
Stocks|
Real Estate|
Crypto|
Gains & Losses|
Examples|
Cost Basis|
Factors|
Filing Status|
NIIT|
Reduce Tax|
vs Ordinary Income|
FAQs
How to Use|
What Is It|
How It Works|
Short vs Long-Term|
Tax Rates|
How to Calculate|
Holding Period|
Stocks|
Real Estate|
Crypto|
Gains & Losses|
Examples|
Cost Basis|
Factors|
Filing Status|
NIIT|
Reduce Tax|
vs Ordinary Income|
FAQs
Selling stock, a rental property, or cryptocurrency for more than you paid for it generally creates a capital gain – and the federal government wants a share of it. This calculator is built for anyone trying to get a handle on that bill before tax season arrives: investors selling a position, homeowners or landlords selling property, and everyday filers trying to understand why holding period matters so much.
You can estimate your potential federal capital gains tax by entering your purchase price, sale price, holding period, filing status, and other taxable income. The calculator uses those inputs to isolate the tax attributable specifically to the gain – not just a flat percentage applied blindly to the whole amount.
How to Use the Capital Gains Tax Calculator
1
Enter the purchase price – what you originally paid for the asset.
2
Enter the sale price – what you sold (or plan to sell) the asset for.
3
Select the holding period – short-term (one year or less) or long-term (more than one year).
4
Choose your filing status and enter your other taxable income (excluding this gain) – this determines which tax bracket the gain falls into.
5
Review the estimated capital gain, estimated tax, and net profit the calculator returns.
Note: The exact fields depend on the calculator’s current version. This tool currently supports Single, Married Filing Jointly, and Head of Household filing statuses; it does not include a Married Filing Separately option, a separate capital-losses field, or an asset-type selector, so stocks, real estate, and crypto are all estimated the same way, through a single purchase price, sale price, and holding period.
What Is Capital Gains Tax?
Capital gains tax is a federal tax on the profit from selling an asset for more than you paid for it. That profit is called a capital gain. If you sell for less than you paid, that’s a capital loss instead.
A gain only becomes taxable when it’s realized – meaning you actually sell or dispose of the asset. Before that point, an increase in value is an unrealized gain: your stock portfolio or home may have gone up in value on paper, but the IRS generally doesn’t tax that appreciation until you sell. This is why the sale itself is the triggering event, not simply owning an asset that’s grown in value.
Simple example: Someone buys an investment for $20,000 and later sells it for $30,000. The gross capital gain is $10,000, before considering applicable adjustments, losses, or other tax considerations that might apply to their specific situation.
How Capital Gains Tax Works
Capital Gain = Sale Proceeds − Adjusted Basis
The “adjusted basis” is usually close to the original purchase price, but it can differ depending on the asset and the circumstances – certain costs or adjustments can increase or decrease it (more on this in the Cost Basis section below).
Once you know the gain, the amount that’s actually taxed – and at what rate – depends on several things working together, not a single flat percentage:
• Whether you have capital losses that offset the gain
• How long you held the asset (holding period)
• Your filing status
• Your total taxable income
• The applicable federal tax rates for your situation
• Certain deductions or adjustments that may apply
It’s easy to oversimplify this into “just multiply the gain by a tax rate,” but that’s not how the brackets actually function – the rate that applies depends on where the gain falls once it’s added on top of your other income, which is exactly what the calculator above works out for you.
Short-Term vs. Long-Term Capital Gains
The one-year holding-period line is precise: assets held one year or less produce short-term gains; assets held for more than one year (365 days plus at least one day) produce long-term gains.
| Feature | Short-Term Capital Gains | Long-Term Capital Gains |
| Holding period | One year or less | More than one year |
| General federal tax treatment | Taxed as ordinary income | May qualify for preferential rates |
| Typical tax-rate framework | Ordinary federal income tax brackets | 0%, 15%, or 20% federal long-term brackets |
| Common examples | A stock flipped after a few weeks | A rental property held for several years |
In short, short-term gains are generally taxed as ordinary income – the same brackets that apply to your wages – while long-term gains may qualify for preferential federal capital gains rates, depending on the taxpayer’s income and filing status.
Capital Gains Tax Rates
For tax year 2026, the federal long-term capital gains rate structure uses three rates – 0%, 15%, and 20% – and which one applies depends on your taxable income and filing status, per IRS Revenue Procedure 2025-32:
| Filing Status | 0% Rate | 15% Rate | 20% Rate |
| Single | Up to $49,450 | $49,450 – $545,500 | Over $545,500 |
| Married Filing Jointly | Up to $98,900 | $98,900 – $613,700 | Over $613,700 |
| Married Filing Separately | Up to $49,450 | $49,450 – $306,850 | Over $306,850 |
| Head of Household | Up to $66,200 | $66,200 – $579,600 | Over $579,600 |
These thresholds apply to your total taxable income (ordinary income plus the long-term gain), not the gain viewed in isolation – which is why a gain can straddle more than one bracket. Short-term capital gains, by contrast, are generally taxed using the ordinary federal income tax brackets that apply to wages and other ordinary income, not this long-term table.
Note: These figures are specific to tax year 2026 and are adjusted annually for inflation. Always confirm current-year thresholds before filing, since they typically change each year.
How to Calculate Capital Gains Tax
Start with the gain itself: Purchase price $50,000, sale price $80,000, capital gain $30,000 ($80,000 − $50,000).
From there, the actual tax owed depends on:
• Whether the gain is short-term or long-term
• Your taxable income
• Your filing status
• Any capital losses you can apply against the gain
• Other applicable federal tax rules
Worked example (2026, illustrative): A single filer with $70,000 in other taxable income sells a long-term investment for a $30,000 gain. Stacked on top of their $70,000 income, the full $30,000 falls within the 15% long-term bracket ($49,450-$545,500 for Single filers in 2026). Estimated tax ≈ $30,000 × 15% = $4,500, leaving an estimated net profit of $25,500.
Multiplying the gain by a single rate works as a simplification only when the entire gain happens to fall within one bracket, as it does above. If a gain is large enough to straddle two brackets – say, part of it falls in the 15% band and part crosses into 20% – the calculation has to apply each rate to its respective portion, which is exactly what the calculator above automates for you.
How Holding Period Affects Capital Gains Tax
Holding period is one of the single biggest levers in how a sale gets taxed federally:
Held One Year or Less
The resulting short-term gain is generally taxed at ordinary federal income tax rates – the same brackets that apply to your salary or self-employment income. For many taxpayers, ordinary rates are higher than the long-term capital gains rates.
Held More Than One Year
The resulting long-term gain may qualify for the preferential 0%/15%/20% federal long-term capital gains rates discussed above, which are often – though not always – lower than ordinary income rates.
The distinction matters because the same dollar amount of gain can result in a meaningfully different tax bill depending purely on timing – which is part of why many investors pay close attention to purchase and sale dates before deciding when to sell.
Estimate Your Own Capital Gains Tax
Enter your purchase price, sale price, holding period, and income above for an instant estimate.
Capital Gains Tax on Stocks
Selling shares of stock for more than you paid creates a capital gain, taxed as short-term or long-term depending on how long you held the position. A few common scenarios:
• Stocks sold for a profit – creates a capital gain, taxed per the short-term/long-term rules above
• Stocks sold for a loss – creates a capital loss, which can offset gains elsewhere (see the Gains and Losses section below)
• Multiple stock transactions – gains and losses across different trades in the same year are generally netted together before determining overall tax treatment
• Short-term stock gains – from positions held a year or less, generally taxed at ordinary rates
• Long-term stock gains – from positions held more than a year, potentially eligible for the 0%/15%/20% rates
Because brokers report cost basis to the IRS in many cases, but not always perfectly (especially for shares acquired through transfers, gifts, or older accounts), keeping your own accurate purchase and sale records – including reinvested dividends that affect basis – is worth the effort when it’s time to file.
Capital Gains Tax on Real Estate
Real estate sales follow the same basic gain formula, but with a few property-specific wrinkles:
• Purchase price – what you originally paid for the property
• Selling price – the final sale price
• Adjusted basis – generally the purchase price plus certain capital improvements, minus any depreciation claimed (for rental or investment property)
• Selling expenses – costs like agent commissions and closing costs, which can reduce the amount treated as proceeds
• Improvements – capital improvements (not routine repairs) generally increase basis, which reduces the taxable gain
For a primary residence specifically, certain taxpayers may qualify for the home-sale exclusion under IRC Section 121, which allows excluding up to $250,000 of gain ($500,000 for married couples filing jointly) from federal tax, subject to the ownership-and-use test (generally owning and living in the home for at least two of the five years before the sale) and other eligibility requirements. Not every home sale qualifies – eligibility depends on meeting the specific IRS requirements, and this calculator does not apply any home-sale exclusion automatically.
Capital Gains Tax on Cryptocurrency
The IRS treats cryptocurrency as property for federal tax purposes, which means selling or otherwise disposing of it can create a taxable capital gain or loss, not just when it’s cashed out. Common taxable events include:
• Selling crypto for cash – the most straightforward taxable event
• Exchanging one cryptocurrency for another – generally treated as a disposal of the first asset, which can trigger a gain or loss even though no cash changed hands
• Using cryptocurrency to purchase goods or services – also generally treated as a disposal of the crypto at its value at the time of the transaction
The same short-term/long-term holding period rules apply to crypto as to stocks or other property. Given how many transactions crypto activity can generate, detailed recordkeeping matters even more here.
Capital Gains and Capital Losses
Capital losses aren’t just a bad outcome to shrug off – they can directly reduce your tax bill by offsetting gains:
• Gains offsetting losses (and vice versa) – capital gains and capital losses are generally netted against each other within the same tax year
• Netting gains and losses – short-term gains/losses are netted against each other, long-term gains/losses are netted against each other, and the two net results are then combined
• Net capital gain/loss – the result after all netting is complete for the year
• Annual deduction limit – if losses exceed gains, up to $3,000 of the excess ($1,500 if Married Filing Separately) can generally be deducted against ordinary income each year
• Carryforward – any unused net capital loss beyond that annual limit can generally be carried forward to future tax years
These figures ($3,000 / $1,500) come directly from IRS guidance (Topic no. 409) and are a long-standing feature of the tax code; always confirm current rules before relying on them for a specific filing.
Capital Gains Tax Example
Hypothetical examples only. These do not represent every taxpayer’s actual tax liability – individual results depend on your complete tax situation.
Example 1: Long-Term Investment
| Item | Amount |
| Purchase Price | $50,000 |
| Sale Price | $80,000 |
| Capital Gain | $30,000 |
| Holding Period | Long-term (held over 1 year) |
| Filing Status / Other Income | Single / $70,000 |
| Estimated Tax (2026) | $4,500 |
| Estimated Net Profit | $25,500 |
The entire $30,000 gain falls within the 15% long-term bracket once stacked on $70,000 of other income, so estimated tax is $30,000 × 15% = $4,500.
Example 2: Investment With Capital Losses
| Item | Amount |
| Gain from Stock A | $8,000 |
| Loss from Stock B | −$3,000 |
| Net Capital Gain | $5,000 |
| Holding Period / Filing Status / Other Income | Long-term / Single / $70,000 |
| Estimated Tax (2026) | $750 |
Here, the $3,000 loss from Stock B is netted against the $8,000 gain from Stock A first, leaving a $5,000 net gain to be taxed – rather than taxing the $8,000 gain in isolation. At 15%, estimated tax on the $5,000 net gain is $750. Note that this calculator estimates tax on a single gain input and does not automatically net multiple positions – this example illustrates the netting concept manually.
What Is Adjusted Cost Basis?
Adjusted cost basis is generally your original purchase price adjusted for certain costs and events that affect what you’re treated as having invested in the asset. It’s the starting point for calculating any gain or loss on sale.
Factors that can affect basis, depending on the asset:
• Original purchase price – the starting point for basis
• Certain transaction costs – such as brokerage commissions paid to acquire the asset
• Reinvested dividends – for securities, dividends automatically reinvested into additional shares generally increase your basis
• Capital improvements – for real estate, improvements (not routine repairs) generally increase basis
• Other basis adjustments – such as depreciation taken on rental property, which generally reduces basis
Basis rules differ depending on the type of asset and how it was acquired (purchased, inherited, gifted, or received in a like-kind exchange, for example), so the specific adjustments that apply can vary meaningfully from one situation to the next.
Factors That Can Affect Your Capital Gains Tax
• Sale price
• Purchase price
• Adjusted basis
• Holding period
• Filing status
• Taxable income
• Capital losses
• Type of asset
• Applicable exclusions (such as the home-sale exclusion, where eligible)
• Additional taxes that may apply in certain circumstances, such as the Net Investment Income Tax
• State taxes, which are separate from federal capital gains tax
This calculator provides an estimate based specifically on the inputs it supports – purchase price, sale price, holding period, filing status, and other taxable income. It doesn’t account for every factor on this list, so treat the result as a starting point rather than a final number.
Capital Gains Tax and Filing Status
Filing status determines which bracket thresholds apply to both ordinary income and long-term capital gains:
• Single – individual filers not qualifying for another status
• Married Filing Jointly – generally the widest bracket thresholds among the statuses
• Married Filing Separately – generally uses narrower thresholds than filing jointly
• Head of Household – available to certain unmarried taxpayers who meet specific household and dependent requirements, with thresholds between Single and Married Filing Jointly
Because these thresholds are adjusted for inflation annually, it’s worth double-checking current-year figures (like the 2026 figures shown earlier in this article) rather than relying on thresholds from a prior year.
Net Investment Income Tax
The Net Investment Income Tax (NIIT) is an additional 3.8% federal tax that can apply to investment income – including capital gains – for higher-income taxpayers. It’s separate from, and applied on top of, the standard capital gains tax rates discussed above.
NIIT applies to the lesser of your net investment income or the amount by which your modified adjusted gross income (MAGI) exceeds these thresholds:
• $200,000 for Single or Head of Household filers
• $250,000 for Married Filing Jointly
• $125,000 for Married Filing Separately
Not every capital gain is automatically subject to NIIT – it only comes into play once a taxpayer’s MAGI crosses the applicable threshold for their filing status. This calculator does not include NIIT in its estimate, so higher-income filers may want to account for this additional tax separately when estimating their total liability.
How to Reduce Capital Gains Tax Legally
A few general, widely-discussed tax-planning concepts worth understanding (this is educational information, not personalized advice for your situation):
• Tax-loss harvesting – realizing losses on underperforming positions to offset gains elsewhere in the same tax year
• Holding investments long-term when appropriate – to potentially qualify for the lower long-term rates instead of ordinary rates
• Using available capital losses – applying prior-year carryforward losses against current-year gains
• Understanding cost basis – making sure basis is calculated correctly (including reinvested dividends or capital improvements) so you aren’t overstating your taxable gain
• Taking advantage of applicable tax provisions – such as the home-sale exclusion, where eligibility requirements are met
• Considering tax-advantaged accounts where relevant – gains inside accounts like IRAs or 401(k)s are generally treated differently than gains in a standard taxable brokerage account
These are general concepts, not a recommendation to buy, sell, or hold any particular investment – what makes sense depends entirely on your personal financial situation and goals.
Capital Gains Tax vs. Ordinary Income Tax
| Feature | Capital Gains (Long-Term) | Ordinary Income |
| Type of income | Profit from selling an appreciated asset | Wages, salary, short-term gains, interest, self-employment income |
| Typical tax treatment | Preferential 0%/15%/20% federal rates, if held over 1 year | Ordinary federal income tax brackets |
| Holding period relevance | Directly determines eligibility for preferential rates | Not applicable |
| Examples | Selling stock held for 3 years, selling a rental property | A paycheck, short-term stock trade, freelance income |
| General federal tax-rate framework | 0%, 15%, or 20% (2026) | Multiple graduated ordinary brackets |
Short-term capital gains don’t get their own special table – they’re simply added to your ordinary income and taxed at the regular brackets, which is why the one-year holding period distinction carries so much practical weight.
Frequently Asked Questions
How is capital gains tax calculated?
Capital gains tax generally starts with calculating the difference between an asset’s sale proceeds and its adjusted basis. The applicable tax treatment then depends on factors such as the holding period, taxable income, filing status, and applicable tax rules.
What is the capital gains tax rate?
For 2026, federal long-term capital gains rates are 0%, 15%, or 20%, depending on taxable income and filing status. Short-term gains are taxed at ordinary federal income tax rates instead.
Are short-term capital gains taxed differently?
Yes. Short-term gains (assets held one year or less) are generally taxed as ordinary income using regular federal tax brackets, rather than the preferential long-term capital gains rates.
How are long-term capital gains taxed?
Long-term gains (assets held more than one year) may qualify for federal rates of 0%, 15%, or 20%, based on your total taxable income and filing status for the applicable tax year.
Can capital losses reduce capital gains?
Yes. Capital losses are generally netted against capital gains. If losses exceed gains, up to $3,000 ($1,500 if Married Filing Separately) of the excess can typically be deducted against ordinary income each year, with any remainder carried forward to future years.
How much capital gain is tax-free?
For 2026, long-term capital gains can be taxed at 0% if your total taxable income stays under $49,450 (Single), $98,900 (Married Filing Jointly), or $66,200 (Head of Household). Above those thresholds, gains move into the 15% or 20% brackets.
Do I pay capital gains tax when I sell my home?
Not always. If you meet IRS eligibility requirements for the home-sale exclusion (generally owning and living in the home for at least two of the five years before the sale), you may be able to exclude up to $250,000 of gain ($500,000 if married filing jointly). Not every sale qualifies, and any gain above the exclusion is generally taxable.
Are stock gains subject to capital gains tax?
Yes. Profits from selling stock are capital gains, taxed as short-term or long-term depending on how long you held the shares before selling.
Are crypto gains taxable?
Yes. The IRS treats cryptocurrency as property, so selling it, trading it for another cryptocurrency, or using it to buy goods or services can all trigger a taxable capital gain or loss.
Does income affect capital gains tax?
Yes. Your total taxable income (including the gain) determines which long-term capital gains bracket – 0%, 15%, or 20% – applies, and it also determines your ordinary tax bracket for short-term gains.
Do I have to pay state capital gains tax?
It depends on your state. Some states tax capital gains as ordinary income, some offer preferential treatment, and a few have no state income tax at all. Federal capital gains tax is separate from and in addition to whatever your state requires.
Is capital gains tax calculated on the full sale price?
No. Capital gains tax applies to the gain – sale proceeds minus your adjusted basis – not the full sale price. If you sell for the same amount you paid (or less), there may be little to no taxable gain.
Disclaimer: This calculator and content provide a general estimate for educational purposes only and do not constitute tax, legal, or financial advice. We are not CPAs, tax attorneys, or other tax professionals. Capital gains tax rules are complex, figures are current only for the stated tax year (2026) and subject to change, and this calculator does not model every factor that can affect an individual’s actual tax liability, including capital losses, NIIT, home-sale exclusions, or state taxes. Consult a qualified tax professional for guidance specific to your situation.
Related Calculators
Investment Return Calculator →
ROI Calculator →
Compound Interest Calculator →
Retirement Calculator →
Inflation Calculator →
Estate Tax Estimator →
ROI Calculator →
Compound Interest Calculator →
Retirement Calculator →
Inflation Calculator →
Estate Tax Estimator →
Income Tax Calculator (coming soon)
Tax Bracket Calculator (coming soon)
