Try signing out of iCloud on your Mac. Go to System Preferences>iCloud, click Sign Out, choose Delete at all of the prompts (your data will still be in iCloud), restart your Mac, then go back and sign back in (your data will download back to your Mac). Then try adding another test contact and calendar event on your Mac and see if they sync to your phone.
If they still don't sync to your phone, sign out of iCloud on your phone and sign back in. Go to Settings>iCloud, tap Sign Out, choose Delete from My iPhone and provide your password when prompted (your data will still be in iCloud). Then reset your phone (hold the power and home buttons at the same time until you see the Apple logo, then release); when it restarts go back to Settings>iCloud and sign back in (your data will download back to your phone. Then try syncing to your Mac (and vice versa) again and see if it works properly now.