How long do I need to work before I retire?

Typically you need to work until the age of 65 before you can retire.  Some jobs may offer you a 401k if you work at the job for an extended period of time which you have access to at the age of 65.  You might be able to retire sooner than the age of 65 if you own your own business, and it makes enough money to support your current lifestyle.  Important things to consider before you retire is whether you have enough money to sustain your lifestyle plus account for yearly inflation, and whether you will want to work part time or do consulting work in retirement to keep yourself busy and give you sense of purpose.