…
…
Financial Literacy and Economics Fundamentals · Lesson 19 / 35 · Emergency fund and saving for a goal
PreviewIn this lesson you will
You can read the explanation without an account. The exercises and quiz at the end of the lesson are for members.
Alex had two surprises this year, and both ended up as debt: the laptop that broke in February was covered with a loan, and the café shifts that dropped in June were covered with a payment squeeze. In this lesson you will calculate how to pay for a surprise from your own buffer instead of from debt. How many dollars, in how many months, and where?
In Unit 4 you looked at Alex's debts: the installment table, the minimum payment on the credit card, the offers, and the plan for getting out of debt. This unit changes direction. The question is no longer "how do I pay off the debt?" but "what can I do so the next surprise does not push me into debt?" The first step is a separate cushion of money for the unexpected costs that life always brings.
In this lesson you will:
When an unexpected cost arrives, the money can come from two places. The first is debt: a loan, a credit card, a cash advance, money from a friend. Debt solves the surprise today, but sends the bill into the future: interest is added, a payment comes due every month, and if you miss a month, late fees start (lesson 17). The second way is a buffer: you pay from money you set aside earlier. There is no interest and you owe nobody; all you have to do is refill what you used over the following months.
The name of this second way is an emergency fund: a separate, easy-to-reach savings amount that is large enough to cover a few months of living without borrowing when your income stops or an unexpected essential cost appears. The word "separate" matters. If the fund sits inside your everyday spending money, you spend it without noticing. If it is mixed with the money you are saving for a trip or a new phone, then when the surprise comes you avoid using it because "this money was for something else".
Example 1 (case): Alex's two surprises and their cost
| Surprise | How it was covered | Cost |
|---|---|---|
| February: the laptop broke, $500 short (lesson 14) | 12-month loan, example rate of 3 percent a month | $102.75 in interest |
| June: café shifts dropped (lesson 17) | Minimum payments became hard to make; asked a friend to wait, cut spending | One month of squeeze, risk of late fees |
If Alex had had $500 set aside for the laptop, the picture would look like this: $0 in interest, and the $500 used would need to be saved again in later months. In both cases Alex sets money aside for months; the difference is that in one case $102.75 goes to someone else. In June, even a single month of buffer would have meant no asking a friend to wait and no coming close to late fees.
Many people say at this point: "I have a credit card for emergencies, so I do not need a fund." Remember lesson 15: card debt is expensive debt, because interest is charged every month on the balance, and the interest on a cash advance starts on the first day. A card can be an emergency tool, but it is not a free buffer. Compare the two with numbers in the question below.
Alex has an unexpected $300 dental bill. Is it cheaper to pay with the card and pay it off at $75 a month (example rate of 4 percent a month), or to pay from the fund and refill the fund over 4 months?
To find how big the fund should be, first ask: "If my income stopped tomorrow, what would I still have to pay every month to keep going?" The answer is your essential costs: housing, food, transportation, communication, and debt payments that would cause late fees if missed. In lesson 2 you separated needs from wants; here you make the same separation. Eating out, clothes, entertainment, or a subscription can be cut or postponed in a hard period, so they are not part of the fund calculation.
Fund target = monthly essential costs x number of months
How many months? A common rule of thumb in personal finance sources is "3 to 6 months of essential costs". This is not a law or an official rule; it is an estimate that came from experience. Someone with a steady income stays near the low end; someone whose income changes from month to month, or who might need a long time to find a new job if they lose theirs, stays closer to the high end.
Let's go back to Alex's September table (lesson 1) and pick only the essential lines: dorm $120, food (cafeteria and groceries) $210, transit card $30, phone $17.50. The total is 120 + 210 + 30 + 17.50 = $377.50. The 3-month target is 377.50 x 3 = $1,132.50; the 6-month target is 377.50 x 6 = $2,265. Eating out and coffee ($92.50), clothes ($75), entertainment ($55), and subscriptions ($10) were not counted; even though all of Alex's costs add up to $675, the measure for the fund is $377.50.
Calculating with all costs looks "safer" at first, but it makes the target bigger than it needs to be: for Alex the 3-month target would be $2,025 instead of $1,132.50. When a target looks out of reach, people do not start at all. In the matching exercise below, you decide which costs go into the fund.
Place each cost in the right group: does it count toward the emergency fund calculation?
For each row, pick its match from the list, then check.
Once the target is clear, the second question comes: when will I get there? For this you need two pieces of information: how much savings you have right now, and how much you can set aside each month. You subtract the current savings from the target, then divide the remaining gap by the monthly amount. We will call this the time to reach a savings goal:
Time (months) = (target - current savings) / monthly amount set aside, rounded up
Why up? Because there is no such thing as 13.8 months; at the end of month 13 you have not reached the target yet, and you reach it in month 14. If you round down, you say "done" before you have reached the target. Think of putting the same number of coins into a piggy bank every month: you find how many months it takes to fill by dividing the missing space by each month's share, and the last month counts even if it is only half full.
For Alex: (1,132.50 - 100) / 75 = 1,032.50 / 75 = 13.77, so 14 months. This may look like a long road. That is why it helps to put an interim goal in the middle of the road: 1 month of essential costs, which is $377.50. To get there, (377.50 - 100) / 75 = 3.7, so 4 months is enough. After four months, Alex can pay the essential costs even if there is no income at all for a month.
The fund line rises above the interim goal in month 4 and above the 3-month goal in month 14. Now change two numbers together: how does the time change if Alex sets aside a different amount and picks a different number of months for the goal? You do not need to read the code; choose the values and watch the time in the output.
Change the monthly saving ($50, $75, $125) and the number of months in the goal (3 or 6). Current savings are $100 and monthly essential costs are $377.50.
Pick a value; predict the output first, then look.
1import math2monthly_saving = 753goal_months = 34essential_costs = 377.505current_savings = 1006goal = essential_costs * goal_months7months = math.ceil((goal - current_savings) / monthly_saving)8print(f"Goal: ${goal:,.2f}")9print("Time:", months, "months")
Goal: $1,132.50 Time: 14 months
Faded lines didn't run with this value. Raising the monthly amount from $50 to $125 cuts the time for the 3-month goal from 21 months to 9: it gets more than half as short. Raising the goal from 3 months to 6 more than doubles the time (from 14 months to 29 at $75), because the current $100 stays the same while the missing part grows from $1,032.50 to $2,165.
Two lessons come out of this block. First, a small increase in the monthly amount shortens the time more than you might expect; someone who sets aside $125 instead of $75 reaches the 3-month goal in 9 months instead of 14. Second, a 6-month goal may look like "twice the work" at first, but because the share of current savings gets smaller, it stretches the road to more than twice as long. That is why, for someone with a steady income, finishing the 3-month goal first and growing it later if needed is a more reachable path.
Sometimes the question comes the other way: the date you want to reach is fixed, and the monthly amount is what you do not know. Then you turn the same formula around:
Monthly amount needed = (target - current savings) / number of months, rounded up
This calculation works not only for an emergency fund but for any savings goal: a trip, the deposit for a first rental home, a new laptop. These goals are kept separate from the fund. The fund is for days when "you do not know what will happen"; a trip is a cost whose date you do know. If the two sit in the same place, either the trip eats the fund or the fund blocks the trip.
Example 2 (case): A graduation trip
After graduation Alex is thinking about a trip with friends; $450 is needed in 7 months, and there is no savings yet for this goal. The monthly amount needed is 450 / 7 = $64.29, which rounds up to $65. But the total Alex can set aside is $75, and it has to cover both the fund and the trip. Let's try a few splits: $50 for the fund and $25 for the trip, or $10 and $65.
| Split | Fund (to the 3-month goal) | Trip ($450) |
|---|---|---|
| All to the fund: $75 + $0 | 14 months | Never saved |
| $50 fund + $25 trip | (1,132.50 - 100) / 50 = 20.65, so 21 months | 450 / 25 = 18 months |
| $10 fund + $65 trip | (1,132.50 - 100) / 10 = 103.25, so 104 months | 7 months |
There is no free option in the table. If Alex wants the trip in 7 months, the fund almost stops; if the fund comes first, the trip slips by more than a year. This is exactly the opportunity cost from lesson 3: the same $75 cannot go to two places at once. Which split is right does not come from the numbers but from Alex's priorities; the numbers just show the cost of each choice clearly.
Alex wants $450 for a trip in 7 months and has no savings for this goal. What is the least Alex should set aside each month?
Marco, one of the side characters in Alex's story, is a freelance graphic designer. He earns as work comes in: $750 one month, $300 the next. His essential costs are the same every month: $425. Look at his last six months in the chart below.
In two of the six months, income falls below essential costs. Marco's total income over six months is $3,150, and his average is $525 a month: "comfortable" on average. But as you saw in lesson 1, an average that is enough does not mean every month is enough. With an income like this, the fund does two jobs at once: it is a cushion against surprises and also an income smoother. In good months a share of the surplus goes into the fund, and in bad months the gap is covered from the fund. That is why it makes sense for someone with an irregular income to keep the fund near the high end, close to 6 months: bad months can come one after another.
Example 3 (outside the case): A café that slows down in winter
The same logic works in a business too. A small café has fixed monthly costs (rent, wages, bills) of $2,000. In summer there are many customers and sales easily cover these costs; in winter sales drop and in some months fall below the fixed costs. The owner aims for a 3-month cash buffer: 2,000 x 3 = $6,000. In summer the owner puts part of the extra profit into this buffer each month; when winter comes, the gap is covered from the buffer, and there is no need to look for a loan to pay the rent or wages. Marco's fund and the café's buffer are the same idea at two scales.
Even for someone with a steady income, the hardest part is actually setting money aside every month. Many people's plan is: "I will save whatever is left at the end of the month." Remember present bias from lesson 4: the pleasure of a small purchase today always weighs more than a security months away. During the month, every spending decision is made one by one, and each time you say "what difference does this little bit make?" By the end of the month, there is often nothing left.
The rule that works the other way around is called pay yourself first: on the day your income arrives, you move the savings share to a separate account, and you spend with what remains during the month. Instead of saving what is left after spending, you spend what is left after saving. The best version is the automatic one: an automatic transfer (lesson 5) that runs on the day your income arrives makes the decision once, so you do not have to ask "should I set money aside this month too?" every month. It is like setting aside tomorrow's food in a separate container before you put food on your plate: you eat whatever is on your plate, and tomorrow's share is already put away.
Alex says "I will save whatever is left at the end of the month." Over the last 4 months, the amounts left at the end of the month were $15, $0, $45, and $0. If Alex had set aside $50 at the start of each month with "pay yourself first" and spent according to what was left, how much would be in the fund after 4 months?
For someone who owes money, the hardest question is this: do I put the money I have toward the debt, or toward the fund? Both extreme answers lead to the wrong place. Someone who says "I will complete the fund first, and the debts can wait" pays interest every month on a high-interest debt while holding savings with a low return. Someone who says "I will wait for the debts to end before building a fund" goes back to the card at the first surprise, and the plan to get out of debt starts over. The order often suggested in personal finance sources goes between the two:
1. A small starter fund: enough to cover one surprise, for example 1 month of essential costs or a small amount of savings you already have.
2. High-interest debts: first the one with the highest interest (the avalanche method from lesson 17), for example the credit card.
3. The full fund: 3 to 6 months of essential costs.
4. Other goals: a trip, a deposit, long-term saving.
Where the fund is kept also matters, but here you look for three features, not a product. First, it should be easy to reach right away: an emergency does not wait, and you must be able to get the money that day. Second, its value should not swing: if the fund sits in a place that has lost 20 percent of its value in the month you need it, it stops being a cushion. Third, it should be kept apart from your everyday spending account: if it sits in the same account, it gets spent without you noticing. These features have a cost: a place like this earns either no return or a small one, and as you saw in lesson 12, it can lose real value against inflation. Think of this loss as the fund's insurance premium: a small, predictable cost you pay so you do not fall into debt when a surprise comes.
Now try this order on a decision. Let's go back to a moment before Alex's debt ended: the first month of the plan in lesson 17 is over, and some card debt remains.
Alex's card debt is $232 (example rate of 4 percent a month), savings are $100, and the amount Alex can set aside is $75 a month. Where should Alex start?
Pick an option and see what happens. There are no points; you can try the other options too.
Let's turn the whole lesson into a roadmap. First you find how much you need, then how many months it takes, then you make the saving automatic. The last step is often forgotten: the fund will be used one day, so the plan must also say how to refill it after use. Put the steps below in the right order.
Put the steps for building an emergency fund in the right order.
Click the lines in order; to undo one you placed wrong, click it in the list below.
Shuffled lines
Your order
Let's put the two paths from the scenario side by side. Alex's card debt is $232, savings are $100, and Alex can set aside $75 a month (example rate of 4 percent a month; after the payment, one month of interest is added to the remaining debt).
OutputPath A: $100 stays as the fund, $75 goes to the card
Card at end of month 1: (232 - 75) x 1.04 = 163.28
Card at end of month 2: (163.28 - 75) x 1.04 = 91.81
Card at end of month 3: (91.81 - 75) x 1.04 = 17.48
Month 4: $17.48 is paid, the card is done; fund $100
Path B: $75 to the fund, only the interest on the card
Interest in the first month on the card: 232 x 0.04 = 9.28
If the debt never shrinks, interest paid over 4 months: 4 x 9.28 = 37.12On Path A, after four months the debt is gone and the $100 buffer is still in place. On Path B the fund grows, but about $9 of card interest goes out every month.
Alex starts with $100 and sets aside $75 each month; in month 3, a $60 surprise cost is paid from the fund.
OutputMonth 0 : 100
Month 1 : 100 + 75 = 175
Month 2 : 175 + 75 = 250
Month 3 : 250 + 75 - 60 = 265 (surprise paid from the fund)
Month 4 : 265 + 75 = 340
Month 5 : 340 + 75 = 415 (interim goal 377.50 passed)
Month 6 : 415 + 75 = 490Without the surprise, the interim goal would be reached in month 4 (400); the $60 withdrawal delayed it by one month, but Alex did not go into debt.
Zara is 17 and gets a weekly allowance of $25. She wants $150 headphones, has $30, and decides to set aside $7.50 a week from her allowance as soon as it arrives.
OutputMissing : 150 - 30 = 120
Time : 120 / 7.50 = 16 weeks
If she set aside $10 a week: 120 / 10 = 12 weeksThe formula is the same, only the unit changed: weeks instead of months. The calculation for saving toward a goal is the same two steps whatever the amount and time: find the missing part, divide by the regular share.
Rounding the time down and forgetting the current savings. A student wrote this for Alex's fund:
| Line | Wrong | Right |
|---|---|---|
| Calculation | 1,132.50 / 75 | (1,132.50 - 100) / 75 |
| Result | 15.1 | 13.77 |
| Rounding | "15 months" | "14 months" (up) |
When the current $100 is forgotten, the time comes out longer than it should; and when the result is then rounded down, "done" is said at the end of month 15 even though the goal has not been reached. First find the missing part, then divide, then always round up: the small amount still missing in the last month takes a month too.
Next lesson: You will go beyond the fund to learn the types of assets, and see where the return on each comes from and what risk it carries.
This content is for education only and is not investment advice.
Exercises and quiz are for members
This lesson has 7 coding exercises and a 10-question quiz. Sign up free to solve them, save your progress and move on to the next lesson.
$ · Course example (fictional)
| — | Fund | Interim goal: 1 month (377.50) | Goal: 3 months (1,132.50) |
|---|---|---|---|
| 0 | 100 | 377.5 | 1132.5 |
| 1 | 175 | 377.5 | 1132.5 |
| 2 | 250 | 377.5 | 1132.5 |
| 3 | 325 | 377.5 | 1132.5 |
| 4 | 400 | 377.5 | 1132.5 |
| 5 | 475 | 377.5 | 1132.5 |
| 6 | 550 | 377.5 | 1132.5 |
| 7 | 625 | 377.5 | 1132.5 |
| 8 | 700 | 377.5 | 1132.5 |
| 9 | 775 | 377.5 | 1132.5 |
| 10 | 850 | 377.5 | 1132.5 |
| 11 | 925 | 377.5 | 1132.5 |
| 12 | 1000 | 377.5 | 1132.5 |
| 13 | 1075 | 377.5 | 1132.5 |
| 14 | 1150 | 377.5 | 1132.5 |
$ · Course example (fictional)
| — | Income | Essential costs |
|---|---|---|
| Month 1 | 450 | 425 |
| Month 2 | 750 | 425 |
| Month 3 | 300 | 425 |
| Month 4 | 600 | 425 |
| Month 5 | 350 | 425 |
| Month 6 | 700 | 425 |