Learn · Medicare & Income Planning

How to calculate MAGI for IRMAA: a line-by-line worksheet

The income figure that sets your Medicare surcharge is not your salary, not your taxable income, and not quite your AGI. It is two numbers from a tax return you filed two years ago, added together. Here is exactly which lines to read, which look-alike lines to ignore, and a worked example you can copy with your own return open beside you.

By Casmir Mason — family-office CFO
Updated September 2026 · 2026 premium year
Educational — not tax advice
The short version

IRMAA MAGI = adjusted gross income + tax-exempt interest. On the 2024 Form 1040 that is line 11 plus line 2a, and nothing else. Social Security uses the return from two years before the premium year, so your 2026 Medicare premiums were set by your 2024 return, and the income you earn in 2026 sets your 2028 premiums. Everything that lands in AGI counts: wages, pensions, IRA and 401(k) withdrawals, Roth conversions, capital gains, dividends, rental income, deferred-compensation payouts and the taxable part of Social Security. Qualified Roth withdrawals, HSA money spent on medical care, QCDs and the non-taxable part of Social Security never reach AGI, so they never reach IRMAA. Once you have your number, the IRMAA calculator shows which tier it lands in and how far you are from the next one.

The formula: AGI plus tax-exempt interest

"Modified adjusted gross income" means something different almost every place it appears in the tax code. For Medicare's income-related monthly adjustment amount, it is the simplest version there is. Social Security's operating manual defines it as the sum of your adjusted gross income (Form 1040, line 11) and your tax-exempt interest income (Form 1040, line 2a) (SSA POMS HI 01101.010). The consumer-facing version on ssa.gov says the same thing in one sentence: your MAGI is your total adjusted gross income and tax-exempt interest income.

That is the entire modification. The job is finding the right two numbers on a return you have already filed, and understanding what put them there.

One note on line numbers. The IRS redesigned Form 1040 for the 2025 tax year: AGI now sits on line 11a, repeated as line 11b at the top of page 2 (2025 Form 1040). Tax-exempt interest is still line 2a. Line numbers shift from year to year, so always match the label, "adjusted gross income", and not just the number.

Which year's return: the two-year lookback

Social Security uses the most recent tax information the IRS can provide. In practice that is the return from two years before the premium year. If that return is not yet available, SSA can fall back to the return from three years before and correct the figure once the newer one arrives (POMS HI 01101.010).

Medicare premium yearTax return usedCan you still change it?
20262024 return (filed in 2025)No, only by amending an incorrect return
20272025 return (filed in 2026)No, the income year has closed
20282026 return (to be filed in 2027)Yes, until 31 December 2026

So the worksheet below serves two purposes. Run it on your 2024 return to check the premium you pay now; run it on a projection of 2026 to estimate your 2028 premium while you can still act.

The IRMAA MAGI worksheet

Lines 1 through 8 are already summed into total income on line 9, and line 10 adjustments are subtracted to reach AGI, so you do not need to rebuild AGI yourself. The worksheet shows each component so you can see what drives the number; the only two figures you actually add are the bold rows. Line references are to the 2024 Form 1040, the return used for 2026 premiums (IRS Form 1040 instructions).

IRMAA MAGI worksheet. Line numbers from the 2024 Form 1040. Running total uses the worked example below.
Line itemWhere on Form 1040In IRMAA MAGI?ExampleRunning total
Wages, including most deferred-comp payoutsLine 1zYes, via AGI$0$0
Taxable interestLine 2bYes, via AGI$6,000$6,000
Ordinary dividends (qualified dividends on 3a are already inside this)Line 3bYes, via AGI$14,000$20,000
IRA distributions, taxable amount: RMDs and Roth conversions (QCDs already removed)Line 4bYes, via AGI$100,000$120,000
Pensions and annuities, taxable amount (including 401(k) withdrawals)Line 5bYes, via AGI$48,000$168,000
Social Security, taxable amountLine 6bYes, via AGI$52,700$220,700
Capital gain or (loss)Line 7Yes, via AGI$22,000$242,700
Other income from Schedule 1: net rental, business, otherLine 8Yes, via AGI$9,000$251,700
Adjustments to income (HSA deduction, deductible IRA, SE tax)Line 10Subtracted, via AGI($0)$251,700
Adjusted gross incomeLine 11Add: step 1$251,700$251,700
Tax-exempt interestLine 2aAdd: step 2$18,000$269,700
Standard or itemized deduction, taxable incomeLines 12–15No, below AGI—IRMAA MAGI: $269,700

If you only want the answer: line 11 + line 2a. The rows above that are there so you can trace why your AGI is what it is, and which rows you might be able to influence in a year that has not closed yet.

A worked example, start to finish

