{
  "id": "magi",
  "version": "e71a40bf2169",
  "status": "published",
  "name": "MAGI Calculator",
  "question": "What is my MAGI (modified AGI)?",
  "summary": "Works out modified adjusted gross income (MAGI) from your AGI for a Roth IRA contribution (Pub 590-A Worksheet 2-1) or for the ACA premium tax credit (IRC 36B).",
  "category": "finance",
  "subcategory": "tax-and-pay",
  "url": "https://www.acalculator.org/finance/magi-calculator",
  "markdown": "https://www.acalculator.org/finance/magi-calculator.md",
  "kind": "function",
  "method": "Roth IRA: MAGI = AGI − Roth conversion and rollover income + traditional IRA deduction + student loan interest deduction + foreign earned income and housing exclusion + foreign housing deduction + excluded savings bond interest + excluded adoption benefits. ACA: MAGI = AGI + foreign earned income and housing exclusion + tax-exempt interest + untaxed Social Security.",
  "assumptions": [
    "An estimate, not tax advice. The Roth IRA rule follows Publication 590-A Worksheet 2-1; the ACA rule follows IRC 36B(d)(2)(B).",
    "For the ACA, household MAGI adds the MAGI of every family member who must file a return; add their amounts to AGI yourself.",
    "Other MAGI definitions (traditional IRA deduction, net investment income tax, Medicare IRMAA, student loan interest) differ and are not modelled.",
    "Refiguring AGI for other phaseouts (Worksheet 2-1 note) is not modelled."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "for": {
        "title": "MAGI for",
        "description": "Which rule to use: a Roth IRA contribution, or the ACA marketplace and premium tax credit.",
        "type": "string",
        "enum": [
          "roth",
          "aca"
        ]
      },
      "agi": {
        "title": "Adjusted gross income (AGI)",
        "description": "Your AGI from Form 1040 line 11 (use the AGI calculator if you do not know it).",
        "type": "number",
        "x-unit": "USD",
        "minimum": -1000000000,
        "maximum": 1000000000
      },
      "rothConversion": {
        "title": "Roth conversion income",
        "description": "Taxable income from converting a traditional IRA to a Roth IRA, or rolling a retirement plan into a Roth IRA (subtracted).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "iraDeduction": {
        "title": "Traditional IRA deduction",
        "description": "Your deductible traditional IRA contribution (Schedule 1 line 20).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "studentLoanInterest": {
        "title": "Student loan interest deduction",
        "description": "The student loan interest deduction (Schedule 1 line 21).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "foreignExclusion": {
        "title": "Foreign earned income exclusion",
        "description": "Foreign earned income and housing excluded on Form 2555 (line 45).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "foreignHousing": {
        "title": "Foreign housing deduction",
        "description": "The foreign housing deduction (Form 2555 line 50).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "savingsBondInterest": {
        "title": "Excluded savings bond interest",
        "description": "Savings bond interest excluded for education on Form 8815 (line 14).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "adoptionBenefits": {
        "title": "Excluded adoption benefits",
        "description": "Employer-provided adoption benefits excluded on Form 8839 (line 30).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "taxExemptInterest": {
        "title": "Tax-exempt interest",
        "description": "Tax-exempt interest, such as from municipal bonds (Form 1040 line 2a).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "nontaxableSocialSecurity": {
        "title": "Untaxed Social Security",
        "description": "Social Security benefits not included in taxable income (Form 1040 line 6a minus line 6b).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      }
    }
  },
  "outputs": {
    "magi": {
      "label": "Modified AGI",
      "description": "AGI with the add-backs of the chosen rule (and, for a Roth IRA, conversion income taken out).",
      "format": "money"
    },
    "addBacks": {
      "label": "Added back",
      "description": "The total added to AGI.",
      "format": "money"
    },
    "subtracted": {
      "label": "Taken out",
      "description": "Roth conversion and rollover income taken out of AGI (Roth IRA only).",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "for": "roth",
      "agi": 90000
    },
    "outputs": {
      "magi": 90000,
      "addBacks": 0,
      "subtracted": 0
    },
    "text": "With an AGI of $90,000.00, your MAGI for Roth IRA is $90,000.00."
  },
  "examples": [
    {
      "given": {
        "for": "roth",
        "agi": 150000,
        "rothConversion": 20000,
        "studentLoanInterest": 2500
      },
      "expect": {
        "subtracted": 20000,
        "addBacks": 2500,
        "magi": 132500
      },
      "source": "IRS Publication 590-A, Worksheet 2-1, lines 1 to 10: 150,000 − 20,000 + 2,500; hand calculation in content.mdx; Python 3: 150000-20000+2500"
    },
    {
      "given": {
        "for": "roth",
        "agi": 90000,
        "iraDeduction": 7000,
        "savingsBondInterest": 1000,
        "adoptionBenefits": 5000
      },
      "expect": {
        "addBacks": 13000,
        "magi": 103000
      },
      "source": "IRS Publication 590-A, Worksheet 2-1, lines 4, 8, and 9; hand calculation in content.mdx; Python 3: 90000+7000+1000+5000"
    },
    {
      "given": {
        "for": "aca",
        "agi": 40000,
        "taxExemptInterest": 1000,
        "nontaxableSocialSecurity": 15000
      },
      "expect": {
        "addBacks": 16000,
        "magi": 56000
      },
      "source": "IRC 36B(d)(2)(B) and the Form 8962 instructions (line 2a and 2b): AGI + tax-exempt interest + untaxed Social Security; Python 3: 40000+1000+15000"
    },
    {
      "given": {
        "for": "aca",
        "agi": 60000,
        "foreignExclusion": 30000
      },
      "expect": {
        "magi": 90000
      },
      "source": "IRC 36B(d)(2)(B)(i): income excluded under section 911 is added back; Python 3: 60000+30000"
    }
  ],
  "sources": [
    "IRS, Publication 590-A, Contributions to Individual Retirement Arrangements, Worksheet 2-1: Modified Adjusted Gross Income for Roth IRA Purposes. https://www.irs.gov/publications/p590a",
    "26 U.S.C. 36B(d)(2)(B), modified adjusted gross income for the premium tax credit. https://www.law.cornell.edu/uscode/text/26/36B",
    "IRS, Instructions for Form 8962, Premium Tax Credit (lines 2a and 2b). https://www.irs.gov/instructions/i8962",
    "HealthCare.gov, Modified adjusted gross income (MAGI). https://www.healthcare.gov/glossary/modified-adjusted-gross-income-magi/"
  ],
  "related": [
    "agi",
    "taxable-income",
    "income-tax"
  ],
  "changelog": []
}
