9  Investing Basics


Saving preserves your purchasing power. Investing grows it. Once your budget is under control and your emergency fund is secure, your next job is to put accumulated savings to work in the market—not to get rich quick, but to let time and compounding build wealth at the pace most people never reach.1

9.1 Compounding (the force multiplier)

Compounding is interest earning interest. Over long horizons, it does the heavy lifting. A dollar invested today becomes several dollars after 30 years, not through luck but through the mathematical force of exponential growth.

The Rule of 72 is the shortcut worth memorizing:

Years to double your money = 72 ÷ annual return %

At 7% return, money doubles every ~10 years. At 10%, every ~7 years. Over 30 years, compounding transforms modest regular contributions into wealth.

show/hide
years   <- 0:40
balance <- 10000 * (1.07)^years
plot(years, balance, type = "l",
     xlab = "Years", ylab = "Balance ($)",
     main = "$10,000 at 7% compounded annually")

show/hide
years = list(range(0, 41))
balance = [10000 * (1.07) ** y for y in years]
balance[-1]  # ending balance after 40 years
#> 149744.57839206984

9.2 What to Invest In (the core portfolio)

The average person should own three things: stocks, bonds, and cash (which you’ve already saved). The specific split depends on your time horizon and risk tolerance.

  • Stocks (via broad index funds): 70–90% of your portfolio if you have 20+ years
  • Bonds (via index funds): 10–30% for stability and downturns
  • Cash (your emergency fund): Separate, in savings accounts

The hardest part isn’t picking the right stocks—it’s resisting the urge to pick stocks at all. John Bogle’s insight is powerful: trying to beat the market costs you money in fees and taxes. Instead, buy the entire market through low-cost index funds.

A simple portfolio for most people: - 80% total stock market index fund (captures all US stocks) - 20% total bond market index fund (stability and downturns)

That’s it. Rebalance once a year. Cost: ~0.03% per year in fees.

9.3 Risk vs. Return: Choose What You Can Live With

Higher expected return = higher expected volatility. A 100% stock portfolio might return 10% per year on average, but it can drop 40% in a bad year. A 60/40 stock-bond portfolio returns ~7% on average but drops only 20% in a bad year.

The right allocation isn’t the one with the highest expected return—it’s the one you can stick with through downturns. Morgan Housel’s principle applies: a portfolio you abandon in a bear market performs worse than a boring portfolio you maintain.

9.4 Diversification (don’t bet on one horse)

Don’t bet on one company, one sector, or one country. Broad index funds make this nearly free. A $1 investment in a total stock market index fund gives you ownership in thousands of companies. If one fails, your return barely changes. If you own 10 tech stocks, one failure cuts your portfolio.

9.5 Tax-Advantaged Accounts (where to hold your investments)

Steps 5–7 of the Financial Order of Operations tell you what accounts to use:

Account Contribution Limit (2024) Tax Benefit Best for
401(k) / 403(b) $23,500/year Tax deduction, employer match Employees with matching
Roth IRA $7,000/year Tax-free growth forever Tax-free income in retirement
Traditional IRA $7,000/year Tax deduction now Reducing current income
HSA (if eligible) $4,150/year (self) Triple tax advantage Medical expenses + retirement
Taxable account Unlimited None, but flexible After maxing above

Ramit Sethi’s guidance is simple: max the employer match first (step 2), then high-interest debt (step 3), then emergency fund (step 4), then Roth IRA (step 5), then 401(k) (step 6), then taxable accounts (step 7). Follow this order; it’s designed to optimize.

NoteWhy Account Type Matters

A $10,000 investment earning 7% annually grows to $76,000 after 30 years. If held in a regular brokerage account, you pay taxes on the gains (~$46,000 × 20% = ~$9,200). In a Roth IRA, you pay $0. Same investment, account type makes a $9,200 difference over 30 years. Account optimization matters more than stock picking.

9.6 Common Investing Mistakes (what to avoid)

  1. Trying to time the market. Even professionals can’t predict short-term market moves. Time in the market beats timing the market.

  2. Chasing past performance. Last year’s best fund is often this year’s worst. Buy broadly; avoid chasing.

  3. Paying high fees. A 1% fee doesn’t sound bad, but over 30 years it cuts your wealth by ~25%. Low-cost index funds cost 0.03–0.1%.

  4. Keeping too much in cash. After your emergency fund, cash earning 4% loses to inflation over decades. You need growth.

  5. Selling in a panic. The stock market drops ~10% every 1–2 years. If you sell every time, you lock in losses and miss recoveries. Stay invested.

Morgan Housel’s research shows: the investors who get rich aren’t the smartest; they’re the ones who stay invested the longest and avoid big mistakes.

9.7 Math for Investing Basics

Investing math is mostly one idea, compounding, applied in a few different ways. Each calculation below is written as an R and Python function, following the same pattern introduced in the Budgeting chapter.

In code, the ^ symbol (R) and ** symbol (Python) both mean “raise to the power of.” So (1 + 0.07)^10 means “1.07 multiplied by itself 10 times.”

Future Value and the Rule of 72

Each bar below is the previous one multiplied by the same growth factor. The result is not a straight line — it curves upward because each year’s growth is applied to a larger base.

$10,000 growing at 7% — value at each checkpoint

$10,000 growing at 7% — value at each checkpoint

Multiplying by (1 + r) once gives next year’s value; multiplying by it n times gives the value after n years — that’s the formula.

Formula: FV = PV × (1 + r)^n

Where: FV = future value, PV = present value (today’s amount), r = annual return, n = years.

The companion shortcut is the Rule of 72: divide 72 by the return percentage to estimate how many years it takes your money to double.

