Skip to main content

Capital Gains Tax Calculator

Tax & Income

Tax on the profit from a sale.

Sale & gain details

Tax year
Filing status
What you originally paid for the asset, before any added costs.
$
The gross amount you sold for, before selling costs.
$
Holding period
Held 1126 days (~3.1 yrs) — Long-term
Your other taxable income for the year (after deductions), excluding this gain. It decides which long-term rate band the gain falls into.
$
Advanced options
Term classification
Auto uses the holding period — more than one year is long-term. Override it to compare both treatments.
Purchase commissions, fees and capital improvements — added to your cost basis.
$
Broker commissions and closing costs on the sale — subtracted from your proceeds.
$
Net Investment Income Tax (NIIT)
The 3.8% surtax on investment income above $200k single / $250k joint / $125k separate of MAGI.
Optional — your MAGI for a precise NIIT estimate. Leave at 0 to approximate it from your income plus the gain.
$

Enter a sale price to estimate your capital gains tax.

Calculation transparency

Know what this estimate is based on

Jurisdiction
United States unless the calculator explicitly says otherwise
Rules and time period
Tax years supported by the selected calculator
Scope and limitations
Educational estimate only, not a tax return or filing determination. U.S. statutory-threshold tools use USD. Confirm current law and your facts with the relevant authority or a qualified tax professional.
Source links checked
Jul 30, 2026

Built and regression-tested by Smart Tools Lab. It has not been individually reviewed by a licensed financial, tax, or legal professional.

How to use

  1. 01

    Pick your tax year (2024, 2025, or 2026) and filing status (single, married filing jointly, married filing separately, or head of household) so the calculator pulls the correct long-term breakpoints and ordinary brackets.

  2. 02

    Enter the purchase price (your starting cost basis) and the sale price (gross proceeds), then set the purchase and sale dates so the tool can measure your holding period and auto-classify the gain as short-term or long-term.

  3. 03

    Type your taxable income before this gain — your other income after deductions — because the gain stacks on top of it and that stack decides which long-term band (0%, 15%, or 20%) or ordinary bracket each dollar lands in.

  4. 04

    Open Advanced to add buying and improvement costs (these raise your basis), selling costs (these reduce your proceeds), the NIIT toggle, and a Modified AGI override if you want precise Net Investment Income Tax.

  5. 05

    Read the results — short- or long-term tax, NIIT, total tax, after-tax proceeds, effective and marginal rates, the band breakdown, and the sell-now-vs-hold comparison — and flip the holding-period override to see how waiting past one year changes the bill.

Formula

Start by building the two sides of the trade. Cost basis equals the purchase price plus any buying and improvement costs. Amount realized equals the sale price minus selling costs. The capital gain is amount realized minus cost basis; if that number is negative you have a capital loss instead. Next, classify the holding period: held one year or less is short-term, held more than one year is long-term. Short-term gains are added to your other taxable income and taxed as ordinary income, so the tax is the extra income tax produced by stacking the gain on top across the 10% through 37% brackets. Long-term gains use the preferential schedule: stack the gain on top of your other taxable income, and the portion sitting below the 0% ceiling is tax-free, the portion in the middle band is taxed at 15%, and any portion above the upper breakpoint is taxed at 20% (for 2025 single filers the 0% ceiling is total taxable income up to $48,350 and the 15% band runs to $533,400). On top of either tax, the 3.8% NIIT then bites on whichever is less — the gain, or how far modified AGI runs past its filing-status ceiling (single/HoH $200,000, MFJ $250,000, MFS $125,000). Total tax is the income-based tax plus NIIT, after-tax proceeds equal amount realized minus total tax, and the effective rate is total tax divided by the gain. For a loss, there is no gains tax; up to $3,000 ($1,500 if married filing separately) offsets ordinary income this year and the remainder carries forward.

Example

