What Is MAGI? How to Calculate Modified Adjusted Gross Income

By Markets & Investing DeskUpdated Nov 10, 2026

MAGI
Illustration · Fintrev

Definition

MAGI is your adjusted gross income with certain deductions and exclusions added back. The IRS and federal programs use it to test eligibility, and each rule defines its own version.

Key takeaways

  • MAGI starts from AGI and adds back specific items, such as the deductible traditional IRA contribution, the student loan interest deduction, excluded foreign income or tax-exempt interest, depending on the rule.
  • Because MAGI only adds items back, it is equal to or higher than AGI. For many filers with simple returns, the two numbers are identical.
  • MAGI is measured before the standard deduction or itemized deductions, and before taxes are calculated.
  • Roth IRA eligibility, traditional IRA deductibility, ACA marketplace subsidies, Medicaid, the net investment income tax and Medicare premium surcharges all depend on a version of MAGI.
  • Itemized deductions such as mortgage interest or charitable gifts do not lower MAGI. Pre-tax workplace retirement contributions and HSA contributions do.

MAGI (modified adjusted gross income) is your adjusted gross income (AGI) with certain deductions and exclusions added back. The IRS and federal programs use it as an eligibility test. It decides whether you can contribute to a Roth IRA, whether a traditional IRA contribution is deductible, how large an Affordable Care Act premium tax credit you receive, and whether surtaxes and surcharges apply. There is no single MAGI. Each tax rule that uses it defines its own version, so the same return can produce different MAGI figures for different purposes.

What Is MAGI?

The abbreviation stands for modified adjusted gross income, and the meaning comes from that word. Adjusted gross income is your total income minus a set of “above-the-line” adjustments. Some of those adjustments, and some income the tax code excludes entirely, would make a taxpayer look less well off than they are. When Congress wants an income test that ignores those reductions, it writes a MAGI definition that puts them back.

So MAGI is a measure of income used to test eligibility, not a figure you pay tax on. Your tax bill is computed on taxable income, which comes after the standard or itemized deduction. MAGI sits one step earlier, before those deductions, which is why the answer to “is MAGI before or after the standard deduction?” is before.

MAGI is a U.S. federal concept tied to the Internal Revenue Code and to programs administered by the IRS, the Health Insurance Marketplace and state Medicaid agencies. Some states also use MAGI-style tests for their own credits, but each state sets its own rules.

How MAGI Works

Calculating MAGI

In most cases, the calculation takes three steps.

  1. Total your gross income. This is income from all sources that the tax code does not exclude.
  2. Subtract the above-the-line adjustments to get AGI.
  3. Add back the items the specific MAGI definition requires.

Step 1: Gross income. Gross income includes, among other things:

  • Wages, salaries and tips
  • Business and farm income
  • Interest and dividends
  • Capital gains realized when you sell an asset for a profit
  • Rental and royalty income
  • Taxable retirement income, such as pension payments and traditional IRA or 401(k) distributions
  • The taxable portion of Social Security benefits
  • Alimony received under a divorce or separation agreement executed before 2019

Alimony received under an agreement executed after 2018 is not income to the recipient. Neither are payments under an older agreement that was later modified to state expressly that the payments are not deductible by the payer.

On recent versions of Form 1040, total income appears on line 9. Line numbers can move between tax years, so check the label as well as the number.

Step 2: AGI. AGI equals gross income minus adjustments reported on Schedule 1 (Form 1040). Common adjustments include:

  • Educator expenses
  • Certain business expenses of reservists, performing artists and fee-basis government officials
  • Health savings account (HSA) contributions made outside payroll
  • Moving expenses for members of the armed forces moving under military orders
  • The deductible part of self-employment tax (half of it)
  • Self-employed health insurance premiums
  • Contributions to SEP, SIMPLE and other self-employed retirement plans
  • Penalties on early withdrawal of savings
  • Deductible traditional IRA contributions
  • Student loan interest

AGI is on line 11 of recent Form 1040s. You can read it straight off a filed return. That is the quickest way to calculate MAGI from a tax return: start from that line and apply the add-backs for the rule you are testing.

Step 3: Add-backs. Which items return depends on the purpose. Depending on the definition, the possible add-backs include:

  • The traditional IRA deduction
  • The student loan interest deduction
  • The foreign earned income exclusion and the foreign housing exclusion or deduction
  • Excluded interest from Series EE and I savings bonds used for higher education
  • Excluded employer-provided adoption benefits
  • Tax-exempt interest, such as interest from municipal bonds
  • The nontaxable portion of Social Security benefits

