One of the most important provisions in your textbook publishing contract is the audit clause, which will specify the conditions for how and when you can request and conduct an audit. In the absence of an audit clause, some publishers will still comply with a request to audit, although they are not contractually required to do so.
While the large publishers have calculated and paid royalties to thousands of authors, contract terms can vary, automated royalty systems have limitations, and the accounting teams at publishers are made up of human beings who can make mistakes. If an author wants a better understanding as to the calculation and accuracy of his or her royalties, the best course of action is to request a royalty audit.