Three to six months of expenses. The advice is repeated so consistently that the reasoning behind it rarely gets examined.
The purpose
An emergency fund exists so that a temporary loss of income does not force a permanent financial decision — selling an asset at the wrong time, or borrowing at a rate you would never otherwise accept.
Why the number varies
The right size depends on how long your income might realistically be interrupted, and on how correlated that interruption is with everything else going wrong at once.
A tenured civil servant and a freelance contractor with three clients face very different distributions. The same number cannot be right for both.
Where to keep it
Somewhere boring, liquid, and separate enough that spending it requires a decision.