"A single filer in tax year 2025 buys stock for $100,000 and sells it for $160,000 after holding about three years, with $80,000 of other taxable income. Cost basis is $100,000 and amount realized is $160,000, so the capital gain is $60,000. Because the position was held more than one year it is long-term. Stacking the $60,000 on top of $80,000 of income places the entire gain inside the 15% long-term band (which for a 2025 single filer runs up to $533,400 of total taxable income), so the tax is $9,000, an effective rate of 15%. After-tax proceeds are $151,000, meaning the filer keeps $51,000 of the $60,000 gain, and NIIT is $0 because income is well under the $200,000 threshold. Selling short-term instead would tax the same $60,000 as ordinary income — partly at 22% and partly at 24% — for $13,933, so waiting for long-term treatment saves $4,933. For contrast, a filer with only $30,000 of other income and a $10,000 long-term gain would pay $0 (the whole gain falls in the 0% band), while a high earner with $500,000 of income plus a $100,000 long-term gain would pay $5,010 at 15%, $13,320 at 20%, and $3,800 of NIIT, for $22,130."

Definitions

Capital gain
The profit when you sell an asset for more than its cost basis. It equals amount realized minus cost basis and is the figure the federal tax is calculated on.
Capital loss
The result when you sell an asset for less than its cost basis. It carries no gains tax and can offset up to $3,000 of ordinary income per year ($1,500 if married filing separately), with the rest carried forward.
Cost basis
What the asset cost you for tax purposes: the purchase price plus buying and improvement costs. A higher basis lowers the taxable gain.
Amount realized
The net proceeds from a sale: the sale price minus selling costs such as commissions and fees.
Holding period
The time between buying and selling. One year or less is short-term; more than one year is long-term, which unlocks the preferential rates.
Short-term capital gain
A gain on an asset held one year or less, taxed as ordinary income at your 10%-37% bracket rate rather than the lower long-term rates.
Long-term capital gain
A gain on an asset held more than one year, eligible for the preferential 0%, 15%, or 20% federal rates depending on total taxable income.
Long-term rate band
One of the three income tiers (0%, 15%, 20%) into which a long-term gain falls after being stacked on other taxable income; a single gain can span more than one band.
Net Investment Income Tax (NIIT)
A 3.8% Medicare surtax that can apply to capital gains for higher earners. Its base is the smaller of the gain and the MAGI carried above your filing-status ceiling (single/HoH $200,000, MFJ $250,000, MFS $125,000); it reaches short- and long-term gains alike.
Modified adjusted gross income (MAGI)
Adjusted gross income with certain items added back, used to test whether you cross the NIIT threshold. The tool lets you override it for precision.
Ordinary income
Income such as wages, interest, and short-term gains taxed at the regular 10%-37% brackets. Your ordinary taxable income is the base a gain stacks on.
Effective rate
The blended rate you actually pay: total gains tax divided by the whole gain, dragged down by any 0% or 15% dollars sitting beneath the top band.
Marginal rate
What the next dollar of gain would cost — the highest band the gain reaches. It signals the rate on additional gain rather than the average across the whole gain.
Filing status
Your tax category — single, married filing jointly, married filing separately, or head of household — which sets the long-term breakpoints, ordinary brackets, and NIIT threshold the calculator uses.

Good to know

What a capital gain is and when it is taxed

A capital gain is the profit you earn when you sell a capital asset for more than it cost you. For most individual investors, capital assets are things like stocks, bonds, mutual fund and ETF shares, real estate, and, increasingly, cryptocurrency. The key idea under US federal tax law is realization: simply watching an investment climb in value does not trigger any tax. A stock that doubles on paper is an unrealized gain, and you owe nothing on it no matter how large it grows. The taxable event is the sale or other disposition of the asset, the moment you convert that paper appreciation into a locked-in result. Until you sell, the IRS takes no notice; once you sell, the gain becomes real and reportable for that tax year. Measuring the gain comes down to two numbers. The first is your cost basis, which starts with what you paid for the asset, your purchase price. The second is the amount you realize on the sale, your gross sale proceeds. The capital gain is the amount realized minus the cost basis. In this calculator, those two figures are refined by the costs that surround a transaction. Buying and improvement costs, such as commissions or money spent improving a property, are added to the purchase price to form your true cost basis, while selling costs, such as brokerage fees or agent commissions, are subtracted from the sale price to give a cleaner amount realized. So cost basis equals purchase price plus buying and improvement costs, amount realized equals sale price minus selling costs, and the gain is the difference between them. If that difference is positive, you have a capital gain that may be taxed. If it is negative, because you sold for less than your adjusted basis, you have a capital loss instead, which is treated very differently and can actually reduce your tax. The gain is taxed in the year the sale closes, and it does not stand alone: it stacks on top of the other taxable income you already report, which is why this tool asks for your taxable income before the gain. That stacking determines which rates apply and how much of the gain is exposed to higher brackets. Two more factors shape the final bill, both covered in the sections that follow: how long you held the asset, which decides whether ordinary or preferential rates apply, and your income level, which can add a 3.8 percent surtax. Understanding realization, basis, and proceeds is the foundation; everything the calculator does builds on these three ideas.

