The Houtman-Maks index is a measure of the size of a violation of utility-maximizing (that is, rational) behavior. In this article, we introduce the command hmindex, which calculates the Houtman-Maks index for a dataset of prices and observed choices of a consumer. The command is illustrated with an empirical application.