Quality ICD-9-CM coding depends on the selection of the appropriate diagnosis codes and the proper sequencing of the codes. A simple, diagnosis code-sequencing error was selected to evaluate the quality of diagnosis coding within the National Inpatient Sample of the Healthcare Costs and Utilization Project. The source of coding variation originates at the hospital level. Coding error rates were found to vary widely among states, hospitals within states, geographic location, and hospital characteristics. Coding errors were significantly different among patient demographic groups and whether the state used billing versus abstract data.