liveBook · Manning

Tax bracket

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

A tax bracket is a range of taxable income to which a specified marginal tax rate applies.

A tax bracket is an income range taxed at a specified marginal rate. Tax planning therefore depends not only on total income, but on when income is recognized and which bracket receives each additional dollar. section 9.1.2 section 9.2.2

Why stable income can reduce tax

With simplified brackets of 12% through $100,000 and 22% from $100,000 to $300,000, income of $50,000 then $150,000 produces $29,000 of tax over two years. Keeping income at $100,000 in each year produces $24,000, because no income reaches the higher rate. section 9.1.2

Table 9.1 Simplified tax brackets for our example
Tax rate Income range
12% 0 – $100,000
22% $100,000 – $300,000

Inspect the simplified income ranges and rates used to compare uneven and even annual income. section 9.1.2

A practical tax model stores bracket ceilings and rates in a table, subtracts a standard or itemized deduction from income, and taxes each successive slice of taxable income until all income is assigned. That calculation can then support withdrawal planning: an IRA distribution is ordinary income, so the gross withdrawal must cover both spending and the resulting tax. section 9.2.2

Bracket-aware withdrawal decisions include:

  • Smooth withdrawals across years when possible, avoiding unnecessary income in higher brackets. section 9.1.2
  • Compare an account owner's bracket with beneficiaries' brackets when choosing whether to deplete or preserve a traditional IRA. section 9.3.2
  • Account for capital gains separately: ordinary income is taxed first, and capital gains stack above it, so added ordinary income can move gains into a higher capital-gains bracket. section 9.3.3

Stacked capital gains

Under simplified rates, $80,000 of ordinary income plus $40,000 of long-term gains yields $12,600 of total tax: $20,000 of gains remains in the 0% capital-gains range and $20,000 is taxed at 15%. Raising ordinary income to $90,000 leaves only $10,000 of gains at 0% and raises total tax to $15,300. section 9.3.3

Table 9.8 Example of capital gains taxes stacked on top of ordinary income
Type of tax Amount of tax
Ordinary income $80,000 × 12% = $9,600
Long-term capital gains $20,000 × 0% + $20,000 × 15% = $3,000
Total $12,600

Trace how ordinary income fills the lower range before long-term capital gains are assigned their rates. section 9.3.3

Bracket effects are investor-specific. Asset-location comparisons can use separate ordinary-income and capital-gains rates; for example, assumed 35% ordinary-income and 20% capital-gains brackets change the relative tax efficiency of payouts, turnover, and asset types. State taxes may also be incorporated as rate attributes. section 8.2

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

How deep it goes
Implements bracket-by-bracket federal tax computation and extends it to deductions, IRA gross-ups, and capital-gains stacking.
Examples
Uses two 12% and 22% income ranges, 2023 single-filer brackets, IRA withdrawals, and stacked ordinary-income and capital-gains cases.
What it assumes
Assumes familiarity with income, deductions, IRA withdrawals, and Python DataFrames while constructing the tax calculation incrementally.
What you can do after
Build it from scratch as a bracket-table tax calculator and solve gross IRA withdrawals needed to meet after-tax spending.
How it connects
Connects tax brackets to asset location, IRA withdrawals, deductions, capital gains, qualified dividends, Roth conversions, 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.