liveBook · Manning

Ordinary income

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

Ordinary income is taxable income arising from sources such as wages, interest, and non-preferentially taxed distributions rather than preferentially taxed capital gains.

Ordinary income is income taxed under ordinary income brackets rather than preferential capital-gains rates. IRA withdrawals are treated as ordinary income, so taxes reduce the amount available for spending. section 9.2.2 section 9.3.3

Apply ordinary-income taxation to withdrawal planning by:

  • Computing tax from income, a deduction, and progressive federal brackets. section 9.2.2
  • Grossing up an IRA withdrawal when spending needs are stated after tax. section 9.2.2
  • Recognizing that ordinary income is taxed before long-term capital gains and can push gains into higher brackets. section 9.3.3

Grossing up an IRA withdrawal

With $120,000 of IRA income and a $13,850 standard deduction, calculated federal taxes are $18,876. Meeting $120,000 of after-tax spending therefore requires a pretax withdrawal of about $144,836.84. section 9.2.2

Stacking with capital gains

With $80,000 of ordinary income and $40,000 of long-term gains, simplified calculations produce $12,600 of total tax. Increasing ordinary income to $90,000 raises total tax to $15,300 because more gains enter the 15% bracket. section 9.3.3

Listing 9.2 Computing taxes from income
def calc_taxes(income, TaxTable, deduction):
    taxable_income = income - deduction
    i = 0
    tax = 0
    bottom = 0
    while taxable_income > bottom:
        bracket_income = min(TaxTable.iloc[i]['top_of_bracket'],
                               taxable_income) - bottom
        tax += TaxTable.iloc[i]['rate'] * bracket_income
        bottom = TaxTable.iloc[i]['top_of_bracket']
        i += 1
    return tax

Inspect the bracket-by-bracket calculation that converts ordinary income and a deduction into tax. section 9.2.2

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

How deep it goes
Implements progressive-bracket taxation and pretax gross-up, while simplifying capital-gains rates and omitting broader tax complexity.
Examples
Calculates taxes on a $120,000 IRA withdrawal and compares $80,000 versus $90,000 of ordinary income alongside $40,000 of gains.
What it assumes
Assumes familiarity with income, deductions, tax brackets, IRA accounts, and capital gains while making bracket calculations explicit.
What you can do after
Apply it via Python and SciPy to compute taxes, gross up withdrawals, and evaluate withdrawal strategies.
How it connects
Connects IRA withdrawals, tax brackets, deductions, capital gains, qualified dividends, Roth conversions, and withdrawal strategies.

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.