MAGI Calculator Explained: The Roth IRA Modified Adjusted Gross Income Formula in Plain English

Modified Adjusted Gross Income sounds like a technicality until a Roth contribution you already made becomes an excess contribution. This guide walks through the six add-backs on IRS Publication 590-A Worksheet 2-1, the 2025 phase-out band, why five different MAGIs live under the same acronym, and how to bring MAGI down before December 31.

#finance#tax#magi#roth-ira#us#retirement#irs

Why MAGI exists at all

Modified Adjusted Gross Income is not a number the IRS asks for on the 1040. It never appears on the main return. Instead, it appears in the worksheets attached to about a dozen different tax provisions — Roth IRA contribution eligibility, the traditional IRA deduction phase-out, the Premium Tax Credit, the Net Investment Income Tax, the IRMAA Medicare surcharge, education credits, the Saver's Credit — and the definition changes from provision to provision. Same name, different formula, different consequence if you get it wrong.

The MAGI calculator on this site implements the Roth IRA definition, taken directly from Worksheet 2-1 of IRS Publication 590-A. It is the version taxpayers reach for most often, because the answer decides whether the Roth contribution you already made is legal, or whether you owe a 6% excise tax on the whole thing. This article walks through what MAGI is, why the Roth version adds back the specific items it adds back, and how the 2025 phase-out band converts your MAGI into a contribution limit.

The arithmetic is deliberately simple — a handful of additions and a linear phase-out. The work is knowing which MAGI variant you are computing and pulling the right numbers off the right lines of Schedule 1 and Form 2555. Get either wrong and the answer is confidently, silently wrong.

What MAGI actually is

Start with Adjusted Gross Income, the figure on Form 1040 Line 11. AGI is your total income (wages, interest, dividends, capital gains, business income, retirement distributions, Social Security up to the taxable portion) minus a list of “above-the-line” adjustments that Congress has chosen to allow before AGI is computed — educator expenses, HSA contributions, half of self-employment tax, the deductible portion of self-employed health insurance, alimony under pre-2019 divorce decrees, traditional IRA contributions, and student loan interest, among others. AGI is a real, defined tax term used everywhere from state tax returns to college financial aid forms.

MAGI is AGI plus some of those adjustments added back. Which adjustments depends on which MAGI you need. The Roth IRA MAGI on Pub 590-A Worksheet 2-1 uses this formula:

MAGI = AGI
     + traditional IRA deduction     (Schedule 1 Line 20)
     + student loan interest         (Schedule 1 Line 21)
     + foreign earned income exclusion
     + foreign housing exclusion / deduction  (Form 2555)
     + excluded U.S. savings bond interest    (Form 8815)
     + excluded employer adoption benefits    (Form 8839)

Feed AGI and those add-backs into the MAGI calculator and it returns MAGI plus the resulting Roth IRA contribution allowance for 2025. If you have not computed AGI yet, run the AGI calculator first — the MAGI computation only starts once AGI is a fixed number.

Worked example: a single filer at $92,000 AGI

Consider a single filer under age 50. Form 1040 Line 11 shows AGI of $92,000. On Schedule 1, they deducted $5,500 of traditional IRA contributions (Line 20) and the maximum $2,500 of student loan interest (Line 21). They have no foreign income, no savings bond interest, and no adoption benefits.

MAGI = $92,000 + $5,500 + $2,500 + $0 + $0 + $0 = $100,000.

The 2025 single-filer Roth IRA phase-out band starts at $150,000 and ends at $165,000 (Notice 2024-80). $100,000 MAGI is well below the floor, so this taxpayer can contribute the full $7,000 annual limit ($8,000 with the 50-and-over catch-up).

Now change one input. Suppose their AGI was $150,000, not $92,000 — perhaps they got a large bonus. MAGI would be $158,000, which sits inside the phase-out band. The formula in IRC §408A(c)(3) reduces the allowance proportionally:

Allowed contribution = base limit × (upper − MAGI) / band width
                    = $7,000 × ($165,000 − $158,000) / $15,000
                    = $7,000 × 0.4667
                    ≈ $3,270  (IRS rounds to the nearest $10)

