Are Long-Term Capital Gains Included in Your AGI?

Yes. Long-term capital gains are included in your adjusted gross income in full. Every dollar of net long-term gain gets added to gross income on your Form 1040 before AGI is calculated, even though those gains later qualify for lower tax rates than wages or interest.1Internal Revenue Service. Definition of Adjusted Gross Income The preferential rate affects what you ultimately pay in capital gains tax. It does not keep the gain out of AGI, and that distinction matters for a long list of other tax items keyed to your income.

How the Gain Gets into AGI

You report capital gains on Schedule D and transfer the net figure to Form 1040, where it joins wages, interest, dividends, business income, and retirement distributions in gross income.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses From that gross income total you subtract above-the-line adjustments such as deductible IRA contributions, student loan interest, and self-employment tax. What remains is your AGI.

Nothing in this sequence carves the gain out. A $100,000 long-term gain raises AGI by exactly $100,000, the same as $100,000 of salary. Many taxpayers assume the favorable rate on long-term gains means the gain is treated separately from the start. It isn’t. The preferential rate shows up only at the final step, when the IRS computes tax on taxable income. Everything in between runs on an AGI figure that includes the gain.

Why Full Inclusion in AGI Matters

AGI, and its close cousin modified AGI, is the gateway number for dozens of tax calculations. When a capital gain inflates AGI, the ripple effects can cost more than the capital gains tax itself.

Net Investment Income Tax

The 3.8% Net Investment Income Tax applies to the lesser of your net investment income or the amount your MAGI exceeds a fixed threshold: $200,000 for single filers, $250,000 for married filing jointly, and $125,000 for married filing separately.3Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax These thresholds are not indexed for inflation. Capital gains count as net investment income and raise MAGI at the same time, so a large gain can trigger the tax on its own. For a filer already in the 20% long-term bracket, the NIIT stacks on top for an effective federal rate of 23.8% on the gain.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax

Medicare Premium Surcharges

Medicare Part B premiums are set using MAGI from two years earlier. The standard 2026 premium is $202.90 per month, and income-related monthly adjustment amounts (IRMAA) can more than triple it. Surcharges begin above $109,000 of MAGI for single filers and $218,000 for joint filers, climbing through five tiers up to a total premium of $689.90 per month at MAGI of $500,000 single or $750,000 joint.5CMS. 2026 Medicare Parts A and B Premiums and Deductibles

This is where capital gains blindside retirees most often. Sell a rental property for a $300,000 gain in 2024, and in 2026 Medicare sees that spike and charges hundreds more per month. The two-year lag means the surcharge arrives well after the sale proceeds may have been spent or reinvested. You can appeal an IRMAA increase after a qualifying life-changing event, but selling an asset is not one of those events.

Social Security Benefit Taxation

If you receive Social Security, a capital gain can make more of your benefits taxable. The IRS uses “combined income,” which is AGI plus any tax-exempt interest plus half of your Social Security benefits.6Internal Revenue Service. IRS Reminds Taxpayers Their Social Security Benefits May Be Taxable Because the gain is in AGI, it feeds directly into this formula. The thresholds haven’t been adjusted since 1984: for single filers, combined income above $25,000 makes up to 50% of benefits taxable and above $34,000 makes up to 85% taxable; for joint filers, those breakpoints are $32,000 and $44,000.7Office of the Law Revision Counsel. 26 USC 86 – Social Security and Tier 1 Railroad Retirement Benefits

Most retirees with any investment income already clear the lower threshold on wages and pensions alone. A gain of even $10,000 to $20,000 can push combined income past the upper threshold, moving 85% of benefits into taxable territory instead of 50%. The effective marginal cost on the gain is higher than the capital gains rate alone suggests, because the gain drags additional Social Security dollars onto the tax return with it.

ACA Premium Tax Credit

If you buy coverage through a marketplace plan, the premium tax credit is calculated from household income starting with AGI. The IRS specifically lists realizing capital gains, including sales of stocks, bonds, or cryptocurrency, as an event that can change your credit amount.8Internal Revenue Service. Questions and Answers on the Premium Tax Credit An early retiree living on $50,000 of investment income might qualify for a substantial subsidy; a $100,000 gain can slash the credit by thousands and lead to repayment of the advance credits received during the year.9Office of the Law Revision Counsel. 26 USC 36B – Refundable Credit for Coverage Under a Qualified Health Plan

Roth IRA Contribution Eligibility

Roth IRA eligibility runs on MAGI. For 2026, the phase-out range is $153,000 to $168,000 for single filers and $242,000 to $252,000 for joint filers. Above the upper limit, direct Roth contributions aren’t allowed. A gain late in the year can retroactively disqualify contributions you already made, which creates excess contribution problems that have to be fixed before the filing deadline.

Deductions and Credits with AGI Floors or Phase-Outs

Medical expenses are only deductible to the extent they exceed 7.5% of AGI.10Office of the Law Revision Counsel. 26 USC 213 – Medical, Dental, Etc., Expenses If your AGI is normally $80,000, the floor is $6,000; a $200,000 gain raises AGI to $280,000 and lifts the floor to $21,000, wiping out a deduction you would otherwise take.

The student loan interest deduction (up to $2,500) phases out for 2026 starting at $85,000 of MAGI for single filers and $175,000 for joint filers, disappearing at $100,000 and $205,000.11Internal Revenue Service. Topic No. 456, Student Loan Interest Deduction The Child Tax Credit begins phasing out above $200,000 of income for most filers and $400,000 for joint filers.12Internal Revenue Service. Child Tax Credit Capital gains count toward both thresholds. A family earning $180,000 in wages keeps the full credit, but a $50,000 gain puts them past $200,000 and starts the phase-out.

Capital Losses Work the Other Direction

If capital losses exceed capital gains for the year, you can use up to $3,000 of the net loss ($1,500 if married filing separately) against other income, which directly reduces AGI.13Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Anything beyond $3,000 carries forward indefinitely, keeping its short-term or long-term character and offsetting gains in future years.14IRS. 2025 Instructions for Schedule D (Form 1040) Taxpayers who realize a large gain sometimes deliberately harvest losses in the same year to offset it, holding AGI down and preserving access to income-sensitive benefits.

How the Preferential Rate Still Applies

Long-term capital gains do get taxed at lower rates, just not through AGI. After AGI is reduced by deductions to reach taxable income, the gain is pulled out and taxed under its own schedule.15Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed For 2026 the brackets are:16Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026

  • 0% on taxable income up to $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household)
  • 15% from those thresholds up to $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household)
  • 20% above those upper limits

The brackets stack. Ordinary income fills them first, then the gain layers on top, and each dollar of gain is taxed at the rate for the bracket it lands in. A single filer with $40,000 of ordinary taxable income and a $20,000 long-term gain sees the first $9,450 of the gain fall in the 0% zone and the remaining $10,550 taxed at 15%.

Some long-term gains are taxed under different ceilings. Collectibles like coins, art, and antiques are capped at 28%.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses Unrecaptured section 1250 gain, the portion of a real property sale attributable to depreciation previously claimed, is taxed at a maximum rate of 25%.15Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed Both still flow through AGI like any other gain, so the downstream effects on credits, deductions, and premiums are identical.