A capital gains tax is owed when you sell an investment — such as stocks, cryptocurrency, or real estate — for more than you paid. The rate depends on how long you held the asset: short-term gains (held ≤1 year) are taxed as ordinary income, while long-term gains (held >1 year) qualify for the preferential 0%, 15%, or 20% rates. High earners may also owe a 3.8% Net Investment Income Tax (NIIT) on top of the capital gains rate.
Sale Details
Total taxable income including this gain (after deductions)
Tax Breakdown
Net Investment Income Tax (NIIT) applies
Your income exceeds the NIIT threshold for your filing status. An additional 3.8% surcharge applies to your capital gain.
Disclaimer: This is an estimate based on 2025 federal capital gains tax rates. It does not account for state taxes, depreciation recapture, AMT, wash-sale rules, or other individual circumstances. Always consult a tax professional before making financial decisions.
How to Use the Capital Gains Tax Calculator
When you sell a stock, cryptocurrency, piece of real estate, or any other capital asset for a profit, you typically owe federal capital gains tax on that profit. Understanding how much tax you will owe — before you sell — helps you plan smarter: timing your sale to qualify for lower long-term rates, estimating the after-tax proceeds you will actually receive, or deciding whether to harvest a loss to offset gains elsewhere. This capital gains tax calculator estimates your 2025 federal tax liability in seconds.
Step 1: Enter Your Purchase and Sale Prices
Enter the original purchase price (your cost basis) and the sale price (your proceeds) in the corresponding fields. The cost basis is what you paid for the asset, including any commissions or fees. The sale price is what you received when you sold it, before deducting costs. The calculator determines your capital gain or loss from the difference.
Step 2: Select Your Holding Period and Asset Type
Choose whether you held the asset for more than one year (long-term) or one year or less (short-term). This is the most important factor in determining your capital gains tax rate. Long-term gains qualify for the preferential 0%, 15%, or 20% rates. Short-term gains are taxed as ordinary income, at the same rates as wages — which can reach 37% for high earners. Also select your asset type (stocks, crypto, real estate, or other), which provides context for your results.
Step 3: Enter Your Filing Status and Taxable Income
Your filing status and total taxable income determine which capital gains bracket applies to your gain. Enter your filing status (single, married filing jointly, married filing separately, or head of household) and your estimated taxable income for the year, including the gain from this sale. Taxable income is your gross income minus deductions — use last year's tax return or your best estimate. These fields are needed to apply the correct 2025 long-term capital gains thresholds and to check whether the 3.8% Net Investment Income Tax (NIIT) surcharge applies.
Understanding Your Results
After clicking Calculate, the tool shows your capital gain or loss, the tax rate applied, the estimated tax owed, and your net proceeds — the amount you keep after paying federal tax. If your income exceeds the NIIT threshold ($200,000 for single filers, $250,000 for married filing jointly), the 3.8% surcharge is added automatically and shown separately in the breakdown. The effective rate on your gain is the total tax owed divided by the gain, giving you a true picture of what percentage of your profit goes to taxes.
Long-Term vs Short-Term: Why It Matters
The difference between long-term and short-term capital gains tax rates can be enormous. For a single filer with $100,000 in taxable income who sells an asset for a $30,000 gain, a short-term gain would be taxed at 22% (as ordinary income), resulting in roughly $6,600 in tax. The same gain as a long-term gain would be taxed at just 15%, saving over $2,100. Holding an investment just one day longer — crossing the one-year mark — can result in thousands of dollars in tax savings for large gains. Always consider the holding period before selling.
Frequently Asked Questions
Is this capital gains tax calculator free?
Yes, this capital gains tax calculator is completely free with no signup and no account required. All calculations run locally in your browser using client-side JavaScript. Your financial data is never sent to any server.
Is my financial data private?
Absolutely. Every calculation happens entirely in your web browser. No purchase prices, sale prices, or income figures are ever transmitted to any server or stored anywhere. You can verify this by turning off your internet connection after the page loads — the calculator will still work perfectly.
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. They are taxed as ordinary income using your regular federal income tax bracket, which can be as high as 37%. Long-term capital gains apply to assets held for more than one year and are taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income — making long-term investing significantly more tax-efficient.
What are the 2025 long-term capital gains tax rates?
For 2025, single filers pay 0% on long-term gains if taxable income is up to $48,350; 15% from $48,351–$533,400; and 20% above $533,400. Married filing jointly thresholds are $96,700 (0%), $96,701–$600,050 (15%), and above $600,050 (20%). Head of household thresholds are $64,750 (0%), $64,751–$566,700 (15%), and above $566,700 (20%).
What is the Net Investment Income Tax (NIIT)?
The Net Investment Income Tax is an additional 3.8% surcharge on investment income, including capital gains, for high earners. It applies to the lesser of your net investment income or the amount by which your modified adjusted gross income (MAGI) exceeds $200,000 for single filers, $250,000 for married filing jointly, or $125,000 for married filing separately.
Does this calculator cover crypto and real estate gains?
Yes. The IRS treats cryptocurrency and real estate as capital assets, subject to the same short-term and long-term capital gains rules. Note that real estate may have additional considerations like depreciation recapture (taxed at 25%), which this calculator does not account for. For crypto, the holding period starts from the date of acquisition.
How do I find my taxable income to use this calculator?
Taxable income is your gross income minus deductions. For most people it equals wages and other income minus the standard deduction ($15,000 single / $30,000 married jointly for 2025) or itemized deductions. Your taxable income determines which capital gains bracket applies to you. If unsure, use last year's tax return as a starting point.
Is this calculator accurate enough to use for filing taxes?
This tool provides a solid estimate based on 2025 federal capital gains rates and NIIT thresholds, but it does not account for state taxes, depreciation recapture, wash-sale rules, AMT, or other individual circumstances. Always consult a qualified tax professional or CPA before making tax decisions.