Finance calculators

Capital Gains Tax Calculator

Updated Nov 10, 2026 By Infinity Calculator Formulas Sources
Rate
Capital Gains Details
$75,000
$50,000
$120,000
State rate: 13.30%

Tax Estimate Summary

Total Capital Gain
$70,000
Total Tax Owed
$19,810
Effective Tax Rate
28.30%
Net Proceeds
$100,190
Federal Tax
$10,500
State Tax
$9,310
NIIT (3.8%)
$0
Depreciation Recapture Tax
$0
Detailed Tax Breakdown
Gross Gain/Loss$70,000
Adjustments (Improvements)−$0
Depreciation Claimed+$0
Selling Costs−$0
Capital Losses Offset−$0
Net Taxable Gain$70,000
Federal Capital Gains Tax$10,500
Net Investment Income Tax (NIIT)$0
Depreciation Recapture Tax (max 25%)$0
State Capital Gains Tax$9,310
Total Tax$19,810
Short-Term vs. Long-Term Comparison
Short-Term (1 Year or Less)
Federal Tax$16,186
State Tax$9,310
NIIT$0
Total Tax$25,496
Effective Rate36.42%
Net Proceeds$94,504
LT Savings
+$5,686
22.30% less tax
Long-Term (More Than 1 Year)
Federal Tax$10,500
State Tax$9,310
NIIT$0
Total Tax$19,810
Effective Rate28.30%
Net Proceeds$100,190
Tax Composition
Proceeds Breakdown
Federal Tax Bracket Application
Bracket Rate Taxable in Bracket Tax from Bracket
State Capital Gains Tax Rates Reference
StateRateNotes

The Start Your Return for Free button opens E-file.com, online software for filing your federal and state tax returns. Federal filing is free if your return qualifies for its Basic software; state returns and larger returns cost extra. We may earn a commission if you file through this link.


Introduction

When you sell an asset like stocks, real estate, or other investments for more than you paid, the profit you make is called a capital gain. The government taxes this profit, and the amount you owe is known as capital gains tax. How much tax you pay depends on a few key things: how long you held the asset, your income level, and your tax filing status. Assets held for more than one year are taxed at lower long-term rates, while assets held for one year or less are taxed at higher short-term rates, which match your regular income tax bracket.1

This Capital Gains Tax Calculator helps you quickly estimate how much tax you may owe on the sale of an asset. Enter your purchase price, sale price, holding period, and income details, and the calculator gives you your capital gains tax. Knowing your potential tax bill ahead of time can help you make smarter decisions about when to sell and how to plan your finances.

How to Use Our Capital Gains Tax Calculator

Enter details about your investment sale below to find out how much you owe in capital gains tax.

Purchase Price: Type in the total amount you paid when you first bought the asset, including sales tax and other expenses connected with the purchase. This is your starting cost basis.7

Sale Price: Enter the total amount you received when you sold the asset. This is the final selling price before any taxes.

Holding Period: Choose whether you held the asset for more than one year (long-term) or one year or less (short-term). Long-term gains are usually taxed at a lower rate than short-term gains.

Filing Status: Select your tax filing status, such as single, married filing jointly, married filing separately, or head of household. Your filing status affects which tax bracket you fall into.

Annual Income: Enter your total taxable income for the year, not counting the capital gain. This helps the calculator figure out the correct tax rate for your gain.

State: Select the state where you live. Some states charge their own capital gains tax on top of the federal tax, while others do not. The calculator applies each state's top income tax rate for 2026 to the whole gain, whichever tax year you choose (Washington uses each year's own deduction and rates), so in a state with graduated rates it can overstate the state tax on a smaller gain. It applies a lower long-term rate or a capital gains deduction or exclusion only for Hawaii, Massachusetts, Missouri, Montana, North Dakota, South Carolina and Washington. It does not apply the capital gains deductions or exclusions other states have, extra taxes some states add on high incomes, such as the Massachusetts surtax, Maine's surcharge and Maryland's tax on capital gains, or any city or county income tax.

What Is Capital Gains Tax?

Capital gains tax is a tax you pay on the profit you make when you sell an asset for more than you paid for it. Assets can include stocks, bonds, real estate, or other investments. The "gain" is the amount you receive from the sale, after selling expenses, minus your adjusted basis. Your adjusted basis starts as your purchase price (your cost basis), goes up with improvements and goes down with depreciation.10 If you sell something for less than your adjusted basis, that's called a capital loss, and you generally don't owe tax on it. In fact, you can use losses to offset other gains. A loss on property you held for personal use, such as your home or car, is not deductible.1

