To calculate your MAGI from Form 1040, start with your Adjusted Gross Income on Line 11 and add back a specific list of items that depends on which tax rule you’re applying. There is no single MAGI number and no single line on the return that reports it. A Roth IRA eligibility check, a healthcare subsidy calculation, and a Medicare premium surcharge each use a different formula, and the same taxpayer can produce three different MAGI figures in the same year.
The starting point never changes. The add-backs do. Below is each major formula, what it requires, and the boundaries around it.
Start With AGI on Form 1040, Line 11
Every MAGI calculation begins with Adjusted Gross Income. AGI is your total income from all sources — wages, interest, dividends, capital gains, business income, and so on — minus the above-the-line deductions listed on Schedule 1. The result appears on Form 1040, Line 11.1Internal Revenue Service. Adjusted Gross Income
Common above-the-line deductions that shrink AGI include half of self-employment tax, contributions to a traditional IRA or health savings account, the self-employed health insurance deduction, the student loan interest deduction (up to $2,500), educator expenses, and alimony paid under divorce agreements finalized before 2019. Because these reduce AGI, they also reduce the starting point for every MAGI test. A smaller AGI means fewer add-backs are needed to push MAGI above a given threshold.
Why MAGI Is Not One Number
The IRS defines MAGI differently depending on the tax provision involved. Each formula takes AGI from Line 11 and adds back specific income items that were either excluded from gross income or subtracted as above-the-line deductions. The goal is to capture a fuller picture of your economic resources for the particular benefit being tested.2Internal Revenue Service. Modified Adjusted Gross Income
Municipal bond interest is a good example. It’s tax-exempt and never appears in AGI. For healthcare subsidy purposes, the IRS adds it back so that someone living on tax-free bond income can’t claim subsidies intended for lower-income households. But the retirement contribution MAGI ignores municipal bond interest and instead adds back the student loan interest deduction. There is no universal MAGI you can calculate once and use everywhere.
MAGI for Roth IRA and Traditional IRA Contributions
This is the version of MAGI most people encounter first, because it controls whether you can contribute to a Roth IRA and whether your traditional IRA contribution is deductible. Start with AGI on Line 11, then add back:2Internal Revenue Service. Modified Adjusted Gross Income
- Any traditional IRA deduction you took on Schedule 1.
- The student loan interest deduction (up to $2,500) taken on Schedule 1.
- Foreign earned income and housing amounts excluded on Form 2555.
- Savings bond interest excluded under the education savings bond program (Form 8815).
- Employer-provided adoption benefits excluded from income on Form 8839.
- Income excluded by residents of Puerto Rico, American Samoa, or other U.S. possessions.
The formula also requires two subtractions. Income from converting a traditional IRA to a Roth IRA, and rollovers from a qualified retirement plan into a Roth IRA, appear on your return but are removed for contribution eligibility purposes. This keeps a large conversion from artificially disqualifying you from making a new contribution.2Internal Revenue Service. Modified Adjusted Gross Income
Compare the result to the annual phase-out ranges for Roth contributions and, if applicable, for traditional IRA deductibility. If you contribute more than your MAGI allows and don’t withdraw the excess (plus earnings) before your filing deadline including extensions, a 6% excise tax applies each year until corrected.3Internal Revenue Service. IRA Year-End Reminders
MAGI for the Premium Tax Credit
The Affordable Care Act’s Premium Tax Credit uses a shorter list of add-backs than the retirement formula but reaches income streams that many retirees rely on. Start with AGI on Line 11 and add back:4eCFR. 26 CFR 1.36B-1 – Premium Tax Credit Definitions
- Tax-exempt interest from municipal bonds and similar instruments (Form 1040, Line 2a).
- The non-taxable portion of Social Security benefits (Line 6a minus Line 6b).
- Foreign earned income and housing amounts excluded on Form 2555.
What isn’t here matters as much as what is. The student loan interest deduction, the IRA deduction, and the savings bond exclusion are not added back for this test. Each MAGI formula stands on its own.
If you receive advance premium tax credits during the year based on estimated income and your actual MAGI comes in higher, you’ll reconcile on Form 8962 at filing time and may owe some or all of the advance credit back. Reporting income changes to the Marketplace as they happen — online at HealthCare.gov or by calling 1-800-318-2596 — reduces the chance of a surprise on your return.
MAGI for the Net Investment Income Tax
The 3.8% Net Investment Income Tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds a fixed threshold ($200,000 single or head of household, $250,000 married filing jointly, $125,000 married filing separately). None of these thresholds is adjusted for inflation.5Internal Revenue Service. Topic No. 559 – Net Investment Income Tax
The MAGI formula here is the simplest of them all. For most taxpayers, MAGI for NIIT purposes is just AGI. The only required add-back is the foreign earned income exclusion under Section 911. If you don’t exclude foreign income, your MAGI and AGI are identical for this tax.6Internal Revenue Service. 2025 Instructions for Form 8960 – Net Investment Income Tax
MAGI for Medicare IRMAA
Medicare Part B and Part D premiums increase for higher-income beneficiaries through Income-Related Monthly Adjustment Amounts. Social Security determines the surcharge using a two-component MAGI: AGI plus tax-exempt interest income. Nothing else.7Social Security Administration. HI 01101.010 – Modified Adjusted Gross Income (MAGI)
One quirk trips up nearly everyone. IRMAA uses your tax return from two years prior. Your 2026 Medicare premiums are based on the MAGI from your 2024 tax return.8Medicare.gov. 2026 Medicare Costs A one-time income spike — selling a business, a large Roth conversion, exercising stock options — can trigger surcharges long after the event. If a life-changing event (retirement, divorce, death of a spouse) has made your two-year-old return unrepresentative, you can ask Social Security to use a more recent year by filing Form SSA-44.
MAGI for Education Tax Credits
The American Opportunity Tax Credit and the Lifetime Learning Credit share a MAGI definition. For most filers it equals AGI. Two add-backs can apply: the foreign earned income and housing exclusions, and excluded income for bona fide residents of American Samoa or Puerto Rico.9Internal Revenue Service. Education Credits – Questions and Answers If neither applies to you, your MAGI here is your AGI from Line 11.
MAGI for the $25,000 Rental Loss Allowance
If you actively manage rental property and it generates a net loss, you can deduct up to $25,000 of that loss against non-rental income, but only if your income stays under a threshold. The statute uses “adjusted gross income” and then defines its own modified version, adding back items including Social Security benefits, passive losses, and certain exclusions and deductions.10Office of the Law Revision Counsel. 26 USC 469 – Passive Activity Losses and Credits Limited
The $25,000 allowance begins phasing out when this modified AGI exceeds $100,000. For every $2 above $100,000, the allowance shrinks by $1, and it disappears at $150,000. These thresholds are fixed in the statute and not adjusted for inflation.10Office of the Law Revision Counsel. 26 USC 469 – Passive Activity Losses and Credits Limited Losses you can’t currently deduct aren’t lost. They carry forward to offset future passive income or release when you sell the property.
Which Items Add Back Where
Set side by side, the formulas separate cleanly. Each item below is added back to AGI only for the tests listed:
- Foreign earned income exclusion: retirement contributions, healthcare subsidies, NIIT, and education credits.
- Tax-exempt interest: healthcare subsidies and IRMAA.
- Non-taxable Social Security: healthcare subsidies only.
- Student loan interest deduction: retirement contributions only.
- Traditional IRA deduction: retirement contributions only.
- Savings bond interest exclusion: retirement contributions only.
- Adoption benefits exclusion: retirement contributions only.
The retirement MAGI carries the most add-backs. NIIT and IRMAA sit at the other end with one each — foreign income for NIIT, tax-exempt interest for IRMAA. The healthcare formula falls in between with three. Identifying which formula applies to your situation matters more than memorizing every entry: run the specific calculation for the specific benefit, using Line 11 as your anchor and adding back only what the rule in front of you requires.