The general formula is:

MAGI = AGI + the add-backs required by the specific rule

Different MAGI definitions for different rules

The table summarizes the most widely used definitions. Each one is the statutory version, simplified.

Purpose Starts from Adds back (main items)
Roth IRA contribution limit AGI, excluding income from Roth conversions and from rollovers of qualified plans into a Roth IRA Traditional IRA deduction, student loan interest deduction, foreign earned income and housing exclusions, excluded savings bond interest, excluded adoption benefits
Traditional IRA deduction AGI figured without the IRA deduction Student loan interest deduction, foreign exclusions, excluded savings bond interest, excluded adoption benefits
Student loan interest deduction AGI figured without the student loan interest deduction Foreign earned income and housing exclusions
ACA premium tax credit AGI Untaxed foreign income, nontaxable Social Security benefits, tax-exempt interest
Net investment income tax AGI Foreign earned income exclusion (net of related deductions)
Medicare IRMAA surcharges AGI Tax-exempt interest
Rental real estate passive loss allowance AGI, figured without passive activity losses and certain other items IRA deduction, student loan interest deduction, taxable Social Security, foreign exclusions and others listed in the Form 8582 instructions

Two consequences follow from this table. First, a deductible traditional IRA contribution reduces ACA MAGI, because the marketplace definition does not add it back. It does not reduce Roth IRA MAGI, because that definition does. Second, municipal bond interest is free of federal income tax but still counts toward ACA MAGI and the MAGI used for Medicare surcharges.

Interpreting MAGI

A MAGI figure only means something against the threshold of the rule it was built for. Most of those rules use a phase-out range. Below the lower bound you get the full benefit, inside the range you get a partial one, and above the upper bound you get nothing. Other rules are cliffs or surtax triggers. The net investment income tax, for example, applies a 3.8% tax to the lesser of net investment income or the amount by which MAGI exceeds $200,000 (single), $250,000 (married filing jointly) or $125,000 (married filing separately). Those thresholds have not been indexed for inflation since the tax took effect in 2013.

Filing status matters as much as the dollar figure. Married couples filing separately who lived together during the year face very narrow ranges for IRA purposes, as the tables below show.

Why Is MAGI Important?

Roth IRA contributions

Roth IRAs are funded with after-tax money, and qualified withdrawals come out tax-free. Eligibility to contribute depends on MAGI, and inside the phase-out range MAGI also sets how much you may contribute.

Filing status 2025 phase-out range 2026 phase-out range
Married filing jointly or qualifying surviving spouse $236,000 to $246,000 $242,000 to $252,000
Single, head of household, or married filing separately and did not live with spouse during the year $150,000 to $165,000 $153,000 to $168,000
Married filing separately and lived with spouse at any time during the year $0 to $10,000 $0 to $10,000

At or above the top of the range, you cannot make a direct Roth contribution for that year. The overall IRA contribution limit, which is shared between traditional and Roth IRAs, is $7,000 for 2025 and $7,500 for 2026 for savers under the catch-up age.

If you contribute more than you are allowed, the excess is taxed at 6% for each year it stays in the account. Withdrawing the excess before the deadline avoids the penalty. This is a practical reason to calculate Roth MAGI before contributing rather than after the year ends.

Traditional IRA deductions

Anyone with earned income can contribute to a traditional IRA regardless of income. MAGI only controls whether the contribution is deductible, and only when you or your spouse is covered by a retirement plan at work, such as a 401(k).

Situation 2025 phase-out range 2026 phase-out range
Single or head of household, covered by a workplace plan $79,000 to $89,000 $81,000 to $91,000
Married filing jointly or qualifying surviving spouse, covered by a workplace plan $126,000 to $146,000 $129,000 to $149,000
Married filing jointly, not covered but spouse is covered $236,000 to $246,000 $242,000 to $252,000
Married filing separately, you or your spouse covered $0 to $10,000 $0 to $10,000

If neither spouse is covered by a workplace plan, the full contribution is deductible at any income. A contribution that is not deductible can still be made. It becomes after-tax basis in the IRA, which you track on Form 8606.

Health coverage: the premium tax credit and Medicaid

MAGI determines eligibility for the premium tax credit, which lowers the cost of plans bought through a federal or state Health Insurance Marketplace. The marketplace uses estimated household MAGI for the coverage year, and the credit is reconciled against actual MAGI on your tax return. State Medicaid programs and CHIP also use MAGI-based rules to test income for most applicants.