Short-Term vs. Long-Term Capital Gains

How long you hold an asset before selling it makes a big difference in how much tax you owe. If you own an asset for one year or less before selling, your profit is a short-term capital gain. Short-term gains are taxed at the same rates as your regular income.1 For 2026 the top federal rate is 37%.2 If you hold the asset for more than one year, your profit is a long-term capital gain. Long-term gains get special, lower tax rates of 0%, 15%, or 20%, depending on your total taxable income and filing status. Some long-term gains have higher maximum rates: 28% on collectibles and on the taxable part of a gain on qualified small business stock, and 25% on the part of a gain on real property that comes from depreciation.1 The calculator does not apply the 28% rate, so for collectibles it can show too little tax. This is why holding an investment for more than one year before selling can save a significant amount in taxes: the IRS counts a gain as long-term only when you hold the asset for more than one year.1 Inherited property counts as long-term however long you held it, and when the basis of a gift is figured from the giver's basis, the time the giver held it counts toward yours.10

How Federal Capital Gains Tax Rates Work

Long-term capital gains tax rates are based on your taxable income. For the 2025 tax year, a single filer pays 0% on long-term gains if their taxable income (including the gain) is $48,350 or less.1 The 15% rate applies to income between $48,350 and $533,400, and the 20% rate kicks in above $533,400.1 For 2026 those limits are $49,450 and $545,500.3 For 2027 they are $51,050 and $563,200.9 These thresholds change based on your filing status. Married couples filing jointly get wider brackets, while married individuals filing separately get narrower ones. The brackets also adjust slightly each year for inflation.

Net Investment Income Tax (NIIT)

On top of regular capital gains tax, high-income earners may owe an additional 3.8% Net Investment Income Tax.4 This tax applies when your modified adjusted gross income exceeds $200,000 for single or head of household filers, $250,000 for married couples filing jointly or a qualifying surviving spouse, or $125,000 for married people filing separately.4 The NIIT is charged on the lesser of your net investment income or the amount by which your income exceeds the threshold.4 It applies to both short-term and long-term gains. The calculator estimates your modified adjusted gross income as your taxable income plus the standard deduction plus the gain. If you itemize or have other deductions, your real figure is higher, and the tax shown may be too low.

State Capital Gains Taxes

Most states that have an income tax treat capital gains as part of your other income, and a few give long-term gains a lower rate or a deduction. State rates vary widely, from 0% in states like Florida, Texas, Nevada, and Wyoming (which have no state income tax) to as high as 13.3% in California. A few states have unique rules. For example, Washington taxes long-term gains above a standard deduction, which is $290,000 for 2026.13 Gains on real estate are exempt.5 Washington taxes the first $1,000,000 of taxable Washington gains at 7% and the part above that at 9.9%, beginning with tax year 2025.14 Massachusetts taxes short-term gains at 8.5% and long-term gains at 5%.6 Your state of residence can have a major impact on your total tax bill, so it's important to factor in state taxes when planning a sale.

Adjustments That Reduce Your Taxable Gain

Several adjustments can lower the amount of capital gains you actually owe tax on:

  • Improvements: Money you spent on capital improvements (like home renovations) gets added to your cost basis, which reduces your gain.7
  • Selling costs: Broker commissions, closing costs you pay as the seller, and other costs directly tied to the sale are subtracted from the sale price.12 If you sell your main home and meet the IRS conditions, you may be able to exclude up to $250,000 of the gain ($500,000 for a married couple filing jointly).12 The calculator does not apply this exclusion.
  • Capital losses: Losses from other investment sales in the same year can offset your gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 ($1,500 if married filing separately) of the excess against ordinary income and carry the rest forward to future years.1

Depreciation Recapture

If you claimed depreciation deductions on an asset (most commonly rental property), you may owe depreciation recapture tax when you sell. On real property, the portion of your gain that equals the depreciation you previously claimed is taxed at a maximum federal rate of 25%.1 On other depreciable property, such as equipment, gain up to the depreciation allowed is taxed as ordinary income.10 The calculator treats the depreciation you enter as depreciation on real property. It adds that depreciation back to your gain, because depreciation lowers your basis, and taxes that portion at your ordinary income rates, capped at 25% for property held more than one year. This recapture amount is calculated before the remaining gain is taxed at the normal long-term rates.

