Capital Gains Tax Calculator 2026

Calculate short-term and long-term capital gains taxes for 2026. Enter your purchase price, sale price, and holding period. Free capital gains estimator.

How to Use This Capital Gains Tax

Start by entering the purchase price of your asset, which is also called the cost basis. The cost basis includes the original price you paid plus any commissions, fees, or transaction costs incurred at the time of purchase. If you received the asset as a gift, your cost basis is generally the donor's original cost basis. If you inherited the asset, your cost basis is typically the fair market value on the date of the decedent's death, known as a stepped-up basis.

Next, enter the sale price, which is the amount you received or expect to receive when selling the asset. This should be the gross sale price before any selling commissions or fees are deducted. The difference between the sale price and the purchase price determines your capital gain or loss.

Select the holding period. Choose short-term if you held the asset for one year or less, or long-term if you held it for more than one year. The holding period begins the day after you acquire the asset and ends on the day you sell it. Getting this classification right is essential because it determines whether your gain is taxed at ordinary income rates or the lower long-term capital gains rates.

Choose your filing status and enter your annual taxable income excluding the capital gain. Your taxable income determines which long-term rate bracket applies and which ordinary income bracket applies for short-term gains. Optionally, enter your state tax rate if your state taxes capital gains. The calculator will display your capital gain, federal tax including any NIIT, state tax, total tax burden, net profit after tax, and effective capital gains rate. Try toggling between short-term and long-term to see the dramatic difference in tax treatment.

What Is Capital Gains Tax?

A capital gains tax calculator estimates the federal and state taxes you owe when you sell an investment for a profit. A capital gain is the difference between what you paid for an asset, known as the cost basis, and the price at which you sold it. Capital gains apply to stocks, bonds, mutual funds, ETFs, real estate, cryptocurrency, collectibles, and virtually any asset that appreciates in value.

The most important factor in determining your capital gains tax rate is the holding period. Assets held for one year or less generate short-term capital gains, which are taxed as ordinary income at rates ranging from 10% to 37% depending on your tax bracket. Assets held for more than one year generate long-term capital gains, which receive preferential tax treatment with rates of only 0%, 15%, or 20%. This significant rate difference makes the one-year threshold one of the most critical considerations in investment tax planning.

Qualified dividends from domestic corporations and certain foreign corporations are also taxed at the favorable long-term capital gains rates, even though they are not technically capital gains. This is an important consideration when evaluating the tax efficiency of dividend-paying stocks versus growth stocks.

High-income investors should also be aware of the Net Investment Income Tax (NIIT), an additional 3.8% surtax that applies to investment income, including capital gains, for single filers with modified adjusted gross income above $200,000 and married couples filing jointly above $250,000. The NIIT is calculated on the lesser of your net investment income or the amount by which your MAGI exceeds the threshold. This calculator automatically includes NIIT when applicable, giving you a more complete picture of the tax impact of selling an investment.

Formula & Methodology

The capital gains tax calculation begins with determining the gain or loss:

Capital Gain = Sale Price − Cost Basis

If the result is negative, you have a capital loss. Losses are not taxed and can offset gains or up to $3,000 of ordinary income per year. If the result is positive, the tax depends on the holding period.

For short-term gains, the gain is added to your ordinary income and taxed at your marginal income tax rate:

Short-term Tax = Capital Gain × Ordinary Income Tax Rate (10% to 37%)

For long-term gains, preferential rates apply based on your total taxable income and filing status:

Long-term Tax = Capital Gain × LTCG Rate (0%, 15%, or 20%)

The 2025 long-term capital gains thresholds for single filers are: 0% on taxable income up to $47,025, 15% from $47,025 to $518,900, and 20% above $518,900. Married filing jointly thresholds are roughly double.

If applicable, the Net Investment Income Tax is added:

NIIT = 3.8% × min(Capital Gain, MAGI − Threshold)

Finally, the net profit is calculated:

Net Profit = Capital Gain − Federal Tax − NIIT − State Tax

The following table summarizes key variables:

VariableDefinition
Cost BasisOriginal purchase price plus acquisition costs
Sale PriceProceeds from selling the asset
Holding PeriodDuration the asset was owned; determines short or long-term treatment
LTCG Rate0%, 15%, or 20% based on taxable income
NIIT3.8% surtax on investment income above income thresholds
Net ProfitCapital gain minus all applicable taxes

Practical Examples

Example 1 — Stock Sale (Long-term): You purchased 100 shares of a technology stock at $100 per share for a total cost basis of $10,000. After holding the shares for three years, you sell them at $200 per share for $20,000. Your capital gain is $20,000 − $10,000 = $10,000. As a single filer with $75,000 in other taxable income, your total income of $85,000 places you in the 15% long-term capital gains bracket. Federal tax is $10,000 × 15% = $1,500. Your income is below the $200,000 NIIT threshold, so no surtax applies. With no state tax, your net profit is $10,000 − $1,500 = $8,500, and your effective capital gains rate is 15%.

Example 2 — Real Estate Sale: You bought a rental property for $250,000 and sell it five years later for $350,000, producing a $100,000 long-term capital gain. As a married couple filing jointly with $180,000 in other taxable income, your combined income of $280,000 exceeds the $250,000 NIIT threshold by $30,000. Long-term capital gains tax at 15% is $15,000. The NIIT of 3.8% applies to the lesser of the $100,000 gain or the $30,000 over the threshold, so NIIT is $30,000 × 3.8% = $1,140. If your state tax rate is 5%, state tax is $100,000 × 5% = $5,000. Total tax is $15,000 + $1,140 + $5,000 = $21,140. Net profit is $100,000 − $21,140 = $78,860.

Example 3 — Mixed Short-term and Long-term: An investor sells two positions in the same year. Position A was held for eight months with a $5,000 short-term gain. Position B was held for two years with a $12,000 long-term gain. As a single filer in the 22% ordinary income bracket, the short-term tax on Position A is $5,000 × 22% = $1,100. The long-term tax on Position B at 15% is $12,000 × 15% = $1,800. Total federal tax across both positions is $2,900 on $17,000 in combined gains, for an overall effective rate of about 17.1%. If Position A had also been held for over a year, the tax would have been $17,000 × 15% = $2,550, saving $350. This illustrates why timing sales around the one-year mark can meaningfully reduce your tax bill.

Frequently Asked Questions

Financial Disclaimer

CalcCenter provides calculation tools for educational and informational purposes only. Results should not be considered financial advice and may not reflect your exact financial situation. Tax laws, interest rates, and financial regulations vary by location and change over time. Always consult a qualified financial advisor, tax professional, or licensed financial planner before making important financial decisions.

Sources & References

Related Calculators

People Also Calculate

Learn More