Introduction
When you sell an asset like stocks, real estate, or other investments for more than you paid, the profit you make is called a capital gain. The government taxes this profit, and the amount you owe is known as capital gains tax. How much tax you pay depends on a few key things: how long you held the asset, your income level, and your tax filing status. Assets held for more than one year are taxed at lower long-term rates, while assets held for one year or less are taxed at higher short-term rates, which match your regular income tax bracket.1
This Capital Gains Tax Calculator helps you quickly estimate how much tax you may owe on the sale of an asset. Enter your purchase price, sale price, holding period, and income details, and the calculator gives you your capital gains tax. Knowing your potential tax bill ahead of time can help you make smarter decisions about when to sell and how to plan your finances.
How to Use Our Capital Gains Tax Calculator
Enter details about your investment sale below to find out how much you owe in capital gains tax.
Purchase Price: Type in the total amount you paid when you first bought the asset. This is also called your cost basis.
Sale Price: Enter the total amount you received when you sold the asset. This is the final selling price before any taxes.
Holding Period: Choose whether you held the asset for more than one year (long-term) or one year or less (short-term). Long-term gains are usually taxed at a lower rate than short-term gains.
Filing Status: Select your tax filing status, such as single, married filing jointly, married filing separately, or head of household. Your filing status affects which tax bracket you fall into.
Annual Income: Enter your total taxable income for the year, not counting the capital gain. This helps the calculator figure out the correct tax rate for your gain.
State: Select the state where you live. Some states charge their own capital gains tax on top of the federal tax, while others do not.
What Is Capital Gains Tax?
Capital gains tax is a tax you pay on the profit you make when you sell an asset for more than you paid for it. Assets can include stocks, bonds, real estate, or other investments. The "gain" is simply the difference between your sale price and your purchase price (also called your cost basis). If you sell something for less than you paid, that's called a capital loss, and you generally don't owe tax on it. In fact, you can use losses to offset other gains.
Short-Term vs. Long-Term Capital Gains
How long you hold an asset before selling it makes a big difference in how much tax you owe. If you own an asset for one year or less before selling, your profit is a short-term capital gain. Short-term gains are taxed at the same rates as your regular income.1 For 2026 the top federal rate is 37%.2 If you hold the asset for more than one year, your profit is a long-term capital gain. Long-term gains get special, lower tax rates of 0%, 15%, or 20%, depending on your total taxable income and filing status. This is why holding an investment for more than one year before selling can save a significant amount in taxes: the IRS counts a gain as long-term only when you hold the asset for more than one year.1
How Federal Capital Gains Tax Rates Work
Long-term capital gains tax rates are based on your taxable income. For the 2025 tax year, a single filer pays 0% on long-term gains if their taxable income (including the gain) is $48,350 or less.1 The 15% rate applies to income between $48,350 and $533,400, and the 20% rate kicks in above $533,400.1 For 2026 those limits are $49,450 and $545,500.3 These thresholds change based on your filing status. Married couples filing jointly get wider brackets, while married individuals filing separately get narrower ones. The brackets also adjust slightly each year for inflation.
Net Investment Income Tax (NIIT)
On top of regular capital gains tax, high-income earners may owe an additional 3.8% Net Investment Income Tax.4 This tax applies when your modified adjusted gross income exceeds $200,000 for single filers, $250,000 for married couples filing jointly or $125,000 for married people filing separately.4 The NIIT is charged on the lesser of your net investment income or the amount by which your income exceeds the threshold.4 It applies to both short-term and long-term gains.
State Capital Gains Taxes
Most states tax capital gains as regular income. State rates vary widely, from 0% in states like Florida, Texas, Nevada, and Wyoming (which have no state income tax) to as high as 13.3% in California. A few states have unique rules. For example, Washington charges a 7% tax on long-term gains above a standard deduction of $278,000 for 2025, and real estate is exempt.5 Massachusetts taxes short-term gains at 8.5% and long-term gains at 5%.6 Your state of residence can have a major impact on your total tax bill, so it's important to factor in state taxes when planning a sale.
Adjustments That Reduce Your Taxable Gain
Several adjustments can lower the amount of capital gains you actually owe tax on:
- Improvements: Money you spent on capital improvements (like home renovations) gets added to your cost basis, which reduces your gain.7
- Selling costs: Broker commissions, closing costs, and other fees related to the sale are subtracted from your proceeds.
- Capital losses: Losses from other investment sales in the same year can offset your gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income and carry the rest forward to future years.1
Depreciation Recapture
If you claimed depreciation deductions on an asset (most commonly rental property), you may owe depreciation recapture tax when you sell. The portion of your gain that equals the depreciation you previously claimed is taxed at a maximum federal rate of 25%.1 The calculator taxes that portion at your ordinary income rates, capped at 25%. This recapture amount is calculated before the remaining gain is taxed at the normal long-term rates.
Tips for Reducing Capital Gains Tax
- Hold assets longer than one year to qualify for lower long-term rates.
- Harvest losses by selling underperforming investments to offset gains.
- Use tax-advantaged accounts like IRAs or 401(k)s where gains grow tax-deferred or tax-free.
- Time your sales in years when your income is lower to stay in a lower tax bracket.
- Keep records of all improvements and selling costs to maximize your cost basis adjustments.
- Reinvest strategically using approaches like dollar-cost averaging to build positions over time.