And for many people, the financial freedom to tell your boss where they can shove it is the ultimate goal. Unfortunately, a lot of people have a very naive idea of what it takes to reach that financial freedom. Many people have performed the most rudimentry and obvious math: "I have $X, the average annual return of my investments is Y%, I need $Z per year to live, and X*Y is larger than Z, so FUCK OFF, BOSS!".
Unfortunately, there is a lot more to it. The stock market returns 8% on average, but in the last 100 years it has seen +55% years and -55% years. The standard deviation of the Dow Jones is about 19%. For the less mathematically inclined, what that means is the return of the Dow Jones will be 8% plus or minus 19%, 68% of the time, if it continues to perform the same as it has the last 100 years. If that sentence did not engender in you images of a confident retirement, good, you understand what it means.
This calculation uses a statistical method called Monte Carlo Analysis. Monte Carlo Analysis involves running a simulation many times and determining the likelihood of events by counting the results that actually happen. The simulation involves random variables so each run is different. If you use inputs and random variable distributions which accurately reflect reality, you can get very accurate probabilities. This method has been proven very effective, for example, in estimating probability in games of chance, because for those situations we have extremely good understanding of the distribution of random events, and the inputs. You could calculate the probability of getting a royal flush in poker using closed, deterministic equations, but if you didn't know how to do that, you could instead simply deal hundreds of thousands of hands, count up how many royal flushes you see, and the more simulations you run the closer you will get to the real answer.
Unlike a deck of cards, we never know what lies in store for the stock market. We can make informed guesses by looking not only at past values, but at the distribution of past values. Since the stock market is comprised of many different independent events, it is reasonable to approximate it using a normal distribution (thanks, central limit theorem). The simulation uses the inputs to simulate each year of your retirement, earning a market return, removing an annual distribution, adjusting everything for inflation, etc. If at any point you run out of money, you fail and die destitute. If you reach your age of death with more than zero dollars, you die happy and bequeath everything left to some combination of your precocious progeny and society-benefiting charities, in a ratio that would make Warren Buffet proud (a la his famous quote: "You should leave your children enough so they can do anything, but not enough so they can do nothing.”)
The entire simulation of your life, from the current year to your death, is then rerun hundreds of thousands of times, and the results counted. If the simulation says you make it 95% of the time, you can be pretty confident you will make it (especially if you make conservative choices in your inputs, like erring on the high side for inflation, annual distribution, standard deviation, and age of death, and on the low side for average return and social security distributions). If, however, the model thinks you run out of money more often than not, you are going to want to keep working and delay retirement a few more years. That said, do not skip the very important disclaimer below.
The disclaimer at the top of the landing page is not just to cover my own ass, I am NOT a professional financial advisor or investor or expert or anything. I just tell computers what to do for a living and one day I thought it'd be cute and funny to tell them to do this in a single snarky page you can laugh at and share with your friends. This tool should encourage you to think about the many benefits of not dying destitute, and seek professional help to ensure you do not. Use the calculations provided herein for anything beyond entertainment at your own financial peril.