Emergency fund calculator

How big a rainy-day buffer you need and how long it takes to build.