Investing Basics
Each topic starts with a real scenario and a bar model, then three levels of exercises. Level 1 (Guided) fills in the blanks of a finished function. Level 2 (Practice) applies it to new numbers. Level 3 (Challenge) asks a new question with little scaffolding. The R and Python exercises run in your browser: click Run Code to try, Submit Answer to check, and use the hint or solution if you get stuck. Excel exercises have a solution you can reveal.
1 Book Topics
- Compounding: interest earning interest; the Rule of 72 says years to double ≈ 72 ÷ annual return % (about 10 years at 7%, about 7 years at 10%); $10,000 at 7% for 40 years
- The core portfolio: stocks (70 to 90% with 20+ years), bonds (10 to 30%), and cash (the emergency fund, kept separate); a simple default is 80% total stock market and 20% total bond market index funds, rebalanced once a year for about 0.03% in fees
- Risk vs. return: 100% stocks might average 10% but drop 40% in a bad year; 60/40 averages about 7% and drops about 20%; pick the split you can stick with through a bear market
- Diversification: one dollar in a total market fund owns thousands of companies, so one failure barely matters
- Tax-advantaged accounts: 2026 limits for the 401(k)/403(b) ($24,500), Roth and Traditional IRA ($7,500), HSA ($4,400 self), and taxable accounts; fill them in order (401(k) to the match, Roth IRA or HSA, max the 401(k), then taxable); $10,000 at 7% for 30 years grows to about $76,000, saving about $13,200 in taxes in a Roth
- Common mistakes: timing the market, chasing past performance, paying high fees (1% over 30 years costs about 25%), holding too much cash, and selling in a panic
2 Future Value and the Rule of 72
Each year’s growth is applied to a bigger base, so the balance curves upward instead of rising in a straight line.
Formula: FV = PV × (1 + r)^n
Rule of 72: Years to double ≈ 72 ÷ annual return %
Example: $10,000 at 7% for 10 years grows to about $19,672, and at 7% money doubles roughly every 10 years.
The Rule of 72 is a shortcut. The exact doubling time is log(2) ÷ log(1 + r). The shortcut is very close for returns between about 4% and 12%, and drifts further off at the extremes.
Read the result as “what one deposit becomes if you leave it alone.” At 7%, the Rule of 72 says 10.3 years and the exact answer is 10.2 years, so the shortcut is good enough for planning.
2.1 Level 1: Guided
Fill in the blanks to finish future_value(), then find what $10,000 grows to in 10 years at 7%.
Put the amount in A2 (10000), the rate in B2 (0.07), and years in C2 (10). Find the future value in D2.
=A2*(1+B2)^C2This returns $19,671.51. =FV(B2, C2, 0, -A2) gives the same answer.
Grow by (1 + rate) once for every year.
def future_value(present_value, rate, years):
return present_value * (1 + rate) ** years
future_value(10000, 0.07, 10)Grow by (1 + rate) once for every year.
future_value <- function(present_value, rate, years) {
present_value * (1 + rate)^years
}
future_value(10000, 0.07, 10)2.2 Level 2: Practice
Leave the same $10,000 invested for 40 years at 7%. What is it worth?
Change C2 to 40.
The same formula returns $149,744.58, about four doublings.
Same amount and rate, 40 years.
future_value(10000, 0.07, 40)Same amount and rate, 40 years.
future_value(10000, 0.07, 40)2.3 Level 3: Challenge
The Rule of 72 (72 ÷ return %) estimates doubling time. The exact time is ln(2) ÷ ln(1 + r). For whole-number returns from 1% to 15%, at which return is the rule closest to exact?
Put returns 1 to 15 in A2:A16. Find the rule in B, the exact time in C, and the gap in D, then the return with the smallest gap.
In B2: =72/A2. In C2: =LN(2)/LN(1+A2/100). In D2: =ABS(B2-C2). Fill down, then:
=INDEX(A2:A16, MATCH(MIN(D2:D16), D2:D16, 0))The answer is 8%: 9 years by the rule, 9.006 exact.
The exact time is math.log(2) / math.log(1 + r / 100). Use min(returns, key=lambda r: abs(...)).
import math
returns = range(1, 16)
min(returns, key=lambda r: abs(72 / r - math.log(2) / math.log(1 + r / 100)))The exact time is log(2) / log(1 + returns / 100). Find the gap for every return, then returns[which.min(gap)].
returns <- 1:15
gap <- abs(72 / returns - log(2) / log(1 + returns / 100))
returns[which.min(gap)]3 Future Value of Regular Contributions
Investing a fixed amount every month builds wealth two ways: the money you put in, and the growth on everything you put in before.
Formula: FV = PMT × [((1 + r)^n − 1) ÷ r]
Example: $500/month for 30 years (360 months) at a 7% annual return (about 0.583% per month) grows to about $610,000, and only $180,000 of that is money you put in.
Starting earlier matters more than putting in more. The second example compares the same $500/month started at 25, 35, and 45, all ending at 65. The book’s recap number ($50/month for 30 years is about $61,000) is the same math at one tenth the size.
Read the result as two layers. At 30 years, about 70% of the $610,000 is growth, not deposits. Starting at 25 instead of 45 more than quadruples the ending balance while only doubling what you put in.
3.1 Level 1: Guided
Fill in the blanks to finish future_value_series(), then find what $500 a month grows to in 30 years at a 7% yearly return.
Find the value in one formula with a monthly rate and 360 months.
=FV(7%/12, 360, -500)This returns $609,985.50.
The growth factor is raised to the number of periods, and divided by the rate.
def future_value_series(contribution, rate, periods):
return contribution * (((1 + rate) ** periods - 1) / rate)
future_value_series(500, 0.07 / 12, 30 * 12)The growth factor is raised to the number of periods, and divided by the rate.
future_value_series <- function(contribution, rate, periods) {
contribution * (((1 + rate)^periods - 1) / rate)
}
future_value_series(500, 0.07 / 12, 30 * 12)3.2 Level 2: Practice
Two people invest $500 a month at 7% until 65. One starts at 25 (40 years), the other at 35 (30 years). How much more does the early starter end with?
Find both values and the difference.
=FV(7%/12, 480, -500) - FV(7%/12, 360, -500)This returns $702,421.20, for only $60,000 more put in.
40 years is 480 months; 30 years is 360.
m = 0.07 / 12
future_value_series(500, m, 480) - future_value_series(500, m, 360)40 years is 480 months; 30 years is 360.
m <- 0.07 / 12
future_value_series(500, m, 480) - future_value_series(500, m, 360)3.3 Level 3: Challenge
A third person starts at 45 (20 years until 65). How much do they need to invest each month at 7% to match the 25-year-old’s total from $500 a month?
Find the monthly amount in one formula.
=PMT(7%/12, 240, 0, -FV(7%/12, 480, -500))This returns $2,519.37 a month, five times as much.
The series formula is contribution × factor, so contribution = goal ÷ factor, where factor = ((1 + m) ** 240 - 1) / m.
m = 0.07 / 12
goal = future_value_series(500, m, 480)
goal / (((1 + m) ** 240 - 1) / m)The series formula is contribution × factor, so contribution = goal ÷ factor, where factor = ((1 + m)^240 - 1) / m.
m <- 0.07 / 12
goal <- future_value_series(500, m, 480)
goal / (((1 + m)^240 - 1) / m)4 Real (Inflation-Adjusted) Return
Inflation shrinks what each dollar buys, so the return that matters is what’s left after inflation.
Formula: Real Return = (1 + nominal) ÷ (1 + inflation) − 1
Example: (1.07 ÷ 1.03) − 1 = about 3.88%, a little less than the 4% you’d get by simple subtraction.
The second example compares several investments against 3% inflation. Cash earning 4% (one of the book’s common mistakes) barely beats inflation, and cash earning less than inflation has a negative real return. The last line shows what $76,123 (the book’s 30 year example) is worth in today’s dollars.
Read a negative real return as “losing buying power, even though the balance went up.” The $76,123 in 30 years buys about what $31,400 buys today, which is why the book says to think in real terms.
4.1 Level 1: Guided
Fill in the blanks to finish real_return(), then find the real return of 7% against 3% inflation. Give a decimal.
Put the nominal return in A2 (0.07) and inflation in B2 (0.03). Find the real return in C2.
=(1 + A2) / (1 + B2) - 1This returns 0.0388, a little under the 4% from simple subtraction.
Divide what your money grows by (1 + nominal) by what prices grow by (1 + inflation).
def real_return(nominal, inflation):
return (1 + nominal) / (1 + inflation) - 1
real_return(0.07, 0.03)Divide what your money grows by (1 + nominal) by what prices grow by (1 + inflation).
real_return <- function(nominal, inflation) {
(1 + nominal) / (1 + inflation) - 1
}
real_return(0.07, 0.03)4.2 Level 2: Practice
A high-yield savings account pays 4%. With 3% inflation, what is its real return?
Change A2 to 0.04.
The same formula returns 0.0097, just under 1% a year of real growth.
Nominal 0.04, inflation 0.03.
real_return(0.04, 0.03)Nominal 0.04, inflation 0.03.
real_return(0.04, 0.03)4.3 Level 3: Challenge
$10,000 invested at 7% for 30 years, with 3% inflation. What is it worth in today’s dollars?
Find the value in today’s dollars in one formula.
=10000 * (1.07/1.03)^30This returns $31,361.48. The statement will say $76,123, but it only buys what $31,361 buys today.
Use 10000 * (1 + real_return(0.07, 0.03)) ** 30.
10000 * (1 + real_return(0.07, 0.03)) ** 30Use 10000 * (1 + real_return(0.07, 0.03))^30.
10000 * (1 + real_return(0.07, 0.03))^30




