What is a Capital Gains Tax Calculator?
A capital gains tax calculator is a financial tool that estimates the taxes owed when you sell an asset—such as stocks, bonds, or real estate—for a profit. It accounts for your cost basis, sale price, holding period, and your total annual income to determine the applicable federal and state tax rates, including the 3.8% Net Investment Income Tax (NIIT) for high earners.
Accurately projecting your tax liability before selling an asset allows you to implement strategies like tax-loss harvesting or timed selling to preserve more of your investment returns.
How to Calculate Your Capital Gains Tax
Follow these five steps to determine your tax liability on investment profits:
- 1Determine Your Adjusted Cost BasisThis is the original purchase price plus any commissions, fees, or capital improvements (for real estate).
- 2Calculate Your Realized GainSubtract your adjusted cost basis from the final sale price (after selling expenses) to find your taxable profit.
- 3Identify the Holding PeriodIf you held the asset for more than one year, you qualify for lower long-term rates. One year or less is taxed as ordinary income.
- 4Apply Federal and State RatesFactor in your filing status and total taxable income to find your bracket (0%, 15%, or 20% for long-term gains).
- 5Factor in the NIITAdd 3.8% if your Modified Adjusted Gross Income (MAGI) exceeds $200,000 (Single) or $250,000 (Married Filing Jointly).
Frequently Asked Questions
What is the long-term capital gains tax rate for 2026?
For 2026, long-term capital gains rates are 0%, 15%, or 20% depending on your taxable income. Most individual taxpayers fall into the 15% bracket. Additionally, high earners may be subject to the 3.8% Net Investment Income Tax (NIIT).
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 benefit from lower, preferential tax rates.
How can I minimize my capital gains tax?
Strategies to minimize capital gains tax include holding assets for more than a year to qualify for long-term rates, using tax-loss harvesting to offset gains with losses, and utilizing tax-advantaged accounts like IRAs or 401(k)s. Homeowners may also qualify for a primary residence exclusion of up to $250,000 ($500,000 for married couples).
2026 Tax Rates
Long-term Rates
0% / 15% / 20%
NIIT Surcharge
3.8%
Holding Period
366+ Days