Adjusted Gross Income for Tech Workers
How AGI Is Calculated, Where It Controls Your Tax Bill, and How to Manage It in Early Retirement
Adjusted Gross Income — AGI — is the single most important number on your federal tax return. It is not the tax you owe, and it is not your total income. It is the intermediate figure that sits between what you earn and what you are taxed on, and it controls an enormous number of calculations that go far beyond income tax itself. For tech workers, AGI is the lever that determines eligibility for ACA health insurance subsidies, the Medicare surcharge on investment income, the deductibility of IRA contributions, the phaseout of certain credits, the taxable portion of Social Security benefits, and Medicare Part B and D premium levels in retirement.
Most people know their salary. Very few know their AGI — and fewer still actively manage it. For a software engineer earning $300,000 in total compensation or an early retiree drawing from multiple account types, the difference between an AGI of $95,000 and $145,000 can mean tens of thousands of dollars per year in taxes and premiums. Understanding how AGI is calculated and where it is used is one of the highest-leverage financial planning skills available.
How AGI Is Calculated
AGI starts with your gross income — every dollar of income from all sources — and then subtracts a specific list of "above-the-line" deductions. These deductions are called above-the-line because they reduce income before the standard deduction or itemized deductions are applied, making them available to everyone regardless of whether they itemize.
What Is Included in Gross Income
Gross income is broader than most people realize. It includes:
- Wages and salary — all W-2 income, including base salary, bonuses, and severance
- RSU income — the fair market value of restricted stock units on the vest date, reported as W-2 income in Box 1
- Interest income — from savings accounts, CDs, Treasury bonds, and money market funds
- Dividend income — both qualified dividends (taxed at preferential rates) and ordinary dividends (taxed as ordinary income)
- Capital gains — net short-term gains (taxed as ordinary income) and net long-term gains (taxed at preferential rates, but still included in AGI)
- Traditional IRA and 401(k) distributions — withdrawals from pre-tax retirement accounts are fully included in gross income
- Roth conversions — the amount converted from a traditional IRA to a Roth IRA is included in gross income for that year
- Self-employment income — net profit from consulting or freelance work
- Taxable Social Security benefits — up to 85% of Social Security income, depending on combined income (a related but distinct threshold)
- Alimony received (for pre-2019 agreements)
- Rental income — net of allowable rental expenses
Two critical items that are not included in gross income: Roth IRA distributions (qualified withdrawals are entirely tax-free and do not appear on the return) and municipal bond interest (exempt from federal income tax, though it does appear in the Social Security combined income calculation as a separate add-back).
Above-the-Line Deductions That Reduce Gross Income to AGI
These deductions are subtracted from gross income to arrive at AGI. They are available regardless of whether you take the standard deduction ($16,100 for single filers, $32,200 for married filing jointly in 2026) or itemize:
- Traditional 401(k) and 403(b) contributions — employee contributions to workplace retirement plans reduce W-2 income before it reaches your tax return. The 2026 employee limit is $24,500 ($32,000 if age 50+). This is the most powerful AGI-reduction tool available to employed tech workers.
- Traditional IRA contributions — deductible if you (and your spouse) are not covered by a workplace retirement plan, or if income falls below certain phase-out thresholds. For 2026, the deductible IRA contribution is $7,500 per person ($8,600 if age 50+).
- Health Savings Account (HSA) contributions — contributions made directly to an HSA (not via payroll) are deductible above the line. The 2026 limits are $4,400 for self-only and $8,750 for family coverage. HSA contributions via payroll reduce W-2 income directly and never appear as gross income at all — an even more efficient path.
- Self-employed health insurance premiums — consultants and freelancers can deduct 100% of health insurance premiums paid for themselves and their families.
- Self-employment tax deduction — the employer-equivalent portion of self-employment tax (7.65% of net self-employment income) is deductible above the line.
- SEP-IRA, SIMPLE IRA, and Solo 401(k) contributions — self-employed tech workers and consultants can contribute up to 25% of net self-employment income to a SEP-IRA (up to $72,000 in 2026), creating a very large above-the-line deduction.
- Student loan interest — up to $2,500, subject to income phase-outs.
- Alimony paid (for pre-2019 agreements).
- Educator expenses — up to $300 for eligible teachers.
After subtracting these adjustments from gross income, you arrive at AGI. From AGI, you subtract either the standard deduction or itemized deductions to reach taxable income — the number your actual income tax is calculated on. But AGI itself, before those final deductions, is what drives the calculations described below.
Where AGI Is Used — and Why Tech Workers Must Manage It
ACA Health Insurance Premium Tax Credits
The Affordable Care Act's premium tax credit — which subsidizes health insurance premiums on the marketplace — is calculated based on Modified Adjusted Gross Income (MAGI), which for ACA purposes is AGI plus any tax-exempt foreign income and tax-exempt Social Security income. For most tech workers and early retirees, MAGI equals AGI.
The subsidy phases out as income rises above 100% of the Federal Poverty Level (FPL). The specific impact: households above 400% FPL historically lost all subsidy (the "subsidy cliff"), but under current law subsidies taper more gradually at higher incomes. For a family of two in 2026, 400% FPL is approximately $79,840. Above this level, premiums are capped at approximately 8.5% of household income — meaning the subsidy remains available but shrinks as income rises.
For an early retiree with a $2,500,000 portfolio spending $95,000/year and drawing primarily from Roth accounts and long-term capital gains at the 0% rate, MAGI might be $40,000 — well below the phase-out, qualifying for substantial subsidies. The same retiree taking $95,000/year from a traditional IRA would have MAGI of $95,000 — well above the threshold. The account you draw from is the primary driver of your MAGI for ACA purposes. This is why Roth conversion ladders built during the early retirement years — before ACA subsidies become critical — are so valuable.
Net Investment Income Tax (NIIT)
The Net Investment Income Tax is a 3.8% surtax on the lesser of: (a) your net investment income, or (b) the amount by which your MAGI exceeds the threshold — $200,000 for single filers, $250,000 for married filing jointly. Net investment income includes interest, dividends, capital gains, rental income, and passive income. It does not include wages, active business income, or distributions from retirement accounts.
For tech workers with large taxable brokerage accounts built from RSU proceeds, the NIIT is a constant companion. A senior engineer selling $200,000 of appreciated stock in a year they also earned $350,000 in salary pays the 3.8% NIIT on the gains. An early retiree with MAGI of $260,000 (all from capital gains and dividends) pays 3.8% on $10,000 of investment income — the amount above the $250,000 MFJ threshold. Managing MAGI near the NIIT threshold through Roth draws, loss harvesting, and distribution timing is worth $3,800 for every $100,000 of investment income shifted below the line.
0% Long-Term Capital Gains Rate
Long-term capital gains are taxed at 0%, 15%, or 20% depending on taxable income — but the bracket boundaries are based on taxable income after the standard deduction, not directly on AGI. In 2026, the 0% long-term capital gains rate applies to taxable income up to $49,450 for single filers and $98,900 for married filing jointly. A couple whose only income is long-term capital gains can have AGI of up to $131,100 ($98,900 plus the $32,200 standard deduction) and owe zero federal tax on those gains.
Early retirees who manage AGI carefully can realize tens of thousands of dollars in long-term capital gains each year at 0% federal tax. Consider an early retiree couple with $400,000 in unrealized gains who draws primarily from Roth accounts, with $60,000 of other AGI from dividends and a modest Roth conversion. Their other taxable income is $27,800 ($60,000 minus the $32,200 standard deduction), leaving $71,100 of room in the 0% bracket ($98,900 − $27,800). They can realize $71,100 of gains tax-free — resetting basis on those shares and permanently reducing future embedded gains. This "gain harvesting" strategy is entirely driven by AGI management.
Social Security Combined Income and Benefit Taxation
The portion of Social Security benefits subject to federal income tax depends on "combined income" — AGI plus non-taxable interest plus 50% of Social Security benefits. This is a distinct calculation from AGI itself, but AGI is the largest component. The thresholds for married filing jointly: combined income below $32,000 means 0% of benefits are taxable; $32,000–$44,000 means up to 50% taxable; above $44,000 means up to 85% taxable.
Because muni bond interest is added back in the combined income calculation even though it is excluded from AGI, an early retiree who holds a large municipal bond ladder for tax-free income still has that income counted for Social Security taxation purposes. And because traditional IRA distributions flow directly through AGI into combined income, every dollar of IRA withdrawal in a year when Social Security is being received adds to the taxable portion of the benefit — creating an effective marginal rate spike. Managing the mix of Roth vs. traditional withdrawals to stay below the $44,000 combined income threshold (for a single retiree, $34,000) in early Social Security years is one of the most valuable AGI management moves available.
Medicare IRMAA Surcharges
IRMAA — Income-Related Monthly Adjustment Amount — is an additional Medicare Part B and Part D premium assessed on higher-income retirees. It is calculated based on MAGI from two years prior (the "lookback period"). The base Medicare Part B premium in 2026 is approximately $185/month per person; IRMAA adds $74–$443/month per person depending on income tier.
The 2026 IRMAA tiers for Medicare Part B (based on 2024 MAGI) for married filing jointly:
- Below $212,000: No IRMAA — base premium only (~$185/month)
- $212,000–$266,000: +$74/month per person
- $266,000–$334,000: +$185/month per person
- $334,000–$400,000: +$296/month per person
- $400,000–$750,000: +$370/month per person
- Above $750,000: +$443/month per person
For a couple at the second IRMAA tier, the surcharge adds $148/month — $1,776/year. At the highest tier, it adds $886/month — $10,632/year — purely because of prior-year MAGI. The two-year lookback creates a specific planning trap: a large Roth conversion in 2024 raises 2024 MAGI, which triggers IRMAA in 2026. Tech workers approaching Medicare age must model planned Roth conversions, RSU vests, and capital gain realizations against IRMAA tiers two years forward, not just in the current year.
Roth IRA Contribution Eligibility
Direct Roth IRA contributions phase out based on MAGI. For 2026, single filers lose the ability to contribute directly above $165,000 MAGI; married filing jointly, the phase-out is $246,000–$256,000. Most senior tech workers exceed these thresholds on salary alone and use the backdoor Roth (non-deductible traditional IRA contribution converted to Roth) as a workaround. But the AGI context matters: in early retirement, before large portfolio withdrawals begin, MAGI may drop below the phase-out — making direct Roth contributions available again. An early retiree with $60,000 MAGI in year one of retirement can contribute directly to a Roth IRA and skip the backdoor mechanics entirely.
Traditional IRA Deductibility
Traditional IRA contributions are deductible only if you are not covered by a workplace retirement plan, or if your MAGI falls below phase-out thresholds. For 2026, single filers covered by a workplace plan lose the IRA deduction above $89,000 MAGI; married filing jointly (both covered), the phase-out is $126,000–$146,000. For most employed tech workers, traditional IRA contributions are non-deductible — not because the contribution is prohibited, but because AGI is too high for the deduction. The non-deductible contribution is then converted to Roth via the backdoor process.
Child Tax Credit and Other Credit Phase-Outs
Several tax credits phase out based on AGI. The Child Tax Credit ($2,000 per qualifying child in 2026) begins phasing out above $400,000 AGI for married filing jointly. The Child and Dependent Care Credit, the American Opportunity Credit (college expenses), and the Lifetime Learning Credit all have AGI-based phase-outs at various thresholds. For employed tech workers with children, managing AGI through 401(k) contributions can preserve credits that would otherwise phase out entirely.
Itemized Deduction Limitations
Some itemized deductions are limited based on AGI. Medical expenses are only deductible to the extent they exceed 7.5% of AGI — a lower AGI makes a larger portion of medical expenses deductible. Miscellaneous itemized deductions (suspended through 2025 under TCJA) and charitable deduction carryovers interact with AGI in specific ways that become relevant for large donors.
MAGI: Modified AGI and Why It Differs From AGI
Several tax calculations use a "Modified AGI" (MAGI) that starts with AGI and adds back specific items that were deducted. Different rules define MAGI differently for different purposes — there is no single universal MAGI. The most relevant versions for tech workers:
- ACA MAGI: AGI + tax-exempt foreign income + non-taxable Social Security + tax-exempt interest. For most U.S.-based tech workers, ACA MAGI equals AGI.
- NIIT MAGI: AGI + excluded foreign earned income. Again, equals AGI for most U.S. residents.
- Roth IRA MAGI: AGI + traditional IRA deduction + student loan interest deduction + other add-backs. Typically close to AGI for most situations.
- Medicare IRMAA MAGI: AGI + tax-exempt interest income. Adds back muni bond interest that was excluded from AGI — the same add-back as the Social Security combined income calculation.
- Social Security combined income: Not technically MAGI, but AGI + tax-exempt interest + 50% of Social Security — the specific formula used to determine what percentage of benefits are taxable.
The practical takeaway: municipal bond interest is excluded from AGI but is added back in both the IRMAA and Social Security combined income calculations. Holding a large muni bond portfolio for "tax-free" income in retirement reduces federal income tax but does not reduce Medicare surcharges or Social Security benefit taxation, because those use MAGI or combined income rather than AGI directly.
AGI Management Strategies for Tech Workers
During the Accumulation Phase (Still Working)
The primary AGI management tool for employed tech workers is maximizing pre-tax retirement contributions. A senior engineer at $350,000 total compensation who contributes $24,500 to a traditional 401(k) reduces AGI by $24,500 — saving approximately $9,065 in federal income tax at the 37% rate and up to $3,259 in California state tax at 13.3%. If the employer's plan allows a mega backdoor Roth (after-tax 401(k) contributions up to the $72,000 total plan limit), those contributions do not reduce AGI further — they go in post-tax — but they shelter growth tax-free in a Roth account.
HSA contributions via payroll are the most tax-efficient form of AGI reduction: they reduce W-2 gross income before it reaches the return, avoiding not just income tax but also Social Security and Medicare payroll taxes (7.65% combined). An HSA contribution of $8,750 via payroll saves approximately $670 in payroll taxes in addition to income tax savings — a genuinely better deal than the 401(k) deduction on a per-dollar basis.
In Early Retirement (Before Age 65)
Early retirement is where AGI management becomes most consequential. With no earned income and multiple account types to draw from, the retiree controls their AGI almost completely. The framework:
- Draw from Roth accounts for spending needs — zero AGI impact
- Realize long-term capital gains in the taxable account up to the 0% bracket ceiling
- Convert traditional IRA funds to Roth in amounts that fill a target tax bracket without crossing a critical threshold (ACA subsidy cliff, IRMAA tier boundary, 50% vs. 85% Social Security taxation)
- Use qualified charitable distributions (QCDs) if over 70½ to satisfy RMDs without the distribution entering AGI at all
The AGI in early retirement years is not a passive outcome of your financial life — it is a decision variable that can be set almost precisely by choosing the right mix of account withdrawals and Roth conversions each year. Tech workers who model this explicitly for each year from early retirement to RMD age, against all the thresholds described above, consistently find $10,000–$50,000 per year in tax and premium savings compared to drawing from accounts without a plan.
After 65 — Managing IRMAA and RMDs
After 65, Medicare IRMAA surcharges are the dominant AGI management pressure. Required Minimum Distributions from traditional accounts — beginning at age 73 — force taxable income that cannot be avoided. The antidote is Roth conversions done earlier: every dollar converted from a traditional IRA to Roth in the years before 73 is a dollar that will not appear as a forced RMD. A tech worker who retires at 45 and converts aggressively from 45 to 73 can potentially eliminate or dramatically reduce RMDs entirely, removing the IRMAA pressure in later retirement years.
Frequently Asked Questions
Model Your AGI Across Every Retirement Year
Nauma projects your AGI year by year — showing how each account withdrawal, Roth conversion, and capital gain realization affects your ACA subsidies, IRMAA tiers, Social Security taxation, and effective tax rate across your entire retirement.
Get Started for Free