Short-term vs long-term: why the one-year line matters

The single most consequential question in federal capital gains taxation is how long you owned the asset before selling. The dividing line is one year. If you held the asset for one year or less, the gain is short-term. If you held it for more than one year, the gain is long-term. The calculator reads your purchase date and sale date and classifies the holding period automatically, and it gives you a manual override so you can compare what selling now versus waiting would mean. The counting convention matters at the margin: the holding period begins the day after you acquire the asset and includes the day you sell, so an asset bought on a given date generally must be sold after the same date one year later to qualify as long-term. A sale even one day too early stays short-term. Why does crossing this line matter so much? Because the two categories are taxed on completely different schedules. Short-term gains receive no special treatment at all. They are taxed as ordinary income, exactly like wages or interest, climbing through the same 10, 12, 22, 24, 32, 35, and 37 percent federal brackets. The calculator measures this as the incremental tax: it stacks the short-term gain on top of your other taxable income and charges the brackets that the gain pushes into, so a gain that straddles two brackets is taxed partly at the lower rate and partly at the higher one. Long-term gains, by contrast, enjoy a preferential structure built around just three rates, 0, 15, and 20 percent, which for nearly every investor sit well below the ordinary rates that would otherwise apply. The size of the gap is often striking. Consider the tool's main example: a single filer in 2025 with 80,000 dollars of other taxable income sells stock at a 60,000 dollar gain. Held long-term, the entire gain falls in the 15 percent band and the tax is 9,000 dollars. Sold short-term, the same 60,000 dollars is taxed as ordinary income that runs through the 22 and then the 24 percent brackets, producing 13,933 dollars of tax. Simply waiting to cross the one-year line saves 4,933 dollars on an identical economic profit. That is the comparison the calculator surfaces directly, showing the short-term cost, the long-term cost, and the saving side by side. The lesson is not that you should always hold, since prices and personal needs change, but that the one-year threshold is a real, quantifiable fork in the road. Knowing exactly where your purchase date falls, and how close you are to clearing a year, can be worth thousands of dollars in tax on a single sale.

How the 0%, 15%, and 20% long-term rates actually work

