If you have money sitting in a 401(k) with your last employer and you decide to leave the money in there, there’s no time limit. You can roll those funds into an IRA or your new employer’s retirement plan whenever you want to.
However, if you have your old 401(k) money sent directly to you from your retirement plan (huge mistake, by the way—don’t do it!), the IRS says you have just 60 days from the date you receive a retirement plan distribution to roll it over into another plan or an IRA. Otherwise, you will get hit with taxes and an early withdrawal penalty.