To calculate your modified adjusted gross income, start with the adjusted gross income (AGI) on Line 11 of your Form 1040 and add back three items your return either excluded or sheltered: tax-exempt interest, foreign earned income and housing exclusions, and the nontaxable portion of your Social Security benefits. For most filers, none of those apply and MAGI equals AGI. The wrinkle worth knowing up front: the exact add-backs shift depending on which tax break or program the number is for, so the same taxpayer can have two or three different MAGIs in the same year.
Start With Your AGI
AGI is the launchpad for every version of MAGI. You’ll find it on Line 11 of Form 1040. It’s your total income from wages, self-employment, investments, and retirement distributions, minus a specific set of “above-the-line” deductions the tax code lets you subtract before taxable income.1Office of the Law Revision Counsel. 26 USC 62 – Adjusted Gross Income Defined
Those deductions live on Schedule 1. Common ones include student loan interest (up to $2,500), the deductible half of self-employment tax, HSA contributions, up to $250 in educator expenses, self-employed health insurance premiums, and deductible Traditional IRA contributions.2IRS.gov. Schedule 1 (Form 1040) – Additional Income and Adjustments to Income
If you’re a W-2 employee with no side income, no student loans, and no special deductions, your gross income and AGI may be the same number. And if none of the add-back items below apply to you, your MAGI equals your AGI. No extra math.
The Three Standard Add-Backs
The IRS defines a baseline MAGI that starts with AGI and adds back three categories of income.3Internal Revenue Service. Modified Adjusted Gross Income Most people have zero in all three. If any apply to you, they can move the number significantly.
Tax-Exempt Interest
Interest on state and local municipal bonds is excluded from your regular federal tax.4Office of the Law Revision Counsel. 26 USC 103 – Interest on State and Local Bonds For MAGI, you add it back. The amount sits on Line 2a of Form 1040. If you own muni bond funds or individual bonds, your 1099-INT or 1099-DIV will show the figure.
Foreign Earned Income and Housing Exclusions
If you work abroad and claim the foreign earned income exclusion on Form 2555, you can exclude up to $132,900 of foreign wages from 2026 taxable income, plus certain employer-provided housing costs.5Internal Revenue Service. Figuring the Foreign Earned Income Exclusion6Internal Revenue Service. Instructions for Form 2555 Both excluded amounts get added back for MAGI. The specific lines are 45 and 50 on Form 2555.3Internal Revenue Service. Modified Adjusted Gross Income
Nontaxable Social Security Benefits
Depending on your total income, anywhere from 0% to 85% of your Social Security benefits may be taxable. The portion that escapes tax still counts for MAGI. To find it, subtract Line 6b (taxable Social Security) from Line 6a (total Social Security) on Form 1040. Your SSA-1099 shows the total benefits paid during the year.
The Formula Shifts Depending on the Program
Here’s the part that catches people off guard. There is no single universal MAGI. Different programs add back different items, and the differences can push you into or out of eligibility.
ACA Marketplace Subsidies
The Affordable Care Act uses a broader definition: AGI plus untaxed foreign income, tax-exempt interest, and all nontaxable Social Security benefits.7HealthCare.gov. What to Include as Income Supplemental Security Income (SSI) is not included. Because the ACA counts all Social Security benefits rather than only the taxable share, retirees whose taxable income looks modest can still land above the subsidy limits.
Medicare IRMAA Surcharges
Medicare uses a narrower definition. For the income-related monthly adjustment amount (IRMAA) that triggers higher Part B and Part D premiums, MAGI equals AGI plus tax-exempt interest. That’s it. Nontaxable Social Security benefits are not added back.8Social Security Administration. POMS HI 01101.010 – Modified Adjusted Gross Income (MAGI) If you receive substantial Social Security, your ACA MAGI and your Medicare MAGI can sit thousands of dollars apart. Medicare also looks two years back: your 2026 premium is generally set from your 2024 return.
Roth and Traditional IRAs
For Roth IRA eligibility and Traditional IRA deduction limits, MAGI starts with the standard three add-backs and adds one more: employer-provided adoption assistance benefits excluded from income, reported on Form 8839, Line 28.3Internal Revenue Service. Modified Adjusted Gross Income Most filers don’t have this. If your employer paid adoption expenses on your behalf, that amount increases your IRA-related MAGI.
Student Loan Interest Deduction
MAGI for this deduction adds the student loan interest deduction itself back to AGI, along with foreign income exclusions.9Internal Revenue Service. Publication 970 – Tax Benefits for Education The circular-sounding rule prevents you from using the deduction to lower your MAGI below the threshold that qualifies you for the deduction in the first place.
Net Investment Income Tax
The 3.8% surtax on net investment income uses its own MAGI, defined in the Form 8960 instructions. For most people it’s close to AGI, but adjustments for foreign income and certain trust distributions may apply.10Internal Revenue Service. Topic No. 559 – Net Investment Income Tax
When someone tells you to “check your MAGI,” the right first question is “which MAGI?”
A Worked Example
Say you’re a single filer with the following 2026 figures:
- Wages: $140,000
- HSA contribution deduction: $4,300
- AGI (Form 1040, Line 11): $135,700
- Tax-exempt muni bond interest: $3,200
- No foreign income, no Social Security
Your MAGI for Roth IRA purposes: $135,700 + $3,200 = $138,900. Your MAGI for Traditional IRA deduction purposes: the same $138,900. And if you were on Medicare, your IRMAA MAGI would also be $138,900, because IRMAA uses AGI plus tax-exempt interest.
One number, three programs, each with its own threshold. The $3,200 in muni bond interest never touched your taxable income, but it still counts against your IRA eligibility and your Medicare premium bracket. Change any single input, say by adding nontaxable Social Security to the picture, and those three MAGIs would no longer match.
Consequences of Getting the Number Wrong
Miscalculating MAGI has real dollar consequences. Contributing to a Roth IRA when your MAGI exceeds the limit triggers a 6% excise tax on the excess amount for every year it remains in the account.11Internal Revenue Service. Retirement Topics – IRA Contribution Limits You can avoid the penalty by withdrawing the excess plus earnings before your filing deadline, including extensions.
For ACA subsidies, underestimating MAGI means larger premium tax credits during the year and a repayment at filing time. Overestimating means you paid more for coverage than you had to.
Medicare IRMAA surcharges triggered by a one-time capital gain or Roth conversion can be appealed only if you’ve experienced a qualifying life-changing event such as retirement, divorce, or the death of a spouse. Higher income from investment decisions alone won’t qualify for relief.
Use the Worksheet for Your Program
Because the add-backs differ by program, the IRS publishes a separate MAGI worksheet for each major tax benefit. Rather than memorizing which items apply where, use the worksheet built into the instructions for the form or publication that governs the benefit you’re claiming:3Internal Revenue Service. Modified Adjusted Gross Income
- Roth or Traditional IRA: worksheets in IRS Publication 590-A
- Education credits and deductions: worksheets in IRS Publication 970
- Adoption credit or exclusion: worksheet in the instructions for Form 8839
- ACA premium tax credit: Form 8962 instructions
- Net investment income tax: Form 8960 instructions
Each worksheet walks you through the specific add-backs for that program. Tax software handles the calculations automatically, but understanding what’s happening lets you plan ahead rather than being surprised at filing time. The filers who get burned by MAGI limits are almost always the ones who didn’t check the number until it was too late to change it.