taxes calculators

Capital Gains Tax Calculator

Estimate the tax owed when you sell an investment for more than you paid. Useful for stock investors, real estate sellers, and anyone planning an asset sale who wants to know their after-tax proceeds.

About this calculator

Capital gains tax is charged on the profit you make when selling a capital asset for more than its original purchase price. The formula is: Capital Gains Tax = ((Sale Price − Purchase Price) × Tax Rate) / 100. The difference between sale price and purchase price is called the capital gain (or realized gain). Tax rates depend on how long you held the asset: short-term gains (held under one year) are taxed as ordinary income, while long-term gains (held over one year) qualify for preferential rates of 0%, 15%, or 20% in the US, depending on your income. Your net proceeds after tax equal: Sale Price − Purchase Price − Capital Gains Tax. Understanding this figure before you sell helps you decide the optimal timing for an asset sale.

How to use

Suppose you bought shares for $5,000 and sold them for $12,000, and your long-term capital gains rate is 15%. Enter 12000 as Sale Price, 5000 as Purchase Price, and 15 as Capital Gains Tax Rate. The calculator computes: Capital Gains Tax = ((12,000 − 5,000) × 15) / 100 = (7,000 × 15) / 100 = $1,050. Your after-tax profit is $7,000 − $1,050 = $5,950. Knowing this in advance helps you decide whether to harvest the gain now or defer it.

Frequently asked questions

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

Short-term capital gains apply to assets sold within one year of purchase and are taxed at your ordinary income tax rate, which can be as high as 37% for high earners. Long-term capital gains apply to assets held for more than one year and are taxed at preferential rates: 0% for those in the lowest income brackets, 15% for middle-income earners, and 20% for high earners. The one-year holding threshold is a bright line — selling even one day too early can significantly increase your tax bill. Strategic holding period management is one of the simplest tax-efficiency techniques available to investors.

How do capital losses affect the capital gains tax I owe?

Capital losses can be used to offset capital gains dollar-for-dollar, reducing your taxable gain. For example, if you have $10,000 in gains but $4,000 in losses, you only owe tax on $6,000. If your losses exceed your gains, you can deduct up to $3,000 of the net loss against ordinary income per year, with any remaining loss carried forward to future tax years indefinitely. This strategy — known as tax-loss harvesting — is commonly used near year-end to reduce a portfolio's tax liability while maintaining a similar investment position.

Does capital gains tax apply to selling a house or only to stocks and investments?

Capital gains tax can apply to the sale of real estate, but primary residences have a significant exemption: single filers can exclude up to $250,000 of gain, and married couples filing jointly can exclude up to $500,000, provided they have lived in the home for at least two of the five years before the sale. Gains above those thresholds are taxable. Investment properties and second homes do not qualify for this exclusion and are subject to capital gains tax on the full profit. Depreciation recapture on rental properties is also taxed at a special rate of up to 25%.