What if the stock market crashes right before I retire? I'm comfortable basing my lifetime projections off a 7% return, but am I wrong in thinking that if there's a crash right before I retire I'll be screwed? I know there's an answer to this, I just haven't been able to think of it/find it. Can't wait to hear from some of you mustachian geniuses how this is compensated for.
You're referring to "sequence of returns" risk.
First, having the stock market crash before you retire is a fantastic opportunity. I retired in June 2002, and on 17 Sep 2001 (after the FAA reopened American skies and the stock markets resumed trading) I watched our portfolio value melt like an ice cube on a hot sidewalk. At the end of the day we took a deep breath, ran our portfolio through FIRECalc and Financial Engines again, and... we still had enough. It was a nice "worst case" stress test. The stock market even helpfully ran that test several more times on us before finally bottoming out on 9 Oct 2002. Not, of course, that any of these events are seared into my cerebral cortex.
If our portfolio had not been "enough" then I would have continued working for another year or two. Frankly, most ERs could do the same for even the first decade after retirement... but it's nice to have the stress test before you retire.
Second, "sequence of returns" risk is built into FIRECalc, cFIRESim, and Monte Carlo calculators. It's the failure part of the success rate. The risk is greatest during the first 5-10 years of a 30-year ER, and that may be the case for a 50-year ER too. If the portfolio can survive the first decade then it's big enough to survive almost anything after that.
Your challenge is to gather enough assets to be reasonably sure of success, whether that's 80% or 90% or 95%. Your other challenge is to have enough assets to avoid failure (20%, 10%, 5%, or 0.00001%). The best way to do that is through a combination of annuity income (whether that's "just" Social Security or a SPIA or a pension) and a variable spending plan. A few ERs do it through a dividend equity portfolio, although living off your dividends takes more assets than a 4% SWR which consumes principal. You'll have a "normal life" budget, but you'll also have a "severe recession" barebones budget that you can revert to if necessary. (Note that very few retirement calculators can simulate a variable-spending plan, but hopefully it'll be mainstream in the next 5-10 years.) You can work the 4% SWR to about a 90% success rate (or whatever helps you sleep at night) and hope that the barebones contingency plan will cover you if the Great Recession returns for an encore five years after you ER.
If it's any consolation, Bob Clyatt of "Work Less, Live More" has paid for the computer simulations that show his 4%/95% variable spending plan will survive.