Years to double ≈ 72 ÷ annual return %

Example: $10,000 at 7% for 10 years grows to ~$19,672, and at 7% money doubles roughly every 10 years.

show/hide
future_value <- function(present_value, rate, years) {
  present_value * (1 + rate)^years
}

rule_of_72 <- function(annual_return_pct) {
  72 / annual_return_pct
}

# scalar: $10,000 at 7% for 10 years
future_value(present_value = 10000, rate = 0.07, years = 10)
#> [1] 19671.51

# how long until your money doubles at 7%?
rule_of_72(annual_return_pct = 7)
#> [1] 10.28571

# vectorized: same $10,000 at 7% across multiple horizons
data.frame(
  years = c(5, 10, 20, 30),
  value = future_value(present_value = 10000, rate = 0.07, years = c(5, 10, 20, 30))
)
#> # A tibble: 4 × 2
#>   years  value
#>   <dbl>  <dbl>
#> 1     5 14026.
#> 2    10 19672.
#> 3    20 38697.
#> 4    30 76123.
show/hide
import numpy as np

def future_value(present_value, rate, years):
    return present_value * (1 + rate) ** years

def rule_of_72(annual_return_pct):
    return 72 / annual_return_pct

# scalar: $10,000 at 7% for 10 years
print(future_value(present_value=10000, rate=0.07, years=10))
#> 19671.513572895663

# how long until your money doubles at 7%?
print(rule_of_72(annual_return_pct=7))
#> 10.285714285714286

# vectorized: numpy lets us pass an array of horizons in one call
horizons = np.array([5, 10, 20, 30])
future_value(present_value=10000, rate=0.07, years=horizons)
#> array([14025.517307  , 19671.5135729 , 38696.84462486, 76122.55042662])

Future Value of Regular Contributions

Investing a fixed amount every month builds wealth in two ways: the money you put in, and the growth earned on all previous contributions. The chart below separates these two layers so you can see when growth overtakes contributions.

$500/month contributions at 7% — contributed vs. gains

$500/month contributions at 7% — contributed vs. gains

The formula sums all those contribution bars growing at different rates — the annuity formula collapses that sum into a single calculation.

Formula: FV = PMT × [((1 + r)^n − 1) ÷ r]

Where: PMT = the amount contributed each period, r = the return per period, n = the number of periods.

Example: $500/month for 30 years (360 months) at a 7% annual return (~0.583% per month) grows to ~$610,000, of which only $180,000 is money you actually put in.

show/hide
future_value_series <- function(contribution, rate, periods) {
  contribution * (((1 + rate)^periods - 1) / rate)
}

# $500/month for 30 years at a 7% annual return (monthly rate = 0.07 / 12)
future_value_series(contribution = 500, rate = 0.07 / 12, periods = 30 * 12)
#> [1] 609985.5
show/hide
def future_value_series(contribution, rate, periods):
    return contribution * (((1 + rate) ** periods - 1) / rate)

# $500/month for 30 years at a 7% annual return (monthly rate = 0.07 / 12)
future_value_series(contribution=500, rate=0.07 / 12, periods=30 * 12)
#> 609985.4978879723

Real (Inflation-Adjusted) Return

A 7% nominal return sounds good, but inflation is quietly shrinking the purchasing power of every dollar. The chart below shows the three quantities: the stated return, the inflation cost, and what actually remains.

Nominal return, inflation, and real return

Nominal return, inflation, and real return

The real return is what’s left after inflation takes its slice — not a simple subtraction, but a ratio, because the percentages compound.

Formula: Real Return = (1 + nominal) ÷ (1 + inflation) − 1

Example: (1.07 ÷ 1.03) − 1 = ~3.88%, slightly less than the 4% you’d get by simple subtraction.

show/hide
real_return <- function(nominal, inflation) {
  (1 + nominal) / (1 + inflation) - 1
}

# 7% nominal return against 3% inflation
real_return(nominal = 0.07, inflation = 0.03)
#> [1] 0.03883495
show/hide
def real_return(nominal, inflation):
    return (1 + nominal) / (1 + inflation) - 1

# 7% nominal return against 3% inflation
real_return(nominal=0.07, inflation=0.03)
#> 0.03883495145631066

9.8 Key Takeaways

  1. Compounding is the force multiplier. Start early, even with small amounts. Time matters more than size.

  2. The Rule of 72 reframes spending. Money you don’t spend today doubles every 7–10 years. Saving $50/month for 30 years becomes ~$150,000 after compounding.

  3. Buy broadly through index funds. Don’t pick stocks. Own the entire market through low-cost index funds (0.03–0.1% in fees).

  4. Asset allocation (stock/bond split) matters more than stock picking. A boring 80/20 portfolio beats an exciting portfolio you abandon in a downturn.

  5. Use tax-advantaged accounts first. A $10,000 Roth IRA investment saves you $9,200+ in taxes over 30 years compared to a taxable account. Account type beats stock picking.

  6. Stay invested through downturns. Crashes are features, not bugs. They happen every 5–10 years; they recover. Selling and missing the recovery is fatal to returns.

  7. Behavioral discipline beats optimization. A portfolio you follow for 30 years beats a perfect portfolio you abandon after 18 months.

You now have the foundation: budget control, savings discipline, and an investing framework. The next chapters show you how to apply these principles in real scenarios—managing debt, building an emergency fund, and making your money automatic.


  1. Ben Felix and John Bogle both emphasize that investing is a decades-long endeavor. The goal is not to beat the market (nearly impossible after fees) but to capture market returns efficiently through low-cost, diversified index funds. Morgan Housel adds: the behavioral discipline to stay invested through downturns matters more than the specific holdings.↩︎