The preferential long-term rates of 0, 15, and 20 percent are not a single rate you pick based on your total wealth. They work as bands, and which band a dollar of gain lands in depends on where that dollar sits once it is stacked on top of your other taxable income. This stacking is the part that trips up most people. The IRS first fills the income brackets with your ordinary taxable income, then places the long-term gain on top of that income and measures it against two breakpoints. The gain is taxed from the bottom up: the slice that still falls below the lower breakpoint is taxed at 0 percent, the slice between the two breakpoints is taxed at 15 percent, and any slice above the upper breakpoint is taxed at 20 percent. A single gain can therefore be split across two or even three rates. The breakpoints depend on your filing status and the tax year, and the calculator carries the full set for 2024 through 2026 across all four statuses. For a single filer in 2025, the 0 percent band covers total taxable income up to 48,350 dollars, the 15 percent band runs up to 533,400 dollars, and the 20 percent rate applies above that. Married filing jointly roughly doubles those thresholds, head of household sits in between, and married filing separately is roughly half of the joint figures (its 0 percent ceiling actually matches the single filer's 48,350 dollars). Because the gain stacks on existing income, the 0 percent band is only available to the extent your other income has not already used it up. Someone with 80,000 dollars of ordinary income in 2025 has already filled past the 48,350 dollar mark, so none of their long-term gain qualifies for the 0 percent rate. Two examples make the mechanics concrete. In the tool's main case, a single filer with 80,000 dollars of other income and a 60,000 dollar long-term gain sees the entire gain sit between the breakpoints, so it is all taxed at 15 percent for 9,000 dollars. Change the facts to a modest earner with only 30,000 dollars of other income and a 10,000 dollar gain, and the gain fits entirely under the 48,350 dollar ceiling, taxed at 0 percent for a tax bill of zero. At the other extreme, a high earner with 500,000 dollars of income and a 100,000 dollar gain straddles two bands: about 33,400 dollars of the gain falls in the 15 percent band at 5,010 dollars, the remaining 66,600 dollars is taxed at 20 percent for 13,320 dollars, plus a 3,800 dollar surtax, totaling 22,130 dollars. The calculator shows this band breakdown for your own numbers, so you can see exactly how much of your gain is taxed at each rate rather than guessing at a single headline percentage.

Cost basis: what it includes and how to raise it

Cost basis is the figure that decides how much of your sale proceeds counts as taxable gain, and getting it right is one of the most reliable ways to lower a capital gains bill legitimately. Basis starts with your purchase price, but it rarely stops there. Anything you spend to acquire the asset can be added to basis, and a higher basis means a smaller gain. In this calculator, the buying and improvement costs field captures these additions, while selling costs are handled separately by reducing your proceeds. The two adjustments push in the same direction, shrinking the taxable gain, but it helps to know which side each belongs on. For securities, the most common additions are transaction costs such as brokerage commissions and certain transfer fees paid when you bought. A frequently overlooked source of basis is reinvested dividends and capital gains distributions in a mutual fund or a dividend reinvestment plan. Each reinvestment is a purchase of new shares with money on which you have already been taxed, so every reinvested dollar adds to your basis. Investors who forget this often overstate their gain and pay tax twice on the same dollars, once as the dividend and again as phantom gain at sale. For real estate, basis grows with capital improvements that add value or prolong the property's life, such as a new roof, an addition, or a renovated kitchen, along with many of the closing costs and settlement fees from the original purchase. Routine repairs and ordinary maintenance do not count; the line is whether the spending betters the property or merely keeps it running. Selling costs work on the other end of the transaction. Commissions, agent fees, and similar costs of disposing of the asset reduce the amount you realize, which again reduces the gain. The practical takeaway is the same in both cases: every legitimate dollar of acquisition cost, improvement, reinvestment, or selling expense you can document is a dollar that escapes capital gains tax. None of this works without records. The burden of proving basis falls on you, the taxpayer, not the IRS, and basis often has to be substantiated years or decades after the fact. Brokerages now report basis for most covered securities on Form 1099-B, but coverage has gaps, especially for older holdings, transferred accounts, inherited assets, and real estate, where you remain responsible. Keep purchase confirmations, brokerage statements showing reinvested dividends, closing statements, and receipts and contracts for every improvement. A simple running log of what you paid and what you added, stored where you can find it, can be worth far more than its trouble when you finally sell. Enter your best documented figures in the calculator's basis and cost fields to see how each adjustment moves the taxable gain and the tax that follows.

The Net Investment Income Tax: the 3.8% surtax that catches higher earners

Beyond the ordinary brackets and the 0/15/20 long-term rates sits a separate federal charge that many sellers forget until it appears on their return: the Net Investment Income Tax, or NIIT. It adds 3.8% on top of whatever capital gains tax you already owe, and the calculator models it through the NIIT toggle and an optional Modified AGI override so you can see its bite precisely. The surtax does not apply to your whole gain automatically. Instead, it falls on the smaller of two figures: your net investment income for the year, or the amount by which your Modified Adjusted Gross Income (MAGI) climbs above a fixed threshold. Whichever of those two numbers is lower is multiplied by 3.8%. Because only the overshoot above the threshold (when that is the smaller figure) is exposed, the surtax can be trivial just over the line yet equal a flat 3.8% of the whole gain once MAGI sits well above it. The thresholds are $200,000 for single filers and heads of household, $250,000 for married couples filing jointly, and $125,000 for married filing separately. A crucial and often overlooked detail is that these dollar figures are not indexed for inflation. Congress fixed the thresholds in nominal dollars when the tax took effect and has left them frozen ever since, while the ordinary brackets and long-term breakpoints the tool updates each year keep moving. As a result, each year of wage and asset growth quietly enlarges the group that owes the surtax. NIIT is also broader than the preferential rates in one respect: it applies to both short-term and long-term gains. A quick flip taxed as ordinary income and a patient long-term hold are treated identically here, because the surtax keys off the investment income itself, not the holding period. The canonical example sidesteps NIIT entirely. A single filer with $80,000 of other income and a $60,000 long-term gain lands near $140,000 on the tool's taxable-income proxy for MAGI; true MAGI, measured before deductions, runs somewhat higher but still sits comfortably below the $200,000 line, so the surtax is zero and the gain costs only the $9,000 in long-term tax. Contrast that with a high earner: $500,000 of income plus a $100,000 long-term gain produces $5,010 at 15%, $13,320 at 20%, and an additional $3,800 of NIIT, lifting the total to $22,130. That $3,800 is simply 3.8% of the full $100,000 gain, because MAGI sits far above the threshold and the entire gain is the lesser figure. When you are near a threshold, deferring even part of a sale into another year can keep MAGI low enough to dodge the surtax, which is why modeling it matters.

Capital losses and tax-loss harvesting: turning a down position into a tax asset

Not every sale produces a gain, and the tax code treats losses as something you can actively put to work. When you sell an asset for less than its cost basis, the calculator reports a capital loss rather than a tax bill, because a loss generates no capital gains tax at all. What a loss does instead is reduce other taxes. The first job of a realized loss is to cancel out realized gains: short-term losses first offset short-term gains, long-term losses offset long-term gains, and any leftover of one type then spills over to net against the other. This netting is the foundation of tax-loss harvesting, the practice of deliberately selling a position that has fallen in value to absorb the tax on a winner you also want to sell. A $20,000 long-term gain paired with a $20,000 harvested loss nets to zero taxable gain, neutralizing what might otherwise have been a four-figure tax. If your losses exceed your gains for the year, the benefit does not stop there. Up to $3,000 of net capital loss can be deducted against ordinary income annually, which is reduced to $1,500 for those married filing separately. Because ordinary income is often taxed at higher marginal rates than long-term gains, this deduction can be unusually valuable dollar for dollar. Any loss beyond that $3,000 ceiling is not wasted either; it carries forward indefinitely to future years, where it again offsets gains first and then up to $3,000 of ordinary income each year until exhausted. A patient investor with a large loss can shelter gains for many years to come. One rule deserves a firm caution, and it is one this estimate does not enforce for you: the wash-sale rule. If you sell at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the IRS disallows the loss for the moment and folds it into the basis of the replacement shares. Harvesting only delivers its benefit if you stay out of that 61-day window or rotate into a genuinely different holding. Keep in mind too that this tool evaluates a single transaction in isolation. It does not net across multiple lots, import prior-year carryforwards, or track your full portfolio, so treat its loss figures as a clean illustration of how one sale behaves rather than a complete picture of your year. For real filings, your brokerage's Form 1099-B and Schedule D bring all the pieces together.

Planning the sale: timing, income years, the one-year line, and the step-up at death

Capital gains tax is one of the few large taxes whose timing you largely control, because the gain is only triggered when you choose to sell. That control opens several planning levers, and the calculator's side-by-side comparisons are built to let you test them before you act. The most direct lever is the holding period. Because the difference between ordinary rates and the preferential 0/15/20 rates is so wide, nudging a sale past the one-year mark can be worth thousands. The canonical case makes this concrete: a $60,000 gain for a single filer with $80,000 of other income costs $9,000 as a long-term gain but $13,933 if sold short-term and taxed as ordinary income, so waiting saves $4,933. When a position is approaching its one-year anniversary, the 'sell now versus hold' output shows exactly what patience is worth. A second lever is the income year you sell into. Because long-term gains stack on top of your other taxable income, the rate they meet depends on how much income is already filling the brackets beneath them. Selling in a low-income year, perhaps a gap between jobs, a sabbatical, or early retirement before pensions and Social Security begin, can push part or all of a gain into the 0% band. A retiree with only $30,000 of other income can realize a $10,000 long-term gain entirely tax-free, something impossible in a high-earning year. Spreading a large sale across two tax years can keep each slice in a lower band and, near the $200,000 or $250,000 lines, can also keep MAGI under the NIIT threshold. The third consideration is the most powerful and the least intuitive: the step-up in basis at death. When appreciated assets pass to heirs, their cost basis generally resets to the fair market value on the date of death. Decades of unrealized appreciation can escape capital gains tax altogether if the asset is held until then rather than sold during life. This is why some long-term investors deliberately hold their most appreciated positions and instead fund spending from cash, losses, or higher-basis lots. The flip side is that selling to diversify a dangerously concentrated position, or to fund a real need, is often worth the tax; do not let tax avoidance override sound financial judgment. Run your specific numbers through the tool, compare the tax across different years and holding periods, and weigh the savings against your actual goals, liquidity, and risk. The estimate sharpens the decision, but the right answer still depends on your broader plan, not on the tax line alone.

Beyond the basics: special rates, exclusions, and the limits of this estimate

The 0/15/20 framework covers the great majority of stock and fund sales, but the capital gains landscape has corners this calculator deliberately does not model, and knowing where they lie keeps you from over-trusting a clean number. Certain assets carry their own rates. Collectibles such as art, coins, antiques, and physical precious metals can be taxed at a long-term rate of up to 28%, higher than the 20% top rate on ordinary investments. Real estate brings its own wrinkle: the portion of a property gain attributable to depreciation you previously claimed, known as unrecaptured Section 1250 gain, can be taxed at up to 25%. Neither of these special rates is applied here, so a sale of a rental building or a gold position will read lower than its true federal cost. On the more favorable side, several powerful exclusions exist that this tool does not attempt to apply. The Section 121 exclusion lets many homeowners shield up to $250,000 of gain on a primary residence, or $500,000 for a married couple filing jointly, when ownership and use tests are met. Qualified Small Business Stock under Section 1202 can exclude a large share, sometimes all, of the gain on eligible shares held long enough. If you enter a home sale or qualifying startup stock, the calculator will tax the full gain and overstate what you owe; treat those cases as needing dedicated analysis. Cryptocurrency is taxed as property, so the same short-term and long-term rules apply to a coin sale as to a stock, but exchanges and wallets complicate basis tracking and the wash-sale rule's reach over crypto remains an evolving area. The tool also stops at the federal border. It calculates no state or local capital gains tax, and those vary enormously, from states that impose none to others that tax gains as ordinary income at rates approaching double digits. Your true all-in cost is the federal figure here plus whatever your state adds. Several mechanical simplifications round out the limits: this estimate evaluates one transaction at a time, so it does not net multiple lots against each other, import prior-year loss carryforwards, or apply the wash-sale rule for you. Everything it produces is an estimate built on published brackets, breakpoints, and thresholds for 2024 through 2026, intended to inform your thinking and frame a conversation, not to replace one. For a sale of any size or complexity, confirm the result with a qualified tax professional, because this is an educational estimate and not investment, legal, or tax advice.

Frequently asked questions

What is the difference between a short-term and long-term capital gain?

It comes down to how long you held the asset. If you held it for one year or less, the gain is short-term and is taxed as ordinary income at your 10%-37% bracket rate. If you held it for more than one year, it is long-term and qualifies for the lower 0%/15%/20% rates. The calculator measures the gap between your purchase and sale dates and classifies the gain automatically, but you can override it to compare both outcomes.

How are the 0%, 15%, and 20% long-term rates chosen?

They are based on your total taxable income, not the gain alone. The tool stacks your long-term gain on top of your other taxable income and fills the bands from the bottom up. Dollars below the 0% ceiling are tax-free, dollars in the middle band are taxed at 15%, and dollars above the upper breakpoint are taxed at 20%. A single gain can straddle two bands, so part of it may be 15% and part 20%.

What are the 2025 long-term breakpoints for a single filer?

For 2025, a single filer pays 0% on long-term gains while total taxable income stays at or below $48,350, 15% on income up to $533,400, and 20% above that. The other filing statuses and the 2024 and 2026 tax years use different breakpoints, and the calculator stores all of them so you do not have to look them up.

Is short-term gain really taxed the same as my salary?

Yes. A short-term gain receives no preferential rate; it is added to your taxable income and taxed at your ordinary brackets. The tool reports the incremental tax — the extra you owe once the gain is stacked on your other income — which can span more than one bracket. That is why a short-term sale often costs noticeably more than waiting for long-term treatment.

What is the Net Investment Income Tax and when does it apply?

For capital gains the NIIT is a separate 3.8% Medicare surtax that switches on only after your modified AGI clears a fixed line. The amount taxed is whichever is smaller — the gain itself or the dollars by which your MAGI overshoots that line — and the lines sit at $200,000 (single or head of household), $250,000 (married filing jointly) and $125,000 (married filing separately). Stay beneath your line and the surtax is zero; clear it and both short- and long-term gains can be swept in, since these dollar lines have never been adjusted for inflation.

How does the calculator treat buying, improvement, and selling costs?

Buying and improvement costs are added to your cost basis, which raises the floor and shrinks the taxable gain. Selling costs are subtracted from your sale price to give the amount realized. Capturing both is worthwhile because every dollar of legitimate cost you record reduces the gain that gets taxed.

What happens if I sell at a loss?

There is no capital gains tax on a loss. You can use up to $3,000 of net capital loss ($1,500 if married filing separately) to offset ordinary income in the year of the sale, and any remaining loss carries forward to future years. The calculator flags a loss and shows the deductible portion, though it does not net multiple lots or apply prior-year carryovers.

Does my other income change what I owe on the gain?

Significantly. Your other taxable income is the base the gain stacks on, so it determines which long-term band each dollar lands in and whether the gain pushes you toward the NIIT threshold. The same $60,000 long-term gain can be entirely tax-free for a low earner and partly taxed at 20% plus NIIT for a high earner.

Why does the tool show a sell-now versus hold comparison?

Because the timing of a sale can change the tax dramatically. The comparison taxes the same gain two ways — as a short-term gain at ordinary rates and as a long-term gain at preferential rates — and reports the difference. In the worked example, holding past the one-year mark turns a $13,933 short-term bill into a $9,000 long-term bill, a $4,933 saving.

Does this calculator handle home sales?

It computes the federal gain, but it does not apply the Section 121 primary-home exclusion ($250,000 single / $500,000 joint) or the unrecaptured Section 1250 depreciation rate of up to 25% on real estate. If you are selling a home, treat the result as a starting point and account for those rules separately or with a tax professional.

What is this tool NOT modeling?

It is federal-only and deliberately simplified. It does not cover state or local capital gains taxes, collectibles taxed at up to 28%, unrecaptured Section 1250 real-estate depreciation, the QSBS/Section 1202 exclusion, the wash-sale rule, lot-by-lot netting, or prior-year loss carryovers. Treat the result as a planning estimate and confirm any sizable sale with a CPA.

How is the effective rate different from my marginal rate?

Your marginal rate is what the next dollar of gain would cost — the highest band the gain reaches, say 20% if the top of the gain spills into the upper long-term tier. Your effective rate is the blended figure: total gains tax over the whole gain. It usually comes in lower because the first dollars of a long-term gain may have been taxed at 0% or 15% before the top band kicked in. The calculator reports both so you see the headline rate and the true average side by side.