Saving protects what your money can buy; investing grows it. Once your budget is under control and your emergency fund is secure, your next job is to put your accumulated savings to work in the market. The goal isn’t to get rich quick. It’s to let time and compounding build wealth at a pace most people never reach. In this chapter I’ll cover the basics: compounding, what to own, how much risk to take, and which accounts to use.1
9.1 Compounding (the force multiplier)
Compounding is just interest earning interest. Over long stretches of time, it does the heavy lifting. A dollar invested today becomes several dollars after 30 years, not through luck, but through the math of exponential growth.
If you memorize one shortcut, make it the Rule of 72:
Years to double your money = 72 ÷ annual return %
At a 7% return, money doubles about every 10 years. At 10%, about every 7 years. Over 30 years, compounding transforms modest regular contributions into wealth.
The code below grows $10,000 at 7% for 40 years: R plots the balance each year, and Python returns the ending balance.
show/hide
library(ggplot2)growth <-data.frame(years =0:40)growth$balance <-10000* (1.07)^growth$yearsggplot(growth, aes(x = years, y = balance)) +geom_line(colour ="#0e9aa7", linewidth =1.2) +scale_y_continuous(labels =function(x) paste0("$", round(x /1000), "k")) +labs(x ="Years", y ="Balance",title ="$10,000 at 7% compounded annually") +theme_minimal(base_size =12) +theme(panel.grid.minor =element_blank())
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)
Most people only need to own three things: stocks, bonds, and cash (which you’ve already saved). The specific split depends on your time horizon (how many years until you need the money) and your risk tolerance (how big a drop you can watch without selling).
Stocks (small pieces of ownership in companies, bought through broad index funds): 70% to 90% of your portfolio if you have 20 years or more
Bonds (loans to governments and companies that pay you interest, also through index funds): 10% to 30% for stability during 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 simple: trying to beat the market costs you money in fees and taxes, so buy the entire market through low-cost index funds instead.
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 (sell a little of whatever grew the most and buy more of what lagged, so you return to 80/20). The whole thing costs about 0.03% per year in fees.
Not everyone agrees young investors need bonds at all; the Asset Allocation chapter covers that disagreement.
9.3 Risk vs. Return: Choose What You Can Live With
Higher expected returns come with bigger swings in value (volatility). A 100% stock portfolio might return 10% per year on average, but it can drop 40% in a bad year. A 60/40 portfolio (60% stocks, 40% bonds) returns about 7% on average but drops only about 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 here: a portfolio you abandon in a bear market (a stretch when stock prices fall 20% or more from a recent high) performs worse than a boring portfolio you maintain.
9.4 Diversification (don’t bet on one horse)
Don’t bet on one company, one industry, 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 takes a real bite out of your portfolio.
9.5 Tax-Advantaged Accounts (where to hold your investments)
Steps 5 to 7 of the Financial Order of Operations (Section 1) tell you what accounts to use. Tax-advantaged means the government lets the money grow without taxing it every year:
Account
Contribution Limit (2026)
Tax Benefit
Best for
401(k) / 403(b)
$24,500/year
Lowers your taxable income now, employer match
Employees with matching
Roth IRA
$7,500/year
Tax-free growth forever
Tax-free income in retirement
Traditional IRA
$7,500/year
Lowers your taxable income now
Paying less tax this year
HSA (if eligible)
$4,400/year (self)
No tax going in, growing, or coming out for medical costs
Medical expenses and retirement
Taxable account
Unlimited
None, but flexible
After maxing above
Here is the account order from the table as a sequence:
%%{init: {'theme': 'neutral', 'themeVariables': { 'fontFamily': 'monospace', "darkMode":false, "fontSize":"16px"}}}%%
flowchart TD
A("i. 401(k) up to the<br>employer match")
B("ii. Roth IRA or HSA")
C("iii. Max out the 401(k)")
D("iv. Taxable brokerage<br>account")
A --> B
B --> C
C --> D
style A fill:#48a56a,color:#F5F2E8,stroke:#1C1C1E,stroke-width:2px
style B fill:#0e9aa7,color:#F5F2E8,stroke:#1C1C1E,stroke-width:2px
style C fill:#0e9aa7,color:#F5F2E8,stroke:#1C1C1E,stroke-width:2px
style D fill:#86ddcd,color:#1C1C1E,stroke:#1C1C1E,stroke-width:2px
Which Account Gets the Next Dollar?
Work through the steps in order; the sequence is designed to make each dollar work as hard as possible.
NoteWhy Account Type Matters
A $10,000 investment earning 7% a year grows to about $76,000 after 30 years. If held in a regular brokerage account, you pay taxes on the gains when you sell: at the 15% long-term capital gains rate most people pay, that’s about $66,000 × 15% = $9,900. In a Roth IRA, you pay $0. Same investment; the account type makes a difference of about $9,900 over 30 years. Choosing the right account matters more than picking stocks.
9.6 Common Investing Mistakes (what to avoid)
Trying to time the market. Even professionals can’t predict short-term market moves. Time in the market beats timing the market.
Chasing past performance. Last year’s best fund is often this year’s worst. Buy broadly; avoid chasing.
Paying high fees. A 1% fee doesn’t sound bad, but over 30 years it cuts your wealth by about 25%. Low-cost index funds cost 0.03% to 0.1%.
Keeping too much in cash. After your emergency fund, cash earning 4% barely keeps pace with inflation, so it won’t grow your wealth. You need growth.
Selling in a panic. The stock market drops about 10% every year or two. If you sell every time, you lock in losses and miss recoveries. Stay invested.
As Morgan Housel points out, 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. Just like we did in the Budgeting chapter, I’ve written each calculation below as an R and Python function.
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.
Check: the Rule of 72 gives 72 ÷ 7 ≈ 10.3 years to double, so $10,000 should be close to $20,000 after 10 years.
Assuming the present value is in A2, the rate is in B2 (as a decimal), and the years are in C2:
=A2*(1+B2)^C2
Excel also has a built-in function that returns the same number:
=FV(B2, C2,0,-A2)
For the Rule of 72, put the annual return as a whole number (7, not 0.07) in E2:
=72/E2
To compare several horizons, list the years down column C and copy the first formula down.
The Python version of future_value() works the same way:
show/hide
import numpy as npdef future_value(present_value, rate, years):return present_value * (1+ rate) ** yearsdef rule_of_72(annual_return_pct):return72/ annual_return_pct# scalar: $10,000 at 7% for 10 yearsprint(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 callhorizons = 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])
In R, future_value() multiplies a starting amount by (1 + rate) once for every year.
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 yearsfuture_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 horizonsdata.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.
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
Each contribution grows for a different number of months, and the formula below (called the annuity formula, for a series of equal payments) adds all of them up in 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 (about 0.583% per month) grows to about $610,000, of which only $180,000 is money you actually put in.
Check: you put in $500 × 360 = $180,000, so growth added about $430,000, more than twice what you contributed.
Assuming the monthly contribution is in A2, the annual rate is in B2 (as a decimal), and the number of years is in C2:
=A2*(((1+B2/12)^(C2*12)-1)/(B2/12))
The built-in FV() function gives the same answer:
=FV(B2/12, C2*12,-A2)
The Python version of future_value_series() works the same way:
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
In R, future_value_series() applies the formula to a regular contribution.
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
Real (Inflation-Adjusted) Return
A 7% nominal return (the number before inflation) sounds good, but inflation is quietly shrinking what every dollar can buy. 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. It’s not a simple subtraction but a ratio, because the percentages compound.
Compounding is the force multiplier. Start early, even if the amounts are small; time matters more than size.
The Rule of 72 reframes spending. Money you don’t spend today doubles every 7 to 10 years, so investing $50/month for 30 years at 7% becomes about $61,000.
Buy broadly through index funds. You don’t need to pick stocks. Own the entire market through low-cost index funds (0.03% to 0.1% in fees).
Asset allocation (stock/bond split) matters more than stock picking. A boring 80/20 portfolio beats an exciting one you abandon in a downturn.
Use tax-advantaged accounts first. A $10,000 Roth IRA investment saves you about $9,900 in taxes over 30 years compared to a taxable account. Where you hold your investments matters more than which stocks you pick.
Stay invested through downturns. Crashes are features, not bugs. They happen every 5 to 10 years, and they recover. Selling and missing the recovery is what does the real damage to your returns.
Sticking with it beats finding the perfect plan. A portfolio you follow for 30 years will beat a perfect one you abandon after 18 months.
At this point you have the foundation: budget control, savings discipline, and an investing framework. In the next chapters we’ll go deeper on the investing side: retirement accounts, index funds, and asset allocation.
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.↩︎