The IRS requires that 401(k) employee contributions be made before the compensation is paid to you. This is why 401(k) deferrals must be pulled directly from your paychecks. As a result, you cannot make retroactive contribution elections.
Deferrals from your pay can only be included for the year in which you received this pay. Because of these rules, you can set a deferral rate on pay you have not yet received and for the current year only.
However, if you have an individual retirement account (IRA), you may be able to make contributions for a prior year in some cases. Learn more about IRA carryback contributions here.
The above is intended to provide general information about the Guideline plan provisions, it is not intended to be tax or legal advice. As always, if you have specific questions about your situation you should consult with your tax advisor.