LiberFi logo
LiberFi
HomeAppToolsArticlesAbout
LiberFi logo
LiberFi

Turn your money into freedom.

YouTubeInstagramTikTok

Navigation

  • Home
  • App
  • Tools
  • Articles
  • About
  • Contact

Resources

  • Articles
  • Tools

Legal

  • Privacy
  • Terms

© 2026 LiberFi. All rights reserved.

Cover image for How to Calculate Your Emergency Fund (Optimized)
Personal Finance
23 min read

How to Calculate Your Emergency Fund (Optimized)

Calculate the right emergency fund with a research-based formula. Find out when to start saving for it, how much to keep and how to build it without sacrificing your investments.

#emergency fund#how to calculate an emergency fund#emergency fund calculation#optimized emergency fund#how much to save#savings#personal finance#financial planning#risk management#lifecycle investing

The formula gives you a number. Is your fund there yet?

The check shows in 3 minutes how many months of breathing room you really have. Free.

Take the check

Want to know the right emergency fund for you? Most finance gurus repeat the same rule: "Keep 3 to 6 months of expenses in cash."

The rule is incomplete. The harder questions are when to start building the fund and how much to save without sacrificing your investments.

In this guide you'll learn:

  • How to calculate your emergency fund with a research-based formula
  • When to start saving for it (timing matters)
  • How much to keep based on your situation
  • How to optimize the fund without giving up €90,000 in returns

The method comes from lifecycle finance, an economic theory that ties your saving and investing decisions to the stages of your life. It also accounts for drawdown risk (the largest peak-to-trough fall) and compounding, instead of one-size-fits-all rules.

The big takeaway: Building a full emergency fund BEFORE investing can cost you €90,000 in net worth over 40 years. What matters most is when you start investing and how you build the fund along the way, more than its final size.


Part I: What an Emergency Fund Is and Why the Right Amount Matters

What an emergency fund is really for

An emergency fund is a cushion, almost like insurance, whose job is to stop one bad stretch from wrecking your finances. It exists so you're never forced to:

  • Sell investments during a market crash
  • Take on expensive debt
  • Make panicked career or life decisions

The fund has one job:

Keep your life stable while your portfolio isn't.

So the right size and timing depend on:

  1. Monthly expenses (E). If you don't have a handle on them yet, a personal budget helps you pin them down
  2. How stable your income is
  3. How deep the potential drawdowns are in your riskiest assets
  4. How fast you can make up losses through saving

A fixed rule for everyone is rarely the best one.

Where the 3-6 month rule comes from

The 3-6 month rule is a historical rule of thumb, not a mathematical result.

It appeared in the mid-20th century in the US and Europe.

Financial planners noticed that, for most people, the time between a financial shock and getting income back was usually a few months. Instead of trying to predict and cover each risk (job loss, illness, a broken-down car), they simplified the question to time covered:

  • ~3 months for common disruptions
  • ~6 months for more severe or overlapping ones

The intuition was sound.

An emergency fund buys time.

The goal is to buy time: months of breathing room to deal with a surprise without panicking, borrowing or selling investments at the worst moment.

At around 3-6 months:

  • Stress drops sharply
  • Decisions get better
  • Panic moves become less likely

So the rule worked. But it was never optimized, and it ignores the cost of delaying your investments.

The big mistake: treating the emergency fund as "step one"

Personal finance gurus often say:

"Before you invest anything, build your full emergency fund."

This is where that approach breaks down.

Your earliest investments are the most valuable ones you'll ever make, because they get the longest time to compound.

Delaying investing to finish an emergency fund feels conservative. It's expensive.

A real example: how long it takes to build an emergency fund

Take a very ordinary situation:

  • Monthly salary: €1,000
  • Monthly expenses: €800
  • Savings rate: 10% → €100/month
  • Recommended emergency fund: 6 months → €4,800

Time to build the fund:

That's 4 years before you invest a single euro.

And this is the most common case.

What happens if the emergency fund is "invested safely"

Say this person builds a €5,000 emergency fund and keeps it in a very safe asset earning 2% a year.

