Back to Documentation

Tax-Aware Sequencing

Dynamic programming for optimal draw order across taxable, Traditional, and Roth accounts.

Why Draw Order Matters

Retirees typically hold assets in three types of accounts, each with different tax treatment:

  • Taxable brokerage: Gains taxed at capital gains rates (0%, 15%, or 20%). Basis recovery is tax-free. Dividends may be qualified (lower rate) or ordinary.
  • Traditional IRA / 401(k): Withdrawals are taxed as ordinary income at marginal rates (10%--37% in 2026). Subject to Required Minimum Distributions starting at age 73 (75 starting in 2033).
  • Roth IRA / Roth 401(k): Qualified withdrawals are completely tax-free. No RMDs for Roth IRAs (Roth 401(k) RMDs eliminated by SECURE 2.0). Preserving Roth for last maximizes tax-free compounding.

The conventional wisdom -- "spend taxable first, then Traditional, then Roth last" -- is a reasonable heuristic but often leaves significant money on the table. The optimal sequence depends on current and projected future tax brackets, the size of each account, Social Security income, state taxes, and Medicare IRMAA thresholds.

The Optimization Problem

Lontevis models withdrawal sequencing as a multi-year dynamic programming problem. The state at each year is defined by:

  • Current balance in each account type (taxable, Traditional, Roth)
  • Current age and filing status
  • Social Security and other fixed income for the year
  • Federal and state tax bracket schedules

The decision variables are how much to withdraw from each account type to meet the annual spending target. The objective is to minimize the present value of total lifetime taxes paid, subject to meeting spending needs each year.

Bracket Management

A key insight: it is often optimal to voluntarily withdraw more from a Traditional account than needed in low-income years, paying tax at the 10% or 12% bracket, rather than letting the balance grow and eventually being forced out at 22%+ via RMDs. This is especially true in the "gap years" between retirement and Social Security or RMD onset, when taxable income may be near zero.

Lontevis identifies these bracket-filling opportunities and incorporates them into the withdrawal plan. For married filing jointly in 2026, the key bracket boundaries are:

BracketTaxable Income (MFJ)Marginal Rate
1$0 -- $23,85010%
2$23,850 -- $96,95012%
3$96,950 -- $206,70022%
4$206,700 -- $394,60024%
5+$394,600+32%--37%

IRMAA Awareness

Medicare Part B and Part D premiums are income-tested. If Modified Adjusted Gross Income (MAGI) exceeds certain thresholds, monthly premiums increase substantially. These thresholds (known as IRMAA brackets) create effective marginal tax rate cliffs:

  • $206,000 (MFJ): First IRMAA tier -- Part B premium increases from $185 to $259/month per person
  • $258,000 (MFJ): Second tier -- Part B rises to $370/month per person
  • Higher tiers at $322,000, $386,000, and $750,000+

Because IRMAA is based on income from two years prior, the withdrawal optimizer must look ahead and avoid spikes in income that would trigger surcharges two years later. Lontevis incorporates these cliffs as constraints in the dynamic programming formulation.

API Endpoint

POST/v1/optimize

Run full withdrawal optimization including tax-aware sequencing. The response includes year-by-year draw amounts from each account type.

curl -X POST https://api.lontevis.smarttechinvest.com/v1/optimize \
  -H "X-API-Key: lon_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "current_age": 63,
    "filing_status": "married_jointly",
    "taxable_balance": 450000,
    "traditional_balance": 800000,
    "roth_balance": 200000,
    "annual_spending": 72000,
    "ss_monthly": 2600,
    "ss_start_age": 67,
    "spouse_ss_monthly": 1400,
    "spouse_ss_start_age": 66,
    "state": "CA",
    "planning_horizon": 95
  }'

Response Fields

  • withdrawal_plan -- year-by-year array with draw amounts from taxable, Traditional, and Roth
  • total_lifetime_tax -- present value of all federal + state taxes paid
  • tax_savings_vs_naive -- how much the optimized plan saves compared to the conventional "taxable first" strategy
  • irmaa_years -- years where IRMAA surcharges would be triggered (if any)
  • bracket_utilization -- percentage of each tax bracket filled per year