Feed the same numbers into the MAGI calculator and it prints the same $3,270 allowance. Above $165,000 MAGI, the allowance is zero — a direct Roth contribution is prohibited, though the backdoor Roth route via the IRA calculator workflow is still available if there is no pretax traditional IRA balance.

The five MAGIs and why they disagree

Every MAGI variant answers the same policy question in slightly different language: what is the taxpayer's true economic income for the purpose of this benefit? Each variant then picks the add-backs that would otherwise let someone shrink AGI just to sneak under a threshold.

Roth IRA MAGI (Pub 590-A Worksheet 2-1)

The one this calculator implements. Adds back the traditional IRA deduction, student loan interest, foreign earned income exclusion, foreign housing exclusion, excluded savings bond interest, and excluded adoption benefits. Purpose: decide whether a direct Roth contribution is allowed under IRC §408A(c)(3).

Traditional IRA deductibility MAGI (Pub 590-A Worksheet 1-1)

Almost identical to the Roth version, but does not add back the traditional IRA deduction itself. That would be circular — you cannot use the same deduction to decide whether the deduction is allowed. Used when the taxpayer (or spouse) is covered by a workplace retirement plan and the deduction phases out. Compute the deductible portion with the IRA calculator.

Premium Tax Credit MAGI (IRC §36B(d)(2)(B))

Completely different list. Adds back only three items to AGI: tax-exempt interest, non-taxable Social Security benefits, and foreign earned income excluded from tax. Purpose: decide the subsidy for ACA marketplace health insurance. Because a subsidised premium should reflect actual economic capacity, tax-exempt interest is included even though it never touched AGI.

IRMAA MAGI (Medicare Part B / Part D surcharge)

AGI plus tax-exempt interest. Nothing else. This is the thinnest of the MAGI variants. Once IRMAA MAGI crosses the annual thresholds (roughly $106,000 single / $212,000 married for 2025 Medicare Part B premiums, using 2023 tax returns due to the two-year IRMAA look-back), monthly premiums step up in tiers. Roth conversions and large capital gains in a single year can push otherwise-modest retirees into higher IRMAA brackets.

Net Investment Income Tax MAGI (IRC §1411)

AGI plus foreign earned income excluded from tax, minus certain deductions allocable to that excluded income. The 3.8% NIIT applies to the lesser of net investment income or MAGI over $200,000 (single) / $250,000 (married joint). Because it is a flat 3.8% above the threshold, small changes in MAGI can produce small changes in tax — but Roth conversions in the same year that push MAGI over the threshold expose more investment income to the surcharge.

Same acronym, five formulas, five different tax consequences. When any form or worksheet asks for “MAGI,” the first job is to check which definition it means. The MAGI calculator handles the Roth version — for the others, the underlying tax form or Pub 590-A remains the source of truth.

Factors that push MAGI up (or down)

Traditional IRA deductions

Every dollar deducted on Schedule 1 Line 20 is a dollar added back for Roth MAGI. That means a large traditional IRA deduction does not help you dodge the Roth phase-out. If you are near the phase-out edge and want to preserve Roth room, contribute to the Roth directly (which never touched AGI) rather than deducting a traditional contribution and then failing the Roth test.

Student loan interest

Capped at $2,500 per year, but that full $2,500 gets added back for Roth MAGI. In practice this line item rarely moves anyone across the phase-out band alone, but combined with a traditional IRA deduction it can push AGI-plus-add-backs several thousand dollars higher than AGI alone.

Foreign earned income exclusion (Form 2555)

US citizens working abroad can exclude up to $130,000 of foreign earned income for 2025 (Rev. Proc. 2024-40). Whatever is excluded never enters AGI — but for Roth MAGI it is added back in full. A US expat earning $150,000 overseas may see AGI of $20,000 but Roth MAGI of $150,000, which lands mid-phase-out for a single filer. This is the single biggest gotcha in the Roth MAGI computation for internationally mobile Americans.