Consider a married couple, both 73, filing jointly. Their 2024 return is the one Social Security used to set their 2026 Medicare premiums. During 2024 they:

  • took a $60,000 RMD from traditional IRAs, and separately sent $10,000 directly from an IRA to charity as a qualified charitable distribution;
  • converted $40,000 of traditional IRA money to Roth;
  • received a $48,000 pension, $62,000 of Social Security, $6,000 of bank and Treasury interest, $14,000 of dividends and $18,000 of municipal bond interest;
  • realized a $22,000 net long-term gain and netted $9,000 from a rental property;
  • withdrew $25,000 from a Roth IRA they had held for many years, and $4,000 from an HSA to pay medical bills.

Walking it through:

  1. IRA lines. Line 4a shows $110,000 gross (RMD + QCD + conversion). Line 4b, the taxable amount, shows $100,000, because the $10,000 QCD is excluded. Only 4b counts.
  2. Social Security. With this much other income, the maximum 85% of benefits is taxable: $52,700 on line 6b. The other $9,300 on line 6a stays out.
  3. Everything else in AGI flows through lines 2b, 3b, 5b, 7 and 8 as shown in the worksheet. The couple had no above-the-line adjustments, so line 11 AGI is $251,700.
  4. Add back tax-exempt interest. The $18,000 of muni interest on line 2a goes back in: $269,700.
  5. Ignore what never reached AGI. The $25,000 qualified Roth withdrawal, the $4,000 HSA distribution, the $10,000 QCD and the $9,300 non-taxable Social Security contribute nothing.

That $269,700 is above the $218,000 joint threshold SSA lists for 2026 (POMS HI 01101.010), so both spouses pay a surcharge on Part B and Part D in 2026. Which tier it lands in, and what that tier costs per person, is set out in the bracket table in our guide on how to avoid IRMAA. We keep the figures in one place so they stay current. The quicker route is to type $269,700 into the IRMAA calculator, which returns the tier, the annual cost and the headroom to the next threshold.

Notice two things about this example. The $40,000 Roth conversion and the $18,000 of munis together added $58,000 to MAGI. Without both, the couple would have been under the first threshold. And the $10,000 QCD did exactly what it was meant to do: it satisfied part of the giving and none of the income test.

Run your own numbers: the IRMAA calculator takes the MAGI you just worked out, shows your Part B and Part D surcharge, and tells you how much room you have before the next cliff.

What is included

Anything that reaches AGI is in IRMAA MAGI at 100%, with no special treatment. The items that most often surprise retirees:

  • Traditional IRA and 401(k) withdrawals, including RMDs, reported as taxable amounts on lines 4b and 5b (IRS Pub. 590-B).
  • Roth conversions. The taxable portion of a conversion lands on line 4b in the year it is done. For how conversions interact with the tiers, see the two-year echo section of the avoidance guide.
  • Capital gains, including gains taxed at 0%. A long-term gain can be tax-free at the federal level and still count in full toward IRMAA, because it is still inside AGI.
  • Qualified dividends, for the same reason. The preferential rate applies to the tax, not to AGI.
  • The taxable portion of Social Security, up to 85% of benefits.
  • Pensions and annuity income, rental income net of expenses, and business income.
  • Deferred-compensation payouts. Distributions from a nonqualified deferred-compensation plan are ordinary income when paid, usually reported on a W-2, and go straight into AGI. Because payout dates are often locked in years in advance, they deserve their own planning. We cover that in how deferred compensation affects IRMAA.
  • Tax-exempt interest, the one item that is not in AGI but is added back anyway. Municipal bond interest is invisible to your income tax and fully visible to Medicare.

What is excluded

The flip side of a formula this simple is that anything outside AGI, other than tax-exempt interest, is outside the test entirely:

  • Qualified Roth IRA withdrawals. Not in AGI, so not in IRMAA MAGI. We compare how Roth money is treated across every income test in do Roth withdrawals count as income?
  • HSA distributions for qualified medical expenses, which are excluded from income (IRS Pub. 969).
  • Qualified charitable distributions, which are excluded from the taxable amount on line 4b. Details in our QCD rules for 2026.
  • The non-taxable portion of Social Security: at least 15% of benefits, and more at lower incomes.
  • Return of basis when you sell a taxable-account holding. Only the gain is income; the cost basis you get back is not.
  • Loan proceeds, including reverse-mortgage draws and securities-based lines of credit. These are debt, not income.

Deductions work the other way. Only above-the-line adjustments on line 10, such as a deductible HSA contribution or self-employment deductions, lower IRMAA MAGI. The standard deduction, itemized deductions and the additional senior deduction introduced for 2025 through 2028 all come off after AGI, so they reduce your tax but not your IRMAA MAGI.

The look-alike lines that trip people up

Most errors in do-it-yourself IRMAA estimates come from reading the right section of the form but the wrong column. Form 1040 pairs several items as "a" and "b" lines, and they are not interchangeable:

  • 2a vs 2b. 2b (taxable interest) is already in AGI. 2a (tax-exempt interest) is the add-back. Add 2a once. Do not add 2b again.
  • 3a vs 3b. Qualified dividends on 3a are a subset of ordinary dividends on 3b. Adding both double-counts.
  • 4a/5a vs 4b/5b. The "a" lines are gross distributions, including rollovers and QCDs. Only the taxable "b" amounts are in AGI.
  • 6a vs 6b. Gross Social Security benefits vs the taxable portion. IRMAA uses only 6b, via AGI.
  • Line 11 vs line 15. Taxable income (line 15) is lower than AGI by your deductions. IRMAA uses AGI.

One more: IRMAA uses the MAGI from your return, so the filing status on that return matters. Joint filers are measured on combined MAGI against the joint thresholds. Married filing separately, if you lived together at any point in the year, is measured on a much harsher scale, covered in the avoidance guide.

How IRMAA MAGI differs from other MAGIs

If you have calculated MAGI for a different purpose, you may have calculated a different number. ACA marketplace MAGI adds back tax-exempt interest plus the non-taxable part of Social Security and excluded foreign earned income, so the same household can have an ACA MAGI thousands of dollars higher than its IRMAA MAGI. The net investment income tax uses yet another variant.

Rather than repeat it here, we keep a side-by-side of five MAGI definitions (ACA, IRMAA, Social Security provisional income, NIIT and IRA deduction) in do Roth withdrawals count as income? The one to take away for Medicare is that IRMAA's is the shortest: AGI plus tax-exempt interest, and it stops there.

Estimating a future year's MAGI

Checking last year's figure tells you what you are paying. The more useful exercise is running the same worksheet on the year that is still open. As of autumn 2026, that is the 2026 tax year, which sets 2028 premiums.

  1. Start from your fixed income. Pension, the taxable portion of Social Security, and this year's RMD.
  2. Add the year-to-date variable items. Realized gains and losses, interest and dividends, projected to year-end. Include muni interest.
  3. Add anything scheduled. Deferred-comp installments, a planned property sale, year-end mutual fund capital-gain distributions.
  4. Subtract what will not reach AGI. Planned QCDs come off the IRA figure. Roth and HSA withdrawals were never in it.
  5. Compare to the thresholds, knowing that the thresholds for 2028 have not been announced yet. They are inflation-indexed except for the top tier, so the current year's numbers are a reasonable but imperfect guide.

The gap between your estimate and the next threshold is your room for a discretionary decision before 31 December: a Roth conversion, a gain harvest, an extra distribution. The IRMAA calculator does that headroom calculation directly. The Roth conversion calculator puts the one-year premium cost next to the lifetime tax effect, so you can decide whether crossing a line is worth it. And if a genuine life-changing event, such as retirement, has pushed your current income well below the two-year-old figure, the fix is an appeal, not a recalculation. See our guide to Form SSA-44.

If the MAGI on your IRMAA notice does not match your return, for example after an amended return, contact Social Security with the corrected figures.

Frequently asked questions

Take the adjusted gross income from your federal return and add your tax-exempt interest. That is the whole formula. Social Security uses the return from two years before the premium year, so 2026 premiums are based on your 2024 return: AGI on Form 1040 line 11 plus tax-exempt interest on line 2a.
Two lines: adjusted gross income (line 11 on the 2024 Form 1040; line 11a on the redesigned 2025 form, repeated as 11b at the top of page 2) and tax-exempt interest on line 2a. Add them together. Taxable income further down the form is not used, so the standard deduction and itemized deductions do not reduce IRMAA MAGI.
Only the taxable portion, which is the amount on Form 1040 line 6b, up to 85% of your benefits. The non-taxable portion never enters AGI and IRMAA does not add it back. That differs from ACA marketplace MAGI, which does add non-taxable Social Security back in.
One item: tax-exempt interest. IRMAA MAGI is AGI plus the tax-exempt interest reported on line 2a, typically municipal bond interest. If you hold no tax-exempt bonds or bond funds, your IRMAA MAGI and your AGI are the same number.
Yes. The taxable amount of a Roth conversion is reported on Form 1040 line 4b, flows into AGI and therefore into IRMAA MAGI dollar for dollar. Because of the two-year lookback, a conversion done in 2026 affects your 2028 Medicare premiums. Later qualified Roth withdrawals do not count.
No. A qualified charitable distribution is excluded from the taxable amount on line 4b, so it never reaches AGI and never reaches IRMAA MAGI. The gross distribution still appears on line 4a, which is why you should always read the taxable column, not the gross one.