This version matters most for people who retire before 65, when Medicare starts. In early retirement, MAGI is often driven by choices rather than a salary: traditional IRA and 401(k) withdrawals, Roth conversions, realized capital gains, interest and dividends, plus any Social Security benefits, including the nontaxable portion. Qualified Roth IRA distributions and withdrawals of principal from ordinary savings are not income, so they do not raise MAGI. If you are estimating “MAGI if retired under 65,” add those income sources, subtract any above-the-line adjustments, then add back tax-exempt interest, nontaxable Social Security and any excluded foreign income.

Other uses

  • Medicare premiums: Income-related monthly adjustment amounts (IRMAA) for Medicare Part B and Part D are based on MAGI from the tax return filed two years earlier.
  • Rental real estate losses: The special allowance that lets active participants deduct up to $25,000 of rental losses against other income phases out as MAGI rises from $100,000 to $150,000.
  • Education and family benefits: The student loan interest deduction, education credits, the Child Tax Credit and other credits phase out based on MAGI, each with its own definition.

Example of MAGI

Hypothetical example for illustration. Figures are invented, and tax-year rules are simplified.

Dana is single, under 50 and files for tax year 2025. Her year looks like this:

  • W-2 wages (box 1): $68,000
  • Taxable interest: $800
  • Dividends: $1,200
  • Municipal bond interest (tax-exempt): $1,500
  • HSA contribution made directly, not through payroll: $3,000
  • Deductible traditional IRA contribution: $4,000
  • Student loan interest: $2,500 (assume she qualifies for the full deduction)

Gross income: $68,000 + $800 + $1,200 = $70,000. The municipal interest is excluded from gross income.

AGI: $70,000 − $3,000 − $4,000 − $2,500 = $60,500

MAGI for the Roth IRA test: $60,500 + $4,000 (IRA deduction) + $2,500 (student loan interest) = $67,000. That is below the $150,000 start of the 2025 single phase-out, so she can contribute to a Roth. The shared IRA limit is $7,000, and she has already put $4,000 into the traditional IRA, so her Roth contribution for 2025 is capped at $3,000.

MAGI for the traditional IRA deduction: AGI figured without the IRA deduction is $64,500. Adding back student loan interest gives $67,000. Even if Dana is covered by a workplace plan, that is under the $79,000 full-deduction limit, so the $4,000 deduction stands.

MAGI for the premium tax credit: $60,500 + $1,500 (tax-exempt interest) = $62,000. Here the IRA and student loan deductions stay subtracted, but the municipal interest is added.

The same return produces $60,500 of AGI and two different MAGI figures, $67,000 and $62,000. That is why “what is my MAGI?” has no single answer until you name the rule.

Can you determine MAGI from a W-2?

Only partly. Box 1 of a W-2 shows wages after pre-tax 401(k) or 403(b) deferrals and pre-tax payroll benefits such as health premiums and HSA contributions made through a cafeteria plan. It is a reasonable starting point if wages are your only income. You still need to add other income (interest, dividends, gains, side business profit), subtract any Schedule 1 adjustments and then apply the add-backs. Box 1 also differs from boxes 3 and 5, which show Social Security and Medicare wages and are not the right figure for MAGI.

How to Lower MAGI

Because MAGI is built on AGI, only changes that reduce gross income or above-the-line adjustments can lower it, and only if the relevant definition does not add them back.

  • Pre-tax workplace retirement contributions. Traditional 401(k), 403(b) and 457(b) deferrals come out of box 1 wages, so they reduce AGI and every MAGI definition.
  • HSA contributions. These reduce AGI and are not added back under the Roth IRA or ACA definitions.
  • Self-employed retirement plans and adjustments. SEP and solo 401(k) contributions, the self-employed health insurance deduction and the deductible half of self-employment tax all reduce AGI.
  • Traditional IRA contributions, with a caveat. A deductible contribution lowers ACA MAGI and the MAGI used for Medicare surcharges. It does not lower Roth IRA MAGI. The answer to “if I move money from savings into a traditional IRA, does it decrease MAGI?” depends on which test you are trying to pass.
  • Capital loss harvesting. Realized losses offset realized gains. A net capital loss can then offset up to $3,000 of ordinary income per year ($1,500 if married filing separately), with the rest carried forward. See capital gains tax for how gains are classified.
  • Timing income. Spreading Roth conversions, large asset sales or retirement withdrawals across years can keep MAGI under a phase-out or surcharge threshold in a given year.
  • Qualified charitable distributions. IRA owners aged 70½ or older can send IRA money directly to charity. A qualified distribution is excluded from income, unlike a taxable withdrawal followed by a deductible gift.
  • Rental property records. Deductible rental expenses reduce net rental income, which flows into AGI. Passive loss limits may still restrict how much of a loss you can use.

