Mistakes happen, but in the digital world, they can propagate quickly. Everyone has accidentally deleted the phone number of a friend or co-worker while trying to add an e-mail address or new number. As phones become more advanced, it seems to become easier to make these potentially catastrophic deletions. Thankfully for users of the iPhone, however, deleting or losing a contact doesn't mean it is gone forever. If you haven't yet synchronised your computer and your iPhone, use iTunes. If you have synchronised your devices, use your most current backup or archive.
Open iTunes on your computer.
Plug in your iPhone to your computer just as you would to sync it normally.
Locate the iPhone in the “Devices” column at the left of the iTunes application window.
Right-click (Ctrl-click on a Mac) on the iPhone icon in the “Devices” column and select “Restore From Backup.” Select one of the backup versions from the drop-down menu and click the “Restore” button. This will restore any contacts that you have lost since your last sync in iTunes.
Eject your iPhone and review the Contact list on your device. All lost contacts should be restored to your list.
From a backup or archive
Restore from an archive of your Address book. Open the Address Book application. From the File menu, select "Import," and then "Address Book Archive." This command imports your most previous archive of your contacts.
Restore contacts from a backup by navigating to the Application Support/Address Book folder of the most-recent backup.
Open the folder to confirm that it contains your list of contacts. If it does, copy the Address Book folder from the backup drive and paste it into the same location on your computer. This replaces the folder and restores the data.
Make a separate backup of your contacts apart from the one that automatically occurs each time you sync in iTunes. iTunes replaces the backup before it each time it syncs automatically, leaving on your computer only what was on your phone at the time of the sync.
Create an archive in Address Book by selecting "File," "Address Book Archive," and then "Export."
If the date of the backup you use to restore your contacts more than a few weeks old, download again any firmware updates to the iPhone, as these are not kept as part of the backup file.