Calculators.Life Calculator
Tax Accounting

Capital Gains Tax Calculator

Input Parameters

Scenarios
$
The original purchase price plus eligible acquisition fees/commissions.
$
The final sale price of the asset minus allowable selling costs.
Assets held for more than 1 year qualify for preferential long-term capital gains rates.
$
Your standard taxable wages or income excluding this capital gain.
Your federal tax filing status for the applicable tax year.
%
Estimated state income or capital gains tax rate.

Computed Results

Total Capital Gains Tax
$518.00
Total Capital Gain$2,500.00
Federal Capital Gains Tax$375.00
State Capital Gains Tax$143.00
Effective Tax Rate20.72%
Net Profit After Tax$1,982.00
Long-Term Tax Savings$175.00

This capital gains calculator estimates the federal and state taxes owed when you sell an appreciated asset, such as stocks or real estate. By factoring in your holding period, taxable income, and filing status, it helps you project your net profit and potential tax savings from holding assets long-term.

This calculator provides mathematical estimates for informational purposes only and does not constitute professional tax advice.

Verified Calculation Scenarios

To illustrate how different variables impact your final tax liability, here are four verified scenarios based on 2024 federal tax brackets and standard calculation methods.

Entry Level Short-Term Asset Sale

If a single filer with $35,000 in annual income buys an asset for $5,000 and sells it for $6,500 within a year (short-term), the net capital gain is $1,500. Assuming a 3.5% state tax rate, the federal tax is $180 and the state tax is $52.50. The total tax is $232.50, leaving net proceeds of $1,267.50. Holding this asset long-term would have saved $180 in federal taxes.

High Income Married Long-Term Investment

Consider a married couple filing jointly with $300,000 in annual income. They sell a long-term asset for $450,000 that was originally purchased for $250,000, resulting in a $200,000 gain. With an 8.0% state tax rate, the federal tax (including applicable Net Investment Income Tax) is $37,600, and the state tax is $16,000. The total tax is $53,600, yielding an effective tax rate of 26.8% and net proceeds of $146,400. Holding long-term saved them $27,664.50 compared to short-term rates.

Head of Household Mid-Range Gain

A head of household earning $55,000 annually sells a long-term asset for $75,000 that cost $50,000. The $25,000 gain is subject to a 4.25% state tax rate. The federal tax is $2,550 and the state tax is $1,062.50. The total tax is $3,612.50, resulting in net proceeds of $21,387.50 and long-term tax savings of $2,140.

Zero Gain Break-Even Scenario

If an asset is purchased for $100,000 and sold for $100,000, the capital gain is $0. Regardless of income, filing status, or holding period, the total tax, effective tax rate, and net proceeds from the gain are all $0.

Formula and Calculation Method

Capital gains tax is calculated by first determining the net gain, and then applying the appropriate federal and state tax rates based on your income and holding period.

Capital Gain = Selling Price − Purchase Price

Once the capital gain is established, the calculator stacks this gain on top of your standard Annual Taxable Income to determine which tax brackets apply. The federal tax calculation depends heavily on the Length of Ownership:

For high-income earners, the calculator also evaluates the Net Investment Income Tax (NIIT). An additional 3.8% tax is applied to the lesser of the net capital gain or the excess of total income over the statutory threshold ($200,000 for Single/Head of Household; $250,000 for Married).

State tax is calculated as a flat percentage of the capital gain:

State Tax = Capital Gain × Estimated State Tax Rate

How to Use the Calculator

Follow these steps to estimate your capital gains tax liability:

  1. Enter the Purchase Price: Input the original cost basis of the asset, including any eligible acquisition fees.
  2. Enter the Selling Price: Input the final sale price, minus any allowable selling costs.
  3. Select the Length of Ownership: Choose whether you held the asset for one year or less (short-term) or more than one year (long-term).
  4. Input Annual Taxable Income: Provide your standard taxable income excluding this specific capital gain. This determines your tax bracket.
  5. Choose Filing Status: Select your federal tax filing status (Single, Married, or Head of Household).
  6. Set State Tax Rate: Enter your estimated state income or capital gains tax rate as a percentage.

Inputs and Outputs Reference

FieldTypeDescription
Purchase Price (Cost Basis)InputThe original purchase price plus eligible acquisition fees/commissions.
Selling PriceInputThe final sale price of the asset minus allowable selling costs.
Length of OwnershipInputDetermines if the gain is taxed at ordinary income rates or preferential long-term rates.
Annual Taxable IncomeInputYour standard taxable wages or income excluding this capital gain.
Total Capital Gains TaxOutputThe combined estimated federal and state tax liability on the sale.
Net Profit After TaxOutputThe remaining profit from the sale after all estimated capital gains taxes are deducted.
Long-Term Tax SavingsOutputThe estimated federal tax saved by holding the asset for more than one year.

Practical Use Cases

Estimating capital gains taxes is a standard part of financial planning. Investors use this calculation to project the net profitability of selling stocks, mutual funds, or real estate. By comparing the tax outcomes of short-term versus long-term holding periods, individuals can evaluate whether delaying a sale might result in a lower effective tax rate. Additionally, understanding how a large capital gain stacks on top of regular income helps taxpayers anticipate whether a sale will trigger the Net Investment Income Tax or push them into a higher tax bracket.

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 and are taxed at your ordinary income tax rates. Long-term capital gains apply to assets held for more than one year and are taxed at preferential federal rates, which are generally lower than ordinary income rates.

How does my regular income affect my capital gains tax?

Your capital gain is added to your regular taxable income. This combined total determines which federal tax brackets your gain falls into, and whether you exceed the income thresholds that trigger the 3.8% Net Investment Income Tax (NIIT).

Does this calculator include the Net Investment Income Tax (NIIT)?

Yes. The calculator automatically applies the 3.8% NIIT if your combined income and capital gain exceed the statutory thresholds for your filing status.

Author portrait
About the Author
Arnab Biswas

Calculator developer and SEO strategist who builds practical online calculators and tests calculation logic, input handling, and expected results using real-world scenarios.