The ultimate goal is 25x your annual spending, including a tax-sheltered retirement account - that's f-you money.
Until you get there, 6 months to a year. Or for maximum safety, however much you'd need to pay for expenses and max out your annual medical + home insurance deductibles until you could find a new job. This covers the worst-case scenario of job loss + medical emergency + house burning down.