The standard advice - three to six months of expenses - is a starting point, not an answer. The right size depends on how stable your income is and how quickly you could replace it.
Dual-income households with tenured, uncorrelated jobs can sit near the low end. A commission-based earner, a business owner, or a single-income household in a cyclical industry should hold closer to twelve months, because job loss and market drawdowns tend to arrive together.
Hold it somewhere that pays you: a government money market fund currently yields around 4.8%, so the liquidity no longer costs what it did a few years ago.