Capital Gains Tax Calculator 2025

How much capital gains tax will you owe on your investment sale?

Enter your asset's purchase price, sale price, holding period, and annual income. See your capital gains amount, tax rate, and total tax owed for 2025 tax filing.

Updated June 2026 · How this works

Worth knowing
How It Works
The formula, explained simply

Capital gains tax applies when you sell an investment or asset for more than you paid for it. The tax rate depends on two key factors: how long you held the asset and your total taxable income.

Short-term capital gains (assets held one year or less) are taxed as ordinary income at your regular tax brackets, ranging from 10% to 37% in 2025. Long-term capital gains (assets held more than one year) get preferential treatment with rates of 0%, 15%, or 20% depending on your income level.

The calculator determines your tax bracket by adding your capital gain to your existing taxable income. This is important because a large gain can push you into a higher bracket, affecting the rate applied to your gain. For long-term gains, the thresholds are much more generous, which is why holding investments for over a year can save substantial tax money.

Your cost basis (purchase price) can include the original price plus certain fees, commissions, and improvements. The sale price should be reduced by selling costs. The difference between these adjusted amounts is your taxable capital gain.

When To Use This
Right tool, right situation

Use this calculator before selling any significant investment to understand the tax impact. It's especially valuable when you're deciding whether to sell an asset just before or just after the one-year mark, as the tax difference can be substantial.

The calculator helps with tax-loss harvesting decisions. If you have capital gains from other sales, you can see how much tax you'd save by realizing offsetting losses. It's also useful for estate planning, as inherited assets get a 'stepped-up basis' that can eliminate capital gains tax.

Real estate investors find this particularly valuable since property transactions involve large amounts and holding period strategies. The calculator helps determine whether to sell rental properties as long-term investments or flip them quickly.

For retirement planning, use this to model the tax impact of selling investments in different tax years. You might spread large sales across multiple years to stay in lower capital gains brackets, or coordinate sales with years when you have lower ordinary income.

Common Mistakes
Why results sometimes look wrong

The biggest mistake is miscounting the holding period. Many investors think holding a stock for exactly one year qualifies for long-term treatment, but you need to hold it for more than 365 days. Buy on January 1st and sell on January 1st the next year? That's still short-term.

Another common error is forgetting to adjust the cost basis. You can add purchase commissions, improvement costs, and certain fees to your original cost, which reduces your taxable gain. Similarly, selling expenses like broker fees should reduce your sale proceeds.

Many people don't realize that the gain itself can push them into a higher tax bracket. If you're near a bracket threshold, a large capital gain can cause the entire gain to be taxed at the higher rate. This makes tax-loss harvesting and timing of sales crucial for high earners.

Finally, investors often overlook the Net Investment Income Tax (NIIT) of 3.8% that applies to capital gains for high earners. Single filers with modified adjusted gross income over $200,000 and married couples over $250,000 pay this additional tax on top of regular capital gains rates.

The Math
Worked examples and deeper derivation

The capital gains calculation starts with: Capital Gain = Sale Price - Cost Basis. The tax owed depends on whether the gain is short-term or long-term.

For short-term gains, the tax rate matches your ordinary income tax brackets. In 2025, these range from 10% for income up to $11,000 to 37% for income over $578,125. The gain is added to your other income to determine which bracket applies.

Long-term capital gains use separate, lower brackets. For 2025, single filers pay 0% on gains if their total taxable income (including the gain) stays under $44,625. They pay 15% on gains pushing income between $44,625 and $492,300, and 20% above that threshold.

Married filing jointly filers get roughly double these thresholds: 0% up to $89,250, 15% up to $553,850, and 20% above. The calculation multiplies your capital gain by the applicable percentage to determine tax owed.

Long-term stock gain
Single filer, $60,000 income, bought stock at $100,000, sold at $150,000, held over 1 year
The $50,000 gain is taxed at 15% long-term rate, resulting in $7,500 tax owed.
Short-term property flip
Married filing jointly, $80,000 income, bought property at $200,000, sold at $250,000, held 8 months
The $50,000 gain is taxed as ordinary income at 22% rate, resulting in $11,000 tax owed.
High earner long-term
Single filer, $400,000 income, bought investment at $500,000, sold at $700,000, held 2 years
The $200,000 gain is taxed at 20% long-term rate, resulting in $40,000 tax owed.
Expert Unlock
The thing most explanations skip

The tax code allows 'installment sales' to spread capital gains over multiple years, potentially keeping you in lower brackets. But this only works if you structure the sale properly upfront - you cannot elect installment treatment after closing. Real estate professionals often use 1031 exchanges to defer all capital gains tax by reinvesting proceeds in like-kind property within strict timing windows.

When does the one-year holding period actually start counting?

How do I know if my capital gain is short-term or long-term?
Count from the day after you bought the asset to the sale date. If you held it for exactly one year, it's still short-term. You need to hold it for more than one year (366+ days) to qualify for long-term treatment and lower tax rates.
Can I offset capital gains with capital losses?
Yes, you can use capital losses to offset capital gains dollar-for-dollar. If your losses exceed gains, you can deduct up to $3,000 of net losses against ordinary income per year, carrying forward any excess to future years.
Do I pay state capital gains tax on top of federal tax?
Most states tax capital gains as ordinary income at their regular income tax rates. A few states like Florida, Texas, and Washington have no state capital gains tax. Check your state's tax rules for the complete picture.

Need something this doesn't cover?

Suggest a tool — we'll build it →