Employer-sponsored retirement deferrals

Traditional 401(k), 403(b), and 457(b) pre-tax deferrals reduce W-2 Box 1 wages, which means they never enter AGI in the first place. Roth MAGI does not add them back. This is the cleanest way to bring MAGI down when you are close to the phase-out floor: increase traditional 401(k) deferrals for the final pay periods of the year. The 401(k) calculator makes the trade-off between current tax reduction and future Roth eligibility visible.

HSA and cafeteria-plan contributions

HSA contributions made through payroll deduction reduce W-2 Box 1 the same way 401(k) deferrals do. HSA contributions made outside payroll create an above-the-line adjustment on Schedule 1 that reduces AGI directly — and unlike the IRA and student loan deductions, this one is not added back for Roth MAGI. Section 125 cafeteria-plan deductions (health insurance premiums, dependent care FSA) reduce W-2 Box 1 similarly. Together these are the four levers most often used to preserve Roth eligibility.

How to bring MAGI down before year-end

  • Max the traditional 401(k), 403(b), or 457(b). The 2025 employee deferral limit is $23,500, with a $7,500 catch-up at 50+ and a further $11,250 super catch-up for ages 60–63 (SECURE 2.0 §109). Every dollar deferred cuts W-2 Box 1 and does not come back into MAGI.
  • Front-load HSA contributions if you have a qualifying HDHP. The 2025 HSA limit is $4,300 self-only / $8,550 family, plus a $1,000 catch-up at 55+. The deduction is not added back for Roth MAGI. The HSA contribution calculator shows the eligible amount by month if you have part-year HDHP coverage.
  • Time capital gain harvesting. Realised long-term gains land in AGI. If you are close to the phase-out floor and have flexibility over when to sell appreciated securities, splitting a sale across two tax years can keep MAGI under the threshold both years. The capital gains tax calculator shows the federal tax cost of each timing choice.
  • Delay Roth conversions. A Roth conversion is fully taxable and lifts AGI. If a conversion in the same year would blow through the Roth contribution phase-out, either skip the direct Roth contribution that year (do the backdoor instead) or time the conversion for a lower-income year.
  • Do not deduct the traditional IRA if you were going to Roth anyway. The Traditional IRA deduction is added back for Roth MAGI. Contributing non-deductibly and converting is often cleaner than deducting and then getting phased out of the direct Roth.
  • If you are married and file separately, know the trap. The MFS Roth phase-out is $0 to $10,000 unless you lived apart from your spouse for the entire year. Almost every MFS filer with earned income is fully phased out from a direct Roth contribution. The backdoor Roth remains available.

Common mistakes

Using AGI instead of MAGI. The single most common error. AGI is on Line 11; MAGI has to be computed on the worksheet. If your AGI is $148,000 and you assume that is your MAGI for the Roth check, you may conclude you are safely under $150,000 — but if you also deducted a traditional IRA contribution or claimed foreign earned income exclusion, the actual MAGI is higher and you may be inside or past the phase-out band.

Adding back the wrong items. Roth MAGI does not add back HSA contributions, above-the-line educator expenses, half of self-employment tax, or self-employed health insurance. Only the six items on Pub 590-A Worksheet 2-1. Adding back everything you find on Schedule 1 will inflate MAGI and understate your Roth room.

Adding back the Roth contribution itself. Roth contributions are after-tax — they never touched AGI, so there is no deduction to add back. The Roth contribution is the output of the MAGI check, not an input to it.

Applying Roth MAGI to a different provision. If a form asks for MAGI for the Premium Tax Credit, IRMAA, NIIT, or education credits, the add-back list is different. Recompute per the specific form's instructions rather than reusing the Roth number.

Ignoring the two-year IRMAA lag. Medicare premiums for 2025 are determined by 2023 tax returns. Retirees planning Roth conversions often forget that a large conversion this year will raise IRMAA premiums two years later, not this year.

When to talk to a CPA

The Roth MAGI arithmetic is worksheet-simple, and the MAGI calculator handles it cleanly. The situations where professional help pays for itself are the ones that combine multiple MAGI variants at once: a US expat filing Form 2555 who is also on Medicare (Roth MAGI plus IRMAA MAGI), a high-earner considering a large Roth conversion within a few years of Medicare enrollment (NIIT MAGI plus IRMAA MAGI), or a self-employed filer with a SEP or solo 401(k) and marketplace health insurance (Roth MAGI plus PTC MAGI). Each combination has its own optimisation logic, and the wrong sequence can cost thousands of dollars in surcharges and lost credits.

For excess-contribution cleanup — when the year-end MAGI turned out higher than expected and a Roth contribution already sits in the account — a CPA can walk you through the three fixes: corrective distribution before October 15, recharacterisation to a traditional IRA, or recharacterisation followed by conversion. The wrong sequence attracts the 6% excise tax under IRC §4973 for every year the excess remains. Reference the IRS excise tax overview at irs.gov before self-correcting a prior-year excess.

Frequently asked questions

Does my Roth 401(k) contribution reduce MAGI? No. Roth 401(k) deferrals are after-tax, so they never reduce W-2 Box 1 and are not in AGI to begin with — they do not lower MAGI. Only traditional (pre-tax) 401(k), 403(b), and 457(b) deferrals reduce W-2 Box 1 and therefore MAGI.

Do capital gains count in MAGI? Yes. Realised capital gains, dividends, and interest all flow into AGI and then into every MAGI variant. Unrealised gains do not. A large one-time capital gain year can lift MAGI enough to phase out Roth eligibility even if wages are modest.

Does Social Security count in MAGI? The taxable portion of Social Security (up to 85%) is in AGI and therefore in Roth MAGI. Non-taxable Social Security is not in Roth MAGI, though it is in Premium Tax Credit MAGI.

If MAGI is above the Roth phase-out, can I still contribute anything? Not directly. Above $165,000 single or $246,000 married joint in 2025, the direct Roth contribution allowance is zero. The backdoor Roth — a non-deductible traditional contribution followed by a Roth conversion — is still available and is not MAGI-limited, but it only works cleanly if you have no pretax traditional IRA balance because of the pro-rata rule under IRC §408(d)(2).

Is the phase-out band indexed to inflation? Yes, but slowly. The IRS updates the Roth MAGI thresholds each year in a revenue procedure (Notice 2024-80 set the 2025 numbers). The band width — the difference between the upper and lower threshold — stays constant at $15,000 for single filers and $10,000 for married joint; only the anchor moves.

What tax year does the 2025 MAGI limit apply to? The 2025 limits apply to Roth contributions made for the 2025 tax year — that is, deposits designated as 2025 contributions, which you can make from January 2025 through the April 2026 filing deadline. Your 2025 MAGI (computed from your 2025 return) is what the limit is checked against.

Where do I actually enter MAGI on my tax return? Nowhere directly. MAGI is a worksheet number, not a Form 1040 line. It shows up inside Pub 590-A Worksheet 2-1 (Roth), Form 8962 (Premium Tax Credit), Form 8960 (NIIT), Form 8815 (savings bonds), and Form 8839 (adoption benefits) — always as a scratchpad calculation to decide eligibility or the size of a credit.

The one-line summary

For the Roth IRA question, MAGI is AGI plus six specific add-backs from Publication 590-A Worksheet 2-1, and the answer tells you how much of the annual Roth contribution limit you may use. Everything else is application: pick the right add-backs, plug them into the MAGI calculator, read the allowance, and if it says zero, take the backdoor route via the Roth IRA calculator or defer the contribution to a lower-income year. Simple arithmetic, expensive if you get it wrong.

Frequently asked questions

What is the difference between AGI and MAGI?

AGI (Adjusted Gross Income) is the figure on Form 1040 Line 11 — total income minus above-the-line adjustments. MAGI (Modified Adjusted Gross Income) is AGI plus a specific list of those adjustments added back. The list varies by tax provision: the Roth IRA version on Pub 590-A Worksheet 2-1 adds back the traditional IRA deduction, student loan interest, foreign earned income exclusion, foreign housing exclusion, excluded savings bond interest, and excluded adoption benefits. MAGI never appears directly on Form 1040 — it is a worksheet calculation used to test eligibility for benefits like Roth contributions, the Premium Tax Credit, and IRMAA Medicare surcharges.

Does a traditional 401(k) contribution reduce my MAGI for Roth eligibility?

Yes. Traditional 401(k), 403(b), and 457(b) pre-tax deferrals reduce W-2 Box 1 wages before AGI is computed. Because they never enter AGI in the first place, they are not added back for Roth MAGI. Bumping traditional 401(k) deferrals up in the final pay periods of the year is one of the cleanest ways to keep MAGI below the Roth phase-out floor. Roth 401(k) deferrals, by contrast, are after-tax and do not reduce MAGI.

What are the 2025 Roth IRA MAGI phase-out limits?

Per IRS Notice 2024-80: single and head-of-household filers phase out between $150,000 and $165,000 MAGI. Married filing jointly phases out between $236,000 and $246,000. Married filing separately phases out between $0 and $10,000, unless the spouses lived apart for the entire tax year (in which case single-filer limits apply). Inside the band, the allowed contribution is the base limit ($7,000, or $8,000 for age 50+) multiplied by (upper threshold − MAGI) / band width, rounded to the nearest $10.

What happens if my MAGI ends up too high after I already contributed to a Roth?

The contribution is an excess contribution and IRC §4973 charges a 6% excise tax per year until it is removed. Three clean fixes before October 15 of the following year: (1) withdraw the excess plus attributable earnings — the excess is not taxed, the earnings are taxed as ordinary income; (2) recharacterise the Roth contribution as a traditional IRA contribution; (3) leave the excess in place, pay the 6% for the year, then absorb it into a future year when there is Roth room again. A CPA is worth consulting before choosing between these fixes.

Is Roth IRA MAGI the same as Premium Tax Credit MAGI?

No — the add-back lists are different. Roth IRA MAGI (Pub 590-A Worksheet 2-1) adds back six items including the traditional IRA deduction and student loan interest. Premium Tax Credit MAGI (IRC §36B(d)(2)(B)) adds back only three items: tax-exempt interest, non-taxable Social Security benefits, and foreign earned income excluded from tax — it does not add back the IRA deduction or student loan interest. Same acronym, different formula. Always check the specific form or worksheet instructions to see which MAGI is being asked for.

Do capital gains and dividends count toward MAGI?

Yes. All realised investment income — long-term and short-term capital gains, qualified and non-qualified dividends, interest income — flows into AGI and therefore into every MAGI variant. A large capital gain year can push MAGI above the Roth phase-out even when wage income is modest. Unrealised gains do not count. If you have flexibility over the timing of gain realisation, splitting a large sale across two tax years is a legitimate way to keep MAGI under the phase-out floor in both years.

How does the foreign earned income exclusion affect MAGI for Roth?

It affects it dramatically. The foreign earned income exclusion (up to $130,000 for 2025 per Rev. Proc. 2024-40) removes excluded income from AGI — but Roth MAGI adds the full excluded amount back. A US expat earning $150,000 abroad may have AGI of only $20,000 but Roth MAGI of $150,000, which lands mid-phase-out for a single filer. This is the single biggest gotcha in the Roth MAGI computation for internationally mobile Americans and is written directly into IRC §408A(c)(3)(C).

If MAGI is above the Roth phase-out, can I still get money into a Roth?

Yes, via the backdoor Roth. Make a non-deductible traditional IRA contribution (no MAGI limit on non-deductible traditional contributions) and then convert it to Roth. IRC §408A(d)(3) does not impose a MAGI cap on conversions after the 2010 repeal. The backdoor route is only clean if you have no other pretax traditional IRA balance at year-end because IRC §408(d)(2) requires pro-rata treatment across all IRAs — otherwise most of the conversion is taxable. Consult a CPA before executing a backdoor conversion if you have any existing pretax IRA money.

Informational only. Not personalised financial, legal, or tax advice.