In earlier versions of Windows, the default interval that users were notified of password expiration was 14 days before expiration. In Windows 7 and Windows Server 2008 R2, the default password expiry notice occurs 5 days before the password expiration date.
This is by design. But if you’d like to change this password expiry notice period, you can do so as follows:
Using gpedit.msc, the group policy to alter this default can be found at:

Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options under Interactive Logon: Prompt user to change password before expiration.
Using regedit, the registry entry which controls this can be found at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
under PasswordExpiryWarning.
Set it to the period you want and Exit.
Source: Technet.
If you have liked this post, you might want to check out some more, on topics like Passwords, Registry, Security, Tips.