After 40 years:

  • Total put into the fund: €5,000
  • Final value at 2%: €11,120

That is the full payoff from delaying investing for 4 years.

The real cost of delaying investing

Scenario A: Emergency fund first, invest later

Emergency fund:

  • Value after 40 years: €11,120

Investment portfolio:

  • Monthly investment: €100
  • Starts after 4 years
  • Compounding time: 36 years
  • Annual return: 8%
  • Final value: €249,672

Total net worth in Scenario A:

Scenario B: Invest right away (no delay)

  • Monthly investment: €100
  • Compounding time: 40 years
  • Annual return: 8%
  • Final value: €349,101

The difference

Even after counting the emergency fund's growth, delaying investing by 4 years costs almost €90,000.

All of that comes from lost compounding time.

Why the traditional approach fails the math

What goes wrong is when you start building the fund.

The traditional logic:

  1. Build the emergency fund first
  2. Invest afterward

This ignores two facts:

  1. The early years carry outsized weight, because that's where you gain the most compounding time.
  2. While your portfolio is small, losses barely matter: a 20% drop on a small amount is unlikely to threaten your stability.

In other words:

The cost of not investing early is bigger than the risk of not having a full emergency fund early.

So the right question is:

When does not having an emergency fund become dangerous?


Part II: What We Want to Optimize

Strategic financial planning

Before the formulas, you need to know what we're actually trying to optimize.

The real goal

We want to maximize lifetime wealth, with one hard constraint:

Never let financial losses destroy the stability of your life.

That creates two opposing costs to balance:

Cost 1: Opportunity cost (investing too late)

Every euro you keep in an emergency fund instead of investing has a cost:

  • Lost return: the gap between 2% (a deposit) and 8% (investments)
  • Lost compounding: time is the most valuable ingredient
  • Growing impact: the earlier you invest, the bigger the effect

When this cost weighs more (delaying investing is more expensive):

  • When your portfolio is still small
  • When you have a lot of human capital (many working years ahead)
  • When you can make up losses quickly through saving

