Option 1: Recover Galaxy S4 Contacts from G-mail
Provided that you have logged into your Google account before you deleted/lost all the contacts. Google will automatically store your contacts in your G-mail account. You can retrieve S4 lost contacts by simply syncing your G-mail with your phone.
Option 2: Galaxy S4 Contacts Backup and Restore
Use Contacts Backup and Restore application to help you get away from the contacts loss trouble on your Galaxy S4. If you have previously performed a backup, all contacts that was on the phone can be stored on your computer or other safe place like mail, cloud, etc. and can be added back to your S4’s memory.

Option 3: Samsung Galaxy S4 Contacts Recovery
Supposed that you have never made a backup, how to get back lost contacts? Download a data recovery program to scan your S4’s memory for lost contacts. Jihosoft Android Phone Recovery is really a genius one that can recover contacts from Samsung Galaxy S4. Free download its free trial version and follow the step-by-step guide to get back all lost contacts.
Related Videos:
How to Recover Android Data after Factory Reset
How to Retrieve Deleted Contacts after Android Factory Reset