liveBook · Manning

Optimal sequencing of withdrawals

As explained in Build a Robo-Advisor with Python (From Scratch)

A planned method for determining how and when assets are withdrawn from investment accounts.

Optimal sequencing of withdrawals is a retirement decumulation method for choosing which accounts to liquidate, and when, to meet spending needs while reducing taxes. Common orders include taxable-first, IRA-first, filling a tax bracket with IRA withdrawals, and Roth conversion. The choice can materially change how long savings last. section 1.2.2 section 9.0

The central trade-off is between account tax efficiency and tax-bracket management. A taxable account can suffer tax drag from interest income and realized capital gains, while IRA and Roth balances can have higher assumed after-tax growth. Tax-rate expectations also matter: a traditional IRA is preferable to Roth when future tax rates are lower, while Roth is preferable when future rates are higher; with unchanged rates, their withdrawal order does not matter under the stated comparison. section 9.1.1 section 9.2.1

A practical analysis proceeds by:

  • Specify account balances, real after-tax returns, annual spending, deductions, tax brackets, and a maximum horizon. section 9.2.1 section 9.2.2
  • Compute federal tax from taxable income, then solve for the gross IRA distribution that supplies a desired after-tax spending amount. section 9.2.2
  • Simulate balances year by year for each account order, withdrawing from accounts in sequence and comparing the years assets support spending. section 9.2.2
  • Extend the comparison when needed for RMDs, capital gains, state taxes, inheritance, and beneficiary tax brackets. section 9.0 section 9.3.2

Taxable first versus IRA first

With $2 million taxable, $1 million IRA, no Roth balance, $120,000 annual spending, and assumed real returns of 3% taxable and 4% for the IRA, an IRA-first sequence lasts 40.0 years. Changing only the order to taxable, IRA, Roth lasts 48.7 years. Taxable-first depletes the less tax-advantaged account first, allowing the IRA to grow without the modeled taxable-account drag, though it does not keep tax brackets stable over time. section 9.2.1 section 9.2.4

Results depend on assumptions rather than providing a universal order. Early comparisons deliberately ignore realized and unrealized capital gains, asset location, tax-loss harvesting, RMDs, and inheritance effects to isolate sequencing. Inheritance can reverse a preferred order: when an owner faces a lower bracket than beneficiaries, depleting traditional IRA assets or converting to Roth may help; when the owner faces a higher bracket, retaining the IRA for heirs may be preferable. section 9.2.1 section 9.3.2

Table 9.3 Comparison of the first two sequencing strategies
Strategy Number of years money lasts
IRA first, then taxable 40.0
Taxable first, then IRA 48.7

Compare the modeled longevity difference between IRA-first and taxable-first withdrawal orders. section 9.2.4

How Build a Robo-Advisor with Python (From Scratch) covers it

How deep it goes
Implements annual balance simulations, tax calculations, and IRA gross-up solving, then defers fuller capital-gains, RMD, and inheritance treatment.
Examples
Contrasts $2 million taxable and $1 million IRA portfolios, where taxable-first lasts 48.7 years versus 40.0 years for IRA-first.
What it assumes
Assumes familiarity with retirement accounts and federal tax brackets while supplying a DataFrame-based tax calculation and simulation workflow.
What you can do after
Build it from scratch by simulating withdrawal orders and solving pretax IRA distributions needed for after-tax spending.
How it connects
Connects taxable accounts, traditional IRAs, Roth IRAs, tax brackets, tax drag, RMDs, capital gains taxes, and inheritance.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Robo-Advisor with Python (From Scratch). The section links point to the parts of the book it draws on.