Some common suggestions do not lower MAGI. Mortgage interest, property taxes, charitable contributions and medical expenses are itemized deductions, taken after AGI. Roth IRA contributions are not deductible. Municipal bond interest stays out of taxable income but is added back for ACA and Medicare MAGI. Federal 529 plan contributions are not deductible either, although some states allow a deduction on the state return.

MAGI vs. AGI and Other Income Measures

MAGI vs. AGI. AGI is a fixed line on your return, used directly in some limits, such as the floor for deducting medical expenses. MAGI is AGI adjusted for a specific purpose. If none of the add-backs apply to you (no IRA deduction, no student loan interest, no foreign income, no tax-exempt interest, no nontaxable Social Security), your MAGI equals your AGI.

MAGI vs. gross income. Gross income comes before any adjustments. MAGI comes after adjustments, with only some of them reversed. Gross income is usually higher than MAGI, but not always. Tax-exempt interest and nontaxable Social Security are excluded from gross income yet included in ACA MAGI, so ACA MAGI can exceed gross income.

MAGI vs. taxable income. Taxable income is AGI minus the standard or itemized deduction and the qualified business income deduction. It is the base for tax brackets. MAGI is never reduced by those deductions.

MAGI vs. net pay. MAGI is a pre-tax measure. Income tax, Social Security and Medicare withholding do not reduce it.

Limitations of MAGI

  • No universal formula. A “MAGI calculator” or worksheet built for one rule can give the wrong answer for another. Each program’s instructions define which items count.
  • Different timing. Roth and IRA tests use the current tax year. Marketplace subsidies use a projection that is reconciled later. Medicare surcharges look back two years.
  • Household versus individual. ACA and Medicaid MAGI combine the income of the tax household, including dependents who are required to file. IRA tests apply to the filer or the joint return.
  • Thresholds change. Most IRA ranges are indexed for inflation each year. Others, such as the net investment income tax thresholds and the $100,000 to $150,000 passive loss range, are fixed in statute. Tax law also changes. The tuition and fees deduction, once a common add-back, expired after 2020.
  • Hard thresholds. A small amount of extra income can move a filer into a reduced-benefit range or a higher Medicare tier. Medicare surcharge tiers are cliffs, so even $1 over a tier boundary triggers the higher premium.

Tax software calculates the required MAGI versions when it completes the relevant forms. For a planning decision, such as a Roth conversion or an early-retirement withdrawal schedule, a tax professional can model several MAGI definitions at once.

FAQs

Is MAGI before or after taxes?

Before. MAGI is an income measure built from gross income and adjustments. Income tax and payroll taxes withheld from your pay do not reduce it, and neither does the standard deduction.

What is the maximum MAGI to contribute to a Roth IRA?

For 2025, direct contributions end at $165,000 for single filers and heads of household, and at $246,000 for married couples filing jointly. For 2026, the cutoffs are $168,000 and $252,000. Married people filing separately who lived together at any time during the year are phased out entirely at $10,000.

Does Social Security count in MAGI?

It depends on the definition. The taxable portion of benefits is already in AGI, so every MAGI version includes it. The ACA and Medicaid definitions also add back the nontaxable portion, so all of your benefits count for marketplace subsidies.

Where do I find MAGI on my tax return?

Most MAGI versions are not printed as a line on Form 1040. You start from AGI (line 11 on recent forms) and apply the add-backs. Some forms show a specific version, such as Form 8962 for the premium tax credit and Form 8960 for the net investment income tax, each with its own worksheet.

The Bottom Line

MAGI matters most to anyone near a Roth IRA, traditional IRA, ACA subsidy or Medicare surcharge threshold, including early retirees whose income comes from withdrawals and conversions. Since one return can yield several MAGI figures, calculate the version for the specific rule before acting. Pre-tax workplace contributions and HSA contributions reduce MAGI, itemized deductions do not, and spreading income across years can help keep MAGI below a threshold.

About this page

Written by Markets & Investing Desk

The Markets & Investing Desk covers investing guides, the financial dictionary, companies, people, economics and market data.

Published
Last updated

Spotted an error? Tell the editors. This page is general information, not financial advice.