Capital Gains Tax Calculator — Know Your Tax Before You Sell
Estimate your federal and state tax liability on the sale of assets — stocks, real estate, crypto, and more. Uses 2024/2025 IRS brackets. Compare Short-Term vs. Long-Term rates side by side.
| # | Step | IRS Rule / Formula | Inputs | Result |
|---|---|---|---|---|
| Calculate to see steps | ||||
How to Use the Capital Gains Tax Calculator
Three inputs and a dropdown are all it takes to get an IRS-accurate tax estimate. The whole process takes under two minutes and produces a result you can share with your accountant or use to plan a sale date strategically.
Enter Your Sale Price & Cost Basis
Input the amount you received (or expect to receive) from selling the asset as your Sale Price. For your Cost Basis, enter what you originally paid — including any commissions, fees, or qualifying improvements. For real estate, use net proceeds after agent commissions and closing costs. The difference between these two figures is your gross capital gain, and every other calculation flows from it.
Select Your Holding Period
Choose whether you held the asset for more than one year (Long-Term) or one year or less (Short-Term). This single selection determines whether your gain is taxed at the preferential 0%, 15%, or 20% long-term rates — or at ordinary income rates of up to 37%. If you haven’t sold yet, the calculator lets you compare both scenarios side by side so you can see the exact tax cost of selling early.
Enter Your Tax Profile
Select your IRS filing status — Single, Married Filing Jointly, or Head of Household — as this determines which long-term capital gains thresholds apply to you. Then enter your annual taxable income excluding this gain. This figure places you in the correct federal bracket and determines whether the 3.8% NIIT surtax applies. Finally, set your state capital gains rate using the slider or by typing it directly — check your state’s rate if unsure.
Review Your Tax Breakdown & Download the Report
Your results appear instantly: total tax liability, net profit after tax, federal and state amounts, effective tax rate, and the NIIT surtax if applicable. The proportion bars and donut chart show how your gain splits between the government and your pocket. Expand the full calculation breakdown accordion to see every step of the IRS methodology. Download the two-page PDF report to share with your CPA or bring to a tax planning session.
Short-Term vs. Long-Term Capital Gains — What the Difference Costs You
The IRS treats capital gains very differently depending on how long you held the asset before selling. Crossing the one-year threshold can reduce your tax rate by 20 percentage points or more — often saving tens of thousands of dollars on a single sale.
Held 1 year or less — taxed as ordinary income
If you sell an asset within 12 months of buying it, the IRS treats the profit as ordinary income — the same as wages from a job. Your capital gain is added directly to your total taxable income and taxed at your marginal bracket, which can reach 37% for high earners. There are no preferential rates; no exceptions for the size of the gain.
- 10% — up to $11,600 (single) / $23,200 (joint)
- 12% — up to $47,150 (single) / $94,300 (joint)
- 22% — up to $100,525 / $201,050
- 24% — up to $191,950 / $383,900
- 32%, 35%, 37% — above those thresholds
Held more than 1 year — preferential rates apply
Holding an asset for more than 12 months before selling qualifies the gain for long-term capital gains rates, which are significantly lower than ordinary income rates. Depending on your total taxable income and filing status, you may pay 0%, 15%, or 20% — a meaningful incentive the tax code provides for patient, long-term investors.
- 0% — income up to $47,025 (single) / $94,050 (joint) — 2024
- 15% — income up to $518,900 (single) / $583,750 (joint)
- 20% — income above those thresholds
- +3.8% NIIT surtax — MAGI above $200K/$250K (see below)
What the Calculator Shows You
This is not a simple rate-times-gain calculator. It applies the complete IRS methodology — bracket lookup, NIIT threshold testing, state overlay, and a full step-by-step audit trail — so the number you see reflects what you’d owe after a real tax filing.
Total Tax Liability (Federal + State + NIIT)
The headline figure: all three components of your capital gains tax obligation added together and displayed prominently at the top of the results card. This is the number to share with your financial planner — the combined amount owed before you receive your net proceeds.
Net Profit After All Taxes
Your gross capital gain minus the combined federal, state, and NIIT tax burden — the dollar amount that actually lands in your account after the government’s share is removed. This is the number most sellers actually care about when deciding whether to sell now or wait.
Federal Tax Rate & Amount
The specific federal rate applied to your gain — 0%, 15%, or 20% for long-term; 10%–37% for short-term — derived from your combined income plus the capital gain. Displayed alongside the dollar amount so you can immediately see what the rate translates to at your gain size.
State Capital Gains Tax
Your state rate (entered via the slider or input) applied to the gross gain. Most states tax capital gains as ordinary income, making state tax a significant additional cost in high-rate states like California (up to 13.3%). Enter 0% if you live in a no-income-tax state such as Florida, Texas, or Nevada.
NIIT Surtax (3.8%) with Threshold Test
The calculator checks whether your Modified Adjusted Gross Income exceeds the NIIT threshold ($200,000 single / $250,000 joint) after including the capital gain. If applicable, it calculates the 3.8% surtax on the lesser of the net investment income or the MAGI overage — the exact IRS methodology from Form 8960.
Short-Term vs. Long-Term Comparison Chart & Methodology Table
A side-by-side bar chart shows the tax cost under both holding periods for your exact gain and income — so you can see in dollars what waiting past the one-year mark would save. Expand the full accordion to see the 11-step IRS calculation breakdown: every input, formula, and intermediate result, documented clearly.
Capital Gains Taxes in the US — Key Figures for 2024
Three Sellers — Three Very Different Tax Outcomes
The same $50,000 gain can produce wildly different tax bills depending on your income, holding period, state, and whether the NIIT applies. These three profiles show how the calculator helps each type of seller make a more informed decision before they pull the trigger.
You bought shares 10 months ago and they’ve appreciated significantly. You’re tempted to sell now, but your accountant mentioned “something about a year.” The difference between selling at month 10 (short-term) versus month 13 (long-term) on a $40,000 gain could mean paying $9,500 more in federal tax alone if you’re in the 22% ordinary income bracket versus the 15% LTCG rate. Use the calculator with both holding period options to see the exact dollar difference for your specific income and gain — then decide if the two-month wait is worth it.
- Enter your gain amount and toggle between Short-Term and Long-Term to instantly see the tax savings from waiting
- If your income is below $47,025 (single) or $94,050 (joint), your long-term rate may be 0% — run the numbers first
- Don’t forget state tax — in California or New York, state rates alone add 10%+ to the short-term bill
You’re selling a rental property you’ve owned for six years. The gain is large — perhaps $200,000 or more — and you earn a solid income from your day job. At that income level, the NIIT surtax quietly adds 3.8% on top of the 20% federal LTCG rate, bringing your effective federal rate to 23.8% before state tax is even counted. In California, the combined rate can exceed 36%. Run the calculator with your actual income and the expected gain to see your complete tax bill — and then consider speaking to a CPA about a 1031 exchange before closing.
- Enter your annual income excluding the gain — this determines whether the 3.8% NIIT applies
- For a primary residence, you may exclude up to $250K/$500K under §121 — enter only the taxable portion of the gain
- Depreciation recapture on rental property is taxed separately at up to 25% — consult a CPA for that component
You’ve bought Bitcoin or Ethereum at multiple price points over several years. Some lots are up 300%, others are down. When you sell, the tax owed depends entirely on which specific coins you sell — and in what order. Selling your highest-cost-basis lots first minimizes the gain; selling the lots you’ve held longest (over one year) qualifies them for long-term rates. Use the calculator for each lot separately: enter the purchase price and sale price for that specific tranche to see the tax on each lot, then decide which to sell based on the results.
- Run the calculator separately for each lot — different purchase prices create different gains and different holding periods
- If some lots are at a loss, selling them in the same tax year can offset gains from profitable lots (tax-loss harvesting)
- The IRS treats crypto as property — every sale, trade, or conversion is a taxable event, not just cashing out to USD
7 Capital Gains Tax Strategies to Know Before You Sell
The calculator shows you what you owe under current law. These seven principles help you use that information to structure your sale — and potentially reduce the bill before it’s due.
Always Confirm the Exact 1-Year Mark Before Selling
The IRS counts the holding period from the day after purchase to the day of sale. A sale on day 365 is still short-term; day 366 is long-term. This distinction can cost or save you 10–20 percentage points in federal tax rate on the entire gain. Run the calculator with both holding period options to see the exact dollar difference for your situation — many sellers are surprised by how much a short delay saves.
High Earners Pay 23.8%, Not 20% — Factor in the NIIT
The commonly cited maximum long-term capital gains rate is 20%, but this understates the actual cost for taxpayers whose Modified Adjusted Gross Income exceeds $200,000 (single) or $250,000 (joint). The 3.8% Net Investment Income Tax adds on top of the 20% LTCG rate, bringing the true federal ceiling to 23.8%. Add a high state rate like California’s 13.3% and the combined marginal rate can exceed 37% — higher than the top ordinary income bracket in some scenarios.
Tax-Loss Harvesting Can Eliminate or Reduce the Tax Bill
If you hold other investments that are currently at a loss, selling them in the same tax year creates capital losses that directly offset capital gains dollar-for-dollar. Short-term losses first offset short-term gains; long-term losses offset long-term gains. Remaining losses after netting can offset up to $3,000 of ordinary income per year, with the rest carried forward. Run the calculator on your gain, then determine how much loss harvesting would be needed to reduce the taxable gain to zero — or to cross into a lower bracket.
The §121 Home Sale Exclusion Is Not Automatic — Check the Requirements
If you’re selling a primary residence, the IRS allows you to exclude up to $250,000 of gain ($500,000 for married filing jointly) from taxable income — but only if you have owned and lived in the home as your primary residence for at least 24 of the 60 months preceding the sale. Partial exclusions apply if you don’t meet the full two-year test. This calculator does not apply the exclusion automatically — enter only the taxable portion of your gain (total gain minus exclusion) to get an accurate estimate.
Inherited Assets Receive a Stepped-Up Cost Basis
When you inherit an asset, the IRS generally resets your cost basis to the asset’s fair market value on the date of the decedent’s death — not what the deceased originally paid. This means decades of appreciation can escape capital gains tax entirely. If you’ve inherited stock, real estate, or other property, enter the FMV at the date of death as your cost basis in this calculator, not the original purchase price. All inherited assets also automatically qualify for long-term rates, regardless of how quickly you sell.
Installment Sales Can Spread the Tax Bill Across Multiple Years
If you sell a qualifying asset and receive payments over more than one year, the IRS allows you to report the gain proportionally as payments are received rather than all at once in the year of sale. This can keep you below the NIIT threshold, below the 20% LTCG rate, or below the threshold that pushes you from the 15% to 20% bracket — saving meaningful amounts on a large gain. Use this calculator to estimate the tax on the full gain, then model a smaller annual portion to see whether an installment arrangement would reduce the total tax owed across the payment period.
State Tax Rates Vary Enormously — Always Enter the Right Number
State capital gains tax treatment is not uniform. California taxes all capital gains as ordinary income at rates up to 13.3%, making it the most expensive state for investors. Minnesota, Oregon, and New York also have high rates. Conversely, Florida, Texas, Nevada, Wyoming, South Dakota, and Alaska have no state income tax at all — making the state component of your bill zero. Some states offer partial exclusions for long-term gains or for specific asset types. The slider in this calculator defaults to 5% — always look up your state’s actual current rate before relying on the estimate.
Frequently Asked Questions
Everything you need to know about how this calculator works, what capital gains taxes apply to, and how to interpret your results before making a sale decision.
Disclaimer: All results produced by the Capital Gains Tax Calculator are estimates for educational and planning purposes only. This calculator applies 2024/2025 IRS long-term and short-term capital gains brackets, the Net Investment Income Tax (NIIT) threshold rules, and a user-provided state rate to estimate federal and state tax liability on a single capital gain transaction. Results do not account for depreciation recapture (taxed at up to 25% on real estate), the Section 121 home sale exclusion, prior-year capital loss carryovers, the Alternative Minimum Tax (AMT), installment sale treatment, qualified opportunity zone elections, Section 1031 like-kind exchanges, or state-specific preferential capital gains treatments. Tax law is complex and changes frequently. This calculator is not tax advice and does not constitute a tax opinion. Always consult a licensed CPA, Enrolled Agent, or tax attorney before making financial decisions based on these estimates.