Cost 2: Replacement cost (losing money you can't replace)

When your investments take a loss, and assuming it's permanent, you have to rebuild it from future savings. The time that takes is:

When this cost weighs more (one loss can set you back years):

  • Your portfolio is already sizable (a percentage drop is a lot of money)
  • You're close to retirement, with few working years left to make up losses
  • Rebuilding the loss from savings alone would take too long

The tipping point

There's a point where the opportunity cost (not investing) becomes smaller than the replacement cost (losing investments). That point is the best moment to start building your emergency fund.

Before it: Prioritize investing. Losses are quick to replace.

After it: Start derisking. A big loss could cost you years of progress.

That's the point we're going to calculate.

The two constraints that matter

To find it, we need two constraints:

Constraint 1: Loss recovery time

A loss shouldn't take more than k years to replace (where k is your risk tolerance).

If you're willing to lose at most 2 years of savings in a crash:

Constraint 2: Protecting your cushion

A loss shouldn't wipe out your stability cushion (usually 6 months of expenses).

If a crash can erase your cushion, you're too exposed:

The intuition

Picture a scale with two pans.

One pan: "Invest first". The earlier you invest, the longer your money has to grow. If the market drops, what you lose is still small and you can replace it from savings in a few years.

The other pan: "Protect first". A big emergency fund gives you security. But every euro sitting idle instead of invested is growth time you never get back.

When you're young and your portfolio is small, the first pan is heavier: what you gain by investing early is worth more than the risk of a loss (which would still be small).

When your portfolio is large or retirement is close, the second pan is heavier: a big drop would hurt and take years to rebuild.

What we'll calculate is when the two pans balance, the moment it makes sense to start building the fund for real.


Part III: How to Calculate Your Emergency Fund (Step-by-Step Formula)

Step 1: When does a loss become "too painful"?

The answer lies in recovery speed.

A €3,000 loss hits very differently depending on how much you can save:

Scenario A:

  • Annual savings: €6,000
  • Time to recover €3,000: 6 months
  • Impact: Hurts, but recoverable

Scenario B:

  • Annual savings: €600
  • Time to recover €3,000: 5 years
  • Impact: Devastating

Same loss in euros, completely different pain.

Step 2: The formula for an optimized emergency fund

We need the portfolio value (W*) at which building the full emergency fund becomes necessary.

It depends on:

  • W = Current portfolio (risky financial capital)
  • L = Expected drawdown as a fraction (0 to 1, e.g. 0.40 = 40%)
  • S = Annual savings (income − expenses, per year)
  • E = Essential monthly expenses
  • k = Maximum years of savings you're willing to lose
  • m = Months of cushion you want (usually 6)

Step 3: Deriving the formula (the math explained)

Constraint 1: Loss recovery time

A drawdown of size L causes a loss of:

The time needed to replace it from annual savings S:

We want this to stay within our tolerance k:

Solving for W gives the limit where derisking should start:

So the replacement-cost derisking limit is:

What it means: Once your portfolio reaches this value, a crash would take more than k years to recover from. Time to start reducing risk.

Constraint 2: Protecting the cushion

The minimum cushion is:

A crash shouldn't be able to wipe out the cushion that protects your basic spending:

Solving for W:

Above this value, a crash can erase your cushion. So the cushion-protection derisking limit is:

What it means: Once your portfolio reaches this value, a crash could wipe out your cushion (6 months of expenses).

Final formula: how to calculate W* (the optimal point)

Derisking should start when either constraint kicks in, because both are rational risk limits.

We take the maximum of the two:

With m = 6 months as the default:

That's the final formula.

What the formula tells you

W* is the portfolio value at which you should start building or topping up your emergency fund.

  • If W < W*: Prioritize investing
  • If W ≥ W*: Start directing money to the emergency fund (3-6 months)

Part IV: Where This Logic Comes From

This didn't come out of nowhere. It rests on decades of economic research on portfolio choice over a lifetime.

Lifecycle investing: the core theory

The idea that investors should take more risk early in life and less later is a mathematical result of modern economic theory, known as lifecycle portfolio choice or lifecycle finance.

The foundation: Robert Merton (1969-1971)

Robert C. Merton formalized how a rational person should allocate consumption and investment over a lifetime:

  • "Lifetime Portfolio Selection under Uncertainty: The Continuous-Time Case" (1969)
  • "Optimum Consumption and Portfolio Rules in a Continuous-Time Model" (1971)

Key contribution:

Optimal risk exposure is dynamic, not static. It changes as wealth, remaining time and income change.

That is the mathematical basis for why your risk exposure should change over time.

Human capital: the invisible asset

Bodie, Merton and Samuelson (1992) introduced an idea that changed the field:

Your biggest asset isn't your portfolio. It's your future income.

The total wealth formula

In economics, your lifetime wealth also counts the income you haven't earned yet:

Where:

  • Human capital = Present value of all the income you'll earn in the future
  • Financial capital = Current value of your investment portfolio

A concrete example:

A 25-year-old earning €900 a month has:

Wealth split:

  • Human capital: €360,000 / €363,000 = 99%
  • Financial capital: €3,000 / €363,000 = 1%

Your real wealth is 99% human capital and only 1% financial capital.

Why human capital behaves like a bond

For most salaried workers, labor income is:

  • Fairly stable (it doesn't swing 30-50% like stocks)
  • Paid regularly (every month, like bond coupons)
  • Low volatility (predictable unless you lose your job)

That means human capital behaves like a fixed-income asset, not like stocks.

The key implication:

If 99% of your wealth sits in a "bond-like asset" (human capital), then:

You should put your financial capital (the 1%) in risky assets to balance the whole.

When you're young you're already "bond-heavy" because of your human capital, even if your portfolio is 100% stocks.

How the mix changes over time

As you get older, the proportions flip:

At 25:

  • Human capital: ~€360,000 (40 years left)
  • Financial capital: ~€3,000
  • Optimal stock allocation in the portfolio: 100%

At 45:

  • Human capital: ~€180,000 (20 years left)
  • Financial capital: ~€80,000
  • Optimal stock allocation in the portfolio: 70-80%

At 60:

  • Human capital: ~€45,000 (5 years left)
  • Financial capital: ~€250,000
  • Optimal stock allocation in the portfolio: 40-50%

As:

  • Human capital shrinks (fewer years of salary ahead)
  • Financial capital grows (the portfolio compounds)

your total wealth becomes less "bond-heavy", so you should lower the risk in your financial portfolio to keep overall risk balanced.

Bottom line:

The optimal share of stocks should fall over your life because the makeup of your total wealth changes.

That is the scientific core of lifecycle investing.

Buffer-stock saving: why emergency funds exist

Christopher Carroll developed the theory of buffer-stock saving (1997):

Under income uncertainty and borrowing limits, rational households keep a cushion of safe assets so that spending doesn't collapse during shocks.

That's the theoretical case for emergency funds: they're precautionary wealth that protects your spending.

The Kelly criterion and risk of ruin

Kelly (1956) tried to answer a very practical question: how much risk should you take to grow over time without putting yourself at risk of ruin?

The core idea is simple: the average return isn't enough. You have to look at the worst plausible case. When there's tail risk (a rare but very bad event), what decides the game is surviving the drawdown, not maximizing return.

When drawdowns are extreme, the risk of catastrophic loss dominates.

So with high tail risk, it makes more sense to prioritize protection and cash than to squeeze out extra return.

How the theory turns into the formulas

Now the key part: how does all this theory become the simple formulas from Part III?

1. Where Loss = W × L comes from

This is risk arithmetic, not psychology.

If you have a portfolio worth W and it suffers a drawdown of L%, the loss in euros is:

Example:

  • Portfolio (W): €10,000
  • Drawdown (L): 50% = 0.50
  • Loss: €10,000 × 0.50 = €5,000

Link to the theory (lifecycle investing):

In lifecycle finance (Merton), the risk that matters is the drawdown that threatens your spending and your decisions, more than daily volatility.

The central economic question is:

How much of my wealth could disappear in a bad scenario?

That loss is always:

  • Proportional to the size of the portfolio (W)
  • Proportional to the risk taken (L)

Hence: Loss = W × L

2. Where Years to Recover = (W × L) / S comes from

This formula answers a basic economic question:

How much of my future life do I have to give up to fix a risk mistake today?

Where:

  • W × L = the loss in the crash
  • S = annual savings (your capacity to rebuild)

So:

Example:

  • Loss: €5,000
  • Annual savings (S): €1,200
  • Years to recover: €5,000 / €1,200 ≈ 4.2 years

This measures the replacement cost of the loss.

Link to the theory:

Lifecycle investing (Merton)

Merton shows that the optimal decision depends on:

  • Current wealth (W)
  • Future income (S)
  • Time remaining

Here:

  • S stands for your active human capital (earning power)
  • W × L stands for the negative shock to financial capital

While S ≫ W × L, losses are economically irrelevant.

When W × L ≈ S × k, losses start eating real years of your future life.

That's where risk stops being optimal.

Human capital (Bodie, Merton, Samuelson)

Human capital works like a "safe asset" that:

  • Pays out every year (S)
  • Lets you replace losses

The formula says exactly this:

  • Young → high S, low W → losses are easy to replace
  • Older → low S, high W → losses are slow and painful to replace

Buffer-stock saving (Carroll)

Carroll shows that rational households:

  • Avoid states where spending collapses
  • Keep cushions (reserves) to absorb shocks

Here the shock is W × L and the absorbing capacity comes from S.

If recovery is too slow, future spending is at risk.

3. Where does the Kelly criterion come in?

Kelly isn't literally in Loss = W × L. It comes in more quietly:

Kelly says: "Don't accept strategies where a rare event destroys your path."

In our model, that "rare event" is captured by L (extreme drawdown, the worst plausible case).

Look at the final formula:

L is in the denominator.

That means:

  • Higher L (high tail risk) → lower W* → protection starts earlier
  • Lower L (low tail risk) → higher W* → you can grow longer before protecting

Practical examples:

Scenario A: Crypto (L = 90%)

Scenario B: Diversified ETFs (L = 30%)

Extreme tail risk (crypto) forces you to derisk 3× sooner.

That is the "spirit of Kelly" in practice: avoid ruin by being careful with tail-risk exposure.

4. The full chain of logic

Here's how it all fits together:

  1. Risk creates a proportional loss:

  2. That loss has to be replaced from future income:

  3. Risk is only acceptable while that time is short:

  4. Once W passes that limit:

    • Risk stops being optimal
    • The emergency fund comes in
    • You start reducing risk

The final intuition (the most important part)

These formulas don't ask:

How much money can I lose?

They ask:

If this goes wrong, how many years of saving will I need to get back to where I started?

That's what (W × L) / S measures: the loss in a crash (W × L) divided by your yearly capacity to save (S).

Early in life:

  • The answer tends to be few, because your saving capacity (S) usually outweighs the size of your portfolio (W).
  • So you prioritize investing.

Later:

  • The answer tends to be many, because your portfolio (W) is already large and a drop takes longer to rebuild.
  • So you protect.

This is the economic theory of Part IV turned into simple, usable math.

Summary

The W* formula is a practical meeting point of:

  1. Lifecycle portfolio choice (Merton) → risk should fall over time
  2. Human capital as a safe asset (Bodie, Merton, Samuelson) → young people can take more risk
  3. Replacement cost → losses get slower to replace as W grows
  4. Buffer-stock saving (Carroll) → spending should never be put at risk
  5. Risk of ruin (Kelly) → extreme drawdowns call for protection sooner

The limit says:

Start reducing risk when:

  1. Losses become too slow to replace through saving
  2. Drawdowns threaten your financial cushion

Part V: How to Calculate Your Emergency Fund (Worked Examples)

Worked example: a young saver

Situation:

  • Monthly expenses (E): €800
  • Annual savings (S): €1,200 (€100/month)
  • Expected loss (L): 50% = 0.50 (100% stock portfolio)
  • Tolerance (k): 2 years (the most savings you're willing to lose)

Step 1: Calculate the replacement limit

Step 2: Calculate the cushion-protection limit

Step 3: Take the maximum

Conclusion:

Once your portfolio reaches €9,600, it makes sense to start building your emergency fund.

Calculating the fund for different profiles

Scenario A: A crypto investor

  • Drawdown (L): 90% (0.90), very high risk
  • Annual savings (S): €1,200
  • Monthly expenses (E): €700
  • Tolerance (k): 2 years

What it means: Start the emergency fund early (at €4,700) because the risk is extreme.

Scenario B: A mixed-ETF investor

  • Drawdown (L): 30% (0.30), moderate risk
  • Monthly expenses (E): €900
  • Annual savings (S): €3,600 (€300/month)
  • Tolerance (k): 2 years

What it means: You can prioritize investing up to €24,000. You only need to derisk after that.

Scenario C: A conservative portfolio

  • Drawdown (L): 15% (0.15), low risk
  • Monthly expenses (E): €1,200
  • Annual savings (S): €6,000 (€500/month)
  • Tolerance (k): 2 years

What it means: With low risk, you can build up a lot before you need a large emergency fund.

Calculator: work out your emergency fund automatically

Skip the hand math: the Emergency Fund Optimizer is an interactive calculator that finds the best moment to start building your emergency fund.

In a few minutes it tells you:

  • Which phase you're in (accumulation, transition or protection)
  • Your optimal point (W^*)
  • The most sensible next step for you

Common mistakes to avoid

Mistake 1: Starting the fund too early

If you're 23, earn €1,000 a month, spend €700 and have €5,000 saved, you don't need a full emergency fund yet.

Why? Because:

  • Your human capital is huge (≈ €480,000 in future earnings)
  • A 50% loss on €5,000 = €2,500 (you recover it in 8 months)
  • Investing early puts compounding to work

Mistake 2: Never investing out of fear

The opposite is dangerous too. If you pile €30,000 into a term deposit at 2% while inflation runs at 3%, you're losing purchasing power.

Use the formula to know when you're protected enough to invest with confidence.

Mistake 3: Not adjusting over time

Your W* changes through life:

  • At 25: low salary, low W* → prioritize investing
  • At 35: higher salary, higher W* → keep investing, but keep an eye on it
  • At 50: close to retirement → you need much more security

Recalculate every year.

The psychological side: sleeping at night

The math is clear, but there's one factor no formula captures: peace of mind.

If having only 3 months of expenses saved wakes you up at night, make your cushion bigger.

The formula gives you the scientific minimum. Your comfort may call for more.

Rule of thumb: If you're constantly anxious about money, grow the emergency fund to 12 months. The opportunity cost is smaller than the cost of chronic stress.


Academic references

This approach is grounded in:

  1. Merton, R. C. (1969, 1971): Optimal consumption and portfolio allocation over a lifetime under uncertainty
  2. Bodie, Z., Merton, R. C., & Samuelson, W. F. (1992): Human capital as a bond-like asset
  3. Cocco, J. F., Gomes, F. J., & Maenhout, P. J. (2005): Households with stable income should take more risk early
  4. Carroll, C. D. (1997): Buffer-stock saving and precautionary saving
  5. Kelly, J. L. (1956): Optimal bet sizing and risk of ruin

These are foundational results in modern lifecycle investing theory.


Conclusion: The Right Question Isn't "How Much?", It's "When?"

Most personal finance gurus say: "Keep 3 to 6 months of expenses in cash."

The rule is incomplete. What it leaves out is timing:

When should you start building an emergency fund?

The shift

Traditional approach:

  1. Build the emergency fund first (4 years)
  2. Invest afterward
  3. Result: You lose €88,309 in compounding

Optimized approach:

  1. Calculate your W* (the tipping point)
  2. Prioritize investing while W < W*
  3. Build the emergency fund once W ≥ W*
  4. Result: You maximize wealth without giving up security

The final formula

Where:

  • W* = The point at which to start reducing risk
  • k = Years of savings you're willing to lose (e.g. 2)
  • S = Annual savings
  • L = Expected drawdown (e.g. 0.40 for 40%)
  • E = Monthly expenses

Reduce risk when losing money becomes harder to replace than protecting your lifestyle.

More than a formula

It changes how you think about the fund:

  • From a fixed size to the right moment, which moves over time
  • From general rules to personal optimization
  • From anxiety to mathematical confidence

Next step: Use the Emergency Fund Optimizer, a free interactive calculator that:

  • Calculates your W* automatically
  • Shows which phase you're in (Accumulation, Transition or Protection)
  • Tells you exactly how much to keep
  • Maps out your lifecycle strategy

It takes 2 minutes and could change your whole financial strategy. Future you will thank you.


Tools:

  • Emergency Fund Optimizer, the interactive calculator based on this article
  • Investment Simulator, to project how your capital grows
  • Savings Calculator, for goals with a target date

By LiberFi

Free Financial Health Check

You know the theory. Now see where you stand.

  • A score from 0 to 100

    One number for your financial health today.

  • Your 4 pillars

    Budget, debt, savings and investing: see where you are strong and where money leaks out.

  • Your next step

    The one move that changes your finances most right now.

Take the free check
3 minutesFreeNo strings attached

Found this useful?

Send it to someone who needs it

Follow along

Daily videos on money and investing, in Portuguese

YouTube
Instagram
TikTok

Next steps

Keep reading

8 min•Personal Finance

Simple vs Compound Interest: The Difference in Real Numbers

Simple and compound interest side by side at 5, 10, 20 and 30 years, where each one shows up in your life, and why compounding debt is the part nobody explains.

Read article
5 min•Personal Finance

Pay Off Your Mortgage or Invest? The Math You Need to Do

Paying down a mortgage or investing depends on the rate, the fee, the remaining term, risk and cash on hand. See the math in euros and the questions that should drive the decision.

Read article
4 min•Personal Finance

How Much of Your Salary Should You Save? The 50/30/20 Rule

Apply the 50/30/20 rule to your take-home pay. See an example with €1,500, adapt the rule when rent eats more than half, and set a savings rate you can keep.

Read article