Calibration on iPhone 5s Compass and Level Appears Incorrect
The compass appears to be off by 8-10 degrees, while the inclinometer is consistently incorrect by 2 degrees on level services.
You see a pretty dramatic illustration of the difference between the iPhone 5S internal inclinometer readings and a real measurement of inclination. A simple Stanley spirit level tells the whole story: The iPhone 5S level readout in the iOS 7 compass software read 2-3 degrees off in our tests, while other users are reporting that the level is off by as many as 4-6 degrees. We performed the same test with an iPhone 5, and readout was almost perfect, indicating that hardware is at least partly the culprit. That also means a fix might not be as easy as an OTA firmware update.
There is a twenty-page thread on the MacRumors forums with readers reporting similar experiences with the compass and level on the iPhone 5s, as well as a number of threads on the Apple Support website.
It's unclear whether the motion sensors themselves are incorrect, or if it is just a calibration issue with the software interpreting the data and displaying it to the user. Apple has not commented on the problems. It's likely that a software update could fix the issues as the numbers appears to be fairly consistent across all iPhone 5s devices.
The M7 motion coprocessor is a big selling point of the iPhone 5s; it is supposed to act as a health and fitness tracker to measure steps and motion of the device with very little battery loss.