The magnetic compass tolerance limit is defined by regulation.
FAA specifies +/- 10 degrees in level flight:
§25.1327 Magnetic direction indicator.
(a) Each magnetic direction indicator must be installed so that its accuracy is not excessively affected by the airplane's vibration or magnetic fields.
(b) The compensated installation may not have a deviation, in level flight, greater than 10 degrees on any heading.