Capital Gains Calculator

Estimate a capital gain or loss and tax at a rate you enter.

Finance & Investment

Enter actual values for the calculation.

Capital Gains Calculator: Formula and Examples

Estimate a capital gain or loss and tax at a rate you enter.

How the calculation works

Use the applicable cost basis, including any adjustments you have determined. This page does not choose a jurisdiction, holding-period rate, exemption, or capital-loss offset.

Capital Gains formula

Net gain = sale proceeds − selling costs − cost basis. Estimated tax = max(net gain, 0) × tax rate ÷ 100.

Worked example

Selling for $20,000 with $500 selling costs and $12,000 basis gives a $7,500 gain. An entered 20% tax rate estimates $1,500 tax.

Inputs, assumptions, and interpretation

Tax is calculated only on a positive net gain at the entered percentage. This is a rate-based estimate rather than a determination of tax liability.

Displayed values are rounded, while calculations use unrounded numbers. The charts show modeled values rather than historical performance. For background, see Investor.gov introduction to investment returns.

Frequently asked questions

Does this result predict future returns?

No. The calculation summarizes the values entered. An illustrative chart or a historical return is not a forecast.

Why might an actual statement differ?

Actual payment dates, compounding conventions, changing returns, fees, tax treatment, and account rules can differ from a simplified projection.

How should I interpret a negative result?

A negative gain is a capital loss. This model estimates no tax on that loss and does not calculate offsets or deductions.