Investments / Capital Gains

    Capital Gains Tax: What You Sold Is Not What You Gained

    Selling an investment is only the beginning of the calculation. Basis, holding period, other gains and losses, taxable income, and sometimes additional federal tax rules determine what the sale actually does to your taxes.

    PRISM Tax IntelligencePublished September 2, 2026Updated September 2, 202613 min read

    This guide focuses on U.S. federal income tax. State and local taxation can create additional consequences and is outside the scope of this article.

    You sell $100,000 of stock.

    How much capital gains tax do you owe?

    There isn’t enough information to answer that question.

    The $100,000 tells us the size of the transaction.

    It doesn’t necessarily tell us the gain.

    Suppose the amount realized is $100,000 and your adjusted basis in the investment is $60,000. Now we know something more:

    $100,000
    Amount realized
    $60,000
    Adjusted basis
    $40,000
    Realized gain

    But even $40,000 isn’t the tax bill.

    To get there, we need to know what kind of gain it is, what other capital gains and losses exist, how much other income is already on the return, and whether another federal tax applies.

    One transaction. Three very different numbers.

    What you sold.

    What you gained.

    What the gain actually changed.

    The Prism Pyramid

    What happens when you sell $100,000 of stock?

    Modeled scenario

    • 2026 · Married filing jointly
    • $250,000 combined W-2 wages
    • $100,000 amount realized
    • $60,000 adjusted basis
    • $40,000 eligible long-term capital gain
    • Standard deduction
    • No other investment income, capital gains or losses, carryforwards, qualified dividends, or material adjustments in the illustration

    The transaction

    $100,000

    Amount realized

    What you received from the sale. Assume no separate selling expenses for this illustration.

    $60,000

    Adjusted basis

    Your tax basis in the investment under the applicable basis rules.

    $40,000

    Realized gain

    What you sold is not what you gained.

    $100,000 amount realized less $60,000 adjusted basis equals $40,000 realized gain.

    A $100,000 sale does not mean you made $100,000. Now give the gain a tax return.

    The Pyramid, side one: the transaction

    The first side of the Pyramid is about the transaction alone. It performs one subtraction: the amount realized, less the adjusted basis, equals the realized gain.

    A brokerage confirmation showing a $100,000 sale is a record of what happened in the market. It is not a statement of income. In federal tax terms, the amount realized is what you received on the disposition — here, $100,000, assuming no separate selling expenses for this illustration. It answers one question only: how much came out of the position.

    A $100,000 sale does not mean you made $100,000. How much of that amount was already yours is what basis is for.

    What you sold is not what you gained.

    Basis can change the answer

    Adjusted basis is your tax investment in the property. It often begins with what you paid, but it does not always stay there, and it is not always what you paid.

    Adjusted basis can be affected by, among other things:

    • Commissions and other qualifying acquisition costs
    • Reinvested dividends and reinvested capital-gain distributions
    • Stock splits and other share adjustments
    • Return-of-capital distributions
    • Wash-sale adjustments from earlier losses
    • Property received by gift or inheritance, which carries its own basis rules
    • Shares acquired as employee compensation
    • Corporate reorganizations and other transactions that adjust basis

    Two people can sell the same stock, on the same day, for the same $100,000, and report very different gains — because they hold different adjusted bases.

    Tax lots: which shares did you sell?

    If you bought the same security more than once, you may not own one position. You may own several tax lots, each with its own basis and its own acquisition date.

    Suppose you hold:

    • 100 shares purchased at $20
    • 100 shares purchased at $35
    • 100 shares purchased at $50

    You sell 100 shares at $60. Which lot is treated as sold can change the basis, the size of the gain or loss, the holding period, the character of the result, and potentially other consequences on the return.

    The available identification methods, the broker’s default method, and what was actually specified at the time of sale all matter here.

    A broker may report basis on Form 1099-B, and for many covered securities that figure is reliable. But no broker-reported basis does not mean zero basis. It means the basis still has to be established from your records.

    No broker-reported basis does not mean zero basis.

    Realized does not always mean recognized

    A realized gain is what the transaction economically produced. A recognized gain is the portion that enters the tax calculation for the year.

    The Pyramid begins by calculating a realized gain. A separate set of rules then determines whether and when that gain is recognized. For a routine taxable stock sale like the one modeled here, realization and recognition may align — but they are not universally identical, and some dispositions are not treated as taxable events at all.

    The distinction matters because it is the recognized amount that continues into the rest of the return.

    One day can change character

    Character comes next. Held one year or less, a capital gain is generally short-term. Held more than one year, it is generally long-term.

    • Purchase September 1, 2025 · sell September 1, 2026 → short-term
    • Purchase September 1, 2025 · sell September 2, 2026 → long-term

    Short-term capital gains are generally taxed as ordinary income. Long-term capital gains may be eligible for preferential rates. Character can materially affect the federal treatment of the same dollar amount. Holding periods are not always intuitive: gifts, inheritances, equity compensation, and wash-sale adjustments can all affect the holding period that applies.

    Net before you tax

    Capital gains are not taxed transaction by transaction. They are netted first.

    • Short-term gains $12,000, short-term losses $20,000 → net short-term −$8,000
    • Long-term gains $30,000, long-term losses $5,000 → net long-term +$25,000

    In this simplified example, $17,000 of net long-term capital gain survives the netting process.

    Reverse the character — a net short-term result of the same size — and the surviving figure is $17,000 of short-term gain instead. Same dollar amount. Different character. Potentially different tax.

    The gain you report is a netting result, not a single trade.

    The $3,000 rule comes later

    “You can only deduct $3,000 of capital losses” is one of the most persistent misunderstandings in investment taxation.

    Capital losses generally offset capital gains first, without that limit. With $50,000 of gains and $40,000 of losses, the losses can potentially offset $40,000 of the gains.

    The $3,000 figure is a different rule, and it applies later:

    • $12,000 overall net capital loss
    • $3,000 deducted against other income in the current year under the ordinary individual limitation
    • $9,000 generally carried forward to future years

    The corresponding limitation is generally $1,500 for married taxpayers filing separately. None of this caps how much loss can offset capital gains.

    Flip the Pyramid

    We know the transaction produced a $40,000 gain.

    Now give the gain a tax return.

    For the modeled scenario:

    • Married filing jointly, tax year 2026
    • $250,000 combined W-2 wages
    • $40,000 recognized, eligible long-term capital gain
    • Standard deduction
    • No qualified dividends, no other investment income, no other capital gains or losses, and no capital-loss carryforwards
    • No above-the-line adjustments affecting the illustration, and the full $40,000 gain included in net investment income
    $250,000
    Combined W-2 wages
    $40,000
    Eligible long-term capital gain
    $290,000
    AGI / MAGI under the stated assumptions

    The gain doesn’t start at zero

    The gain does not arrive on an empty return. It arrives on a return that already has other taxable income.

    $290,000
    AGI
    $32,200
    2026 MFJ standard deduction
    $257,800
    Taxable income

    Without the $40,000 gain, simplified taxable income would be $217,800. The gain therefore sits above that other taxable income rather than at the bottom of the preferential rate structure, and under the stated assumptions it falls entirely within the applicable 2026 married-filing-jointly 15% long-term capital-gain band.

    $40,000
    Eligible long-term capital gain
    15%
    Applicable long-term rate band
    $6,000
    Regular federal LTCG tax attributable to the gain

    This is why comparing a gain on its own to a preferential-rate threshold is misleading. A $40,000 gain is not “below the threshold, therefore 0%.” The thresholds are measured against taxable income, and the rest of the return has already occupied part of that space.

    The same gain enters another calculation

    The Net Investment Income Tax is a separate federal calculation with its own mechanics. It is not part of the capital-gain rate.

    $290,000
    MAGI
    $250,000
    MFJ NIIT threshold
    $40,000
    MAGI excess

    The tax applies to the lesser of the MAGI excess or net investment income:

    $40,000
    MAGI excess
    $40,000
    Net investment income
    3.8%
    NIIT rate applied to the lesser amount
    $1,520
    Net Investment Income Tax

    Notice what each calculation measured. The regular capital-gain calculation looked at taxable-income positioning — $257,800 after the standard deduction. The Net Investment Income Tax calculation looked at MAGI — $290,000 — and at net investment income. The standard deduction reduced taxable income in the first calculation. It did not reduce MAGI in the second.

    Same gain. Different measuring concepts.

    The Pyramid reconverges

    $6,000
    Regular federal LTCG tax
    $1,520
    Net Investment Income Tax
    $7,520
    Modeled incremental federal tax from the gain

    Under the stated assumptions. This is not the household’s total federal tax liability.

    $100,000 sold. $40,000 gained. $7,520 modeled incremental tax effect.

    Same sale. Three different numbers.

    Some gains follow different rules

    The modeled scenario is deliberately ordinary. Special federal treatment can apply in areas such as collectibles, unrecaptured section 1250 gain, depreciation recapture, qualified small business stock, certain business property, employee equity, installment sales, and other specialized transactions.

    The wash-sale rules deserve separate mention: where they apply, a loss can be deferred rather than allowed, with corresponding adjustments to basis and holding period. That can change both sides of the Pyramid at once.

    These are not exotic footnotes so much as a reminder that the Pyramid is a model, not a universal calculator.

    Selling does not mean the tax has been paid

    Calculating the tax consequence of a gain and determining whether enough federal tax has already been paid are two separate questions.

    A brokerage generally does not withhold federal income tax on an ordinary stock sale the way an employer withholds on wages. Whether the liability has been covered depends on withholding from other income and on estimated tax payments, which have their own timing rules.

    A realized gain is not a paid tax.

    Return to the Pyramid

    We started with $100,000. That’s what was sold.

    Basis changed the picture: $40,000. That’s the gain in our simplified transaction.

    Then we gave the gain a household. Married filing jointly. $250,000 of combined W-2 wages. 2026. Standard deduction. No other investment income or capital transactions. Eligible long-term treatment.

    Under those assumptions, the flip produced $7,520 in modeled incremental federal tax from the gain.

    $100,000
    What you sold
    $40,000
    What you gained
    $7,520
    Modeled incremental federal tax from the gain

    Under the stated assumptions. This is not the household’s total federal tax liability.

    Three numbers. One transaction.

    What you sold is not what you gained.

    What you gained is not what the gain actually changed.

    The sale tells us what happened.

    Basis helps tell us what you gained.

    The return tells us what the gain changed.

    Questions readers ask

    How do you calculate a capital gain?

    Generally, the amount realized on the disposition less the adjusted basis in the property. In the modeled scenario, $100,000 less $60,000 produces a $40,000 realized gain.

    Is sale price the same as capital gain?

    No. The sale price, or amount realized, is the size of the transaction. The gain is what remains after adjusted basis.

    Is a long-term capital gain always taxed at 15%?

    No. Preferential long-term treatment operates through rate bands measured against taxable income, and certain categories of gain follow different rate rules entirely. The 15% band applied in this article because of the stated household facts, not because 15% is a universal long-term rate.

    Can capital losses offset capital gains?

    Generally yes, and the $3,000 figure does not limit that. Capital losses first offset capital gains through the netting process.

    Can I only use $3,000 of capital losses?

    No. The $3,000 limitation applies to how much overall net capital loss most individuals can deduct against other income in a year, generally $1,500 for married taxpayers filing separately, with the excess generally carried forward.

    Does selling stock automatically pay the tax?

    Not by itself. An ordinary brokerage sale generally does not withhold the eventual federal tax on the gain. Payment depends on withholding elsewhere and on estimated tax payments.

    Does missing basis on Form 1099-B mean basis is zero?

    No. An unreported basis is an unestablished basis, not a zero basis. It still has to be supported from your records.

    Why did the PRISM Pyramid produce $7,520?

    Because of the assumptions stated in the article: 2026, married filing jointly, $250,000 of combined W-2 wages, a $100,000 amount realized against a $60,000 adjusted basis, a $40,000 recognized eligible long-term capital gain, the standard deduction, and no other investment income or capital transactions. Under those facts, $6,000 of regular federal long-term capital-gain tax and $1,520 of Net Investment Income Tax are attributable to the gain.

    $7,520 is a modeled incremental federal tax effect under those stated assumptions. It is not the household’s total federal income tax liability, not a universal tax on a $40,000 gain, not a universal 18.8% capital-gain rate, and not individualized tax advice. Changing income, basis, filing status, holding period, losses, qualified dividends, NIIT facts, asset type, or other return-level facts can change the result.

    Where this goes next

    A sale is one fact. What that fact does to a federal return depends on basis, holding period, netting, the rest of the return, and any provisions that apply to the specific property.

    If you want to see how a specific sale interacts with the rest of your year before it becomes an outcome, that is what the tax projection is for. If the position is complex, you can also work with a tax professional.

    This article is for educational purposes and illustrates general U.S. federal income tax mechanics. The $100,000 amount realized, $60,000 adjusted basis, $40,000 eligible long-term capital gain, $250,000 of combined W-2 wages, and the resulting $6,000 of regular long-term capital-gain tax, $1,520 of Net Investment Income Tax, and $7,520 of modeled incremental federal tax are simplified illustrative figures under the assumptions stated above — not a computation of anyone’s tax and not the household’s total federal tax liability. Actual treatment depends on the complete facts and circumstances, including basis substantiation, tax-lot identification, holding period, netting and carryforwards, taxable-income composition, applicable federal provisions, and state and local taxation, which is outside the scope of this article. Primary federal authority for these concepts includes Internal Revenue Code sections 61, 1001, 1011, 1012, 1014, 1015, 1091, 1211, 1212, 1221, 1222, 1223, 1(h), and 1411, and IRS Publications 544 and 550. Individual positions should be reviewed with a qualified tax professional before acting.

    Related reading

    PRISM uses Google Analytics to measure how the site is used. Until you allow it, no analytics or advertising cookies are set and Google receives only an anonymous, cookieless signal. Nothing you type into a form is ever sent to Google. See our privacy policy.