The "right" number honestly depends less on some magic formula and more on what actually lets you sleep at night given your specific situation. I kept three months for years while my income was steady, but after a rough patch where I was between opportunities for longer than expected, I bumped it to five months - and that psychological cushion made a real difference in how I approach job hunting versus panic-accepting the first thing that comes along.
Your job market instability is the real variable here. If you're in a field where finding work takes a while, or if you've got dependents relying on you, pushing toward six months makes sense. If you're in something with quick turnover and hiring, three is probably fine. Inflation makes the math trickier since your expenses might creep up, so maybe recalculate every few months rather than just setting it and forgetting it. The worst emergency fund is one you never actually use because you're too stressed to think clearly about whether you genuinely need it.