Tips for Reducing Capital Gains Tax

  • Hold assets longer than one year to qualify for lower long-term rates.
  • Harvest losses by selling underperforming investments to offset gains. If you, your spouse or your IRA buys substantially identical stock or securities within 30 days before or after the sale, the loss is not deductible then. It is usually added to the cost of the new shares, which postpones it, but not when your IRA bought them.11
  • Use tax-advantaged accounts like IRAs or 401(k)s where gains grow tax-deferred or tax-free.
  • Time your sales in years when your income is lower to stay in a lower tax bracket.
  • Keep records of all improvements and selling costs to maximize your cost basis adjustments.
  • Reinvest strategically using approaches like dollar-cost averaging to build positions over time.

Formulas used

Gross Capital Gain
G_{gross} = P_{sale} - P_{purchase}
Net Taxable Gain
G_{net} = \max\!\left(0,\; P_{sale} - \max\!\left(0,\; P_{purchase} + C_{improvements} - D\right) - C_{selling} - L_{offsets}\right)
Federal Long-Term Capital Gains Tax (Stacked Bracket Method)
T_{fed}^{LT} = \sum_{i} \left[\left(\min(I + D' + G,\, B_i^{max}) - \max(I + D',\, B_i^{min})\right)^{+} \times r_i\right], \quad G = G_{net} - D'
Federal Short-Term Capital Gains Tax
T_{fed}^{ST} = T_{ordinary}(I + G_{net}) - T_{ordinary}(I)
Net Investment Income Tax (NIIT) 4
T_{NIIT} = 3.8\% \times \min\!\left(G_{net},\; \left(I + S_{std} + G_{net} - \theta_{NIIT}\right)^{+}\right)
Depreciation Recapture Tax 1
T_{dep} = T_{ord}^{\le 25\%}\!\left(I + D'\right) - T_{ord}^{\le 25\%}(I), \quad D' = \min(D,\; G_{net})
Total Tax Owed
T_{total} = T_{fed} + T_{state} + T_{NIIT} + T_{dep}
Effective Tax Rate & Net Proceeds
R_{eff} = \frac{T_{total}}{G_{net}} \times 100\%, \quad \text{Net Proceeds} = P_{sale} - C_{selling} - T_{total}

Frequently asked questions

How is capital gain calculated?

Capital gain is what you receive from the sale, after selling expenses, minus your adjusted basis, which starts as your purchase price (cost basis).10 If you sold an asset for $120,000 and originally paid $50,000, your capital gain is $70,000. The calculator also subtracts improvements, selling costs, and capital losses, and adds any depreciation you claimed, to find your net taxable gain.

What is the difference between short-term and long-term capital gains tax rates?

Short-term capital gains apply to assets held for one year or less and are taxed at your regular income tax rate.1 For 2026 that rate can be as high as 37%.2 Long-term capital gains apply to assets held for more than one year and are taxed at special lower rates of 0%, 15%, or 20% depending on your income.1 Collectibles and part of a gain on qualified small business stock can be taxed at up to 28%, and the part of a gain on real property that comes from depreciation at up to 25%.1 The calculator does not apply the 28% rate, so for collectibles it can show too little tax.

What does cost basis mean?

Cost basis is usually what you paid for an asset, including sales tax and other expenses connected with the purchase. Capital improvements add to it, and depreciation you were allowed reduces it.7 A higher cost basis means a smaller taxable gain when you sell.

What is the Net Investment Income Tax (NIIT)?

The NIIT is an extra 3.8% tax on investment income.4 It applies if your modified adjusted gross income is above $200,000 for single or head of household filers, $250,000 for married filing jointly or a qualifying surviving spouse, or $125,000 for married filing separately.4 The calculator estimates your modified adjusted gross income as your taxable income plus the standard deduction plus the gain. If you itemize or have other deductions, your real figure is higher, and the tax shown may be too low.

Do all states tax capital gains?

No. States like Florida, Texas, Nevada, Wyoming, South Dakota, Alaska, and Tennessee have no state income tax, so they charge 0% on capital gains. Most other states that have an income tax treat capital gains as part of your other income, with top rates up to 13.3% in California, and a few give long-term gains a lower rate or a deduction. Washington taxes long-term capital gains above a standard deduction.5

What is depreciation recapture?

If you claimed depreciation deductions on an asset like rental property, the IRS requires you to pay back some of that tax benefit when you sell. On real property, the gain from depreciation is taxed at a maximum 25% federal rate, which is separate from the normal capital gains rate.1 On other business property, such as equipment, gain up to the depreciation allowed is taxed as ordinary income.10 The calculator treats the depreciation you enter as depreciation on real property.

Can capital losses reduce my tax bill?

Yes. Capital losses offset capital gains dollar-for-dollar. If you lost $10,000 on one investment and gained $70,000 on another, you only pay tax on $60,000. Enter your losses in the Advanced Options section of the calculator.

What filing status should I choose?

Choose the status you use on your federal tax return. If you file as a qualifying surviving spouse, choose Married Filing Jointly, which uses the same brackets and standard deduction.3 Single is for unmarried individuals. Married Filing Jointly is for married couples filing one return together. Married Filing Separately is for married couples filing their own returns. Head of Household is for unmarried people who pay more than half the cost of keeping up a home for a qualifying person.8

Why does my income matter for capital gains tax?

Your regular taxable income determines which capital gains tax bracket your profit falls into. Long-term gains are stacked on top of your ordinary income. If your income is low enough, some or all of your long-term gains could be taxed at 0%.

What counts as selling costs?

Selling costs are the costs directly tied to the sale, such as broker or real estate agent commissions, advertising fees, legal fees, and transfer taxes you paid as the seller.12 These costs reduce your net proceeds and lower your taxable gain.

What tax year should I select?

Select the tax year in which you sold or plan to sell the asset. The calculator uses the correct federal tax brackets and thresholds for each year. If you are planning a future sale, choose the upcoming tax year to estimate your bill.

What is the effective tax rate shown in the results?

The effective tax rate is your total tax divided by your net taxable gain, shown as a percentage. It tells you the overall rate you actually pay on your capital gain after all brackets, state taxes, and additional taxes like NIIT are factored in.

Do I owe capital gains tax if I sold at a loss?

No. If you sell an asset for less than your adjusted basis, you have a capital loss, not a gain.1 You owe no capital gains tax. You can actually use that loss to offset other gains or deduct up to $3,000 per year ($1,500 if married filing separately) against your ordinary income, and the rest carries forward to later years.1 A loss on property you held for personal use, such as your home or car, is not deductible.1

What are improvements and how do they affect my tax?

Improvements are money you spent to add value to an asset, like a kitchen renovation on a house. They increase your cost basis, which lowers your taxable gain.7 Enter improvement costs under Advanced Options in the calculator.


Sources

  1. Topic No. 409, Capital Gains and Losses. Internal Revenue Service. Accessed September 1, 2026.
  2. IRS releases tax inflation adjustments for tax year 2026, including amendments from the One, Big, Beautiful Bill. Internal Revenue Service. 2025;IR-2025-103. Accessed September 11, 2026.
  3. Revenue Procedure 2025-32. Internal Revenue Service. 2025;section 4.03. Accessed September 11, 2026.
  4. Topic no. 559, Net investment income tax. Internal Revenue Service. Accessed September 11, 2026.
  5. Capital gains tax. Washington State Department of Revenue. Accessed September 11, 2026.
  6. Massachusetts tax rates. Massachusetts Department of Revenue. Accessed September 11, 2026.
  7. Topic no. 703, Basis of assets. Internal Revenue Service. Accessed September 11, 2026.
  8. Publication 501, Dependents, Standard Deduction, and Filing Information. Internal Revenue Service. Head of Household. Accessed September 11, 2026.
  9. Revenue Procedure 2026-35. Internal Revenue Service. 2026;section 3.03. Accessed November 9, 2026.
  10. Publication 544, Sales and Other Dispositions of Assets. Internal Revenue Service. chapters 1, 3 and 4 (Gain or Loss From Sales and Exchanges, Section 1245 Property, Holding period). Accessed November 10, 2026.
  11. Publication 550, Investment Income and Expenses. Internal Revenue Service. chapter 4, Wash Sales. Accessed November 10, 2026.
  12. Publication 523, Selling Your Home. Internal Revenue Service. Introduction (exclusion of gain) and Worksheet 2, line 2 (selling expenses). Accessed November 10, 2026.
  13. Do you owe capital gains tax? Washington State Department of Revenue. Updated Amounts table (standard deduction by tax year). Accessed November 10, 2026.
  14. New tiered rates for Washington's capital gains tax. Washington State Department of Revenue. 2025;What are the rates?. Accessed November 10, 2026.