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.
This Capital Gains Tax Calculator helps you quickly estimate how much tax you may owe on the sale of an asset. Simply enter your purchase price, sale price, holding period, and income details, and the calculator does the math for you. 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. If you need help determining your take-home pay versus taxable income, our dedicated tool can assist.
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, which can be as high as 37% at the federal level. 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 many financial advisors suggest holding investments for at least a year before selling—you could save a significant amount in taxes.
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) stays below $48,350. The 15% rate applies to income between $48,350 and $533,400, and the 20% rate kicks in above $533,400. 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. You can explore the full breakdown of ordinary income brackets with our Tax Bracket Calculator.
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. This tax applies when your adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly. The NIIT is charged on the lesser of your net investment income or the amount by which your income exceeds the threshold. 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 only on long-term gains above $270,000, and Massachusetts taxes short-term gains at 12% but long-term gains at just 5%. 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. You may also want to check your sales tax obligations and property tax liabilities to get a complete picture of your tax burden.
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.
- 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.
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 flat federal rate of 25%, which is higher than the standard long-term capital gains rates. This recapture amount is calculated before the remaining gain is taxed at the normal long-term rates. For real estate investors evaluating a property's profitability, our Cap Rate Calculator and ROI Calculator can provide additional insights.
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. Our Roth IRA Calculator and 401k Calculator can help you see how much you could save by investing through these accounts.
- 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, and use tools like our Compound Interest Calculator to project long-term growth before deciding when to sell.