This paper studies the public sector efficiency of Brazilian states. We follow a robust two-step procedure to control for discretionary and non-discretionary inputs in the production of publicly provided goods. The first step uses a robust nonparametric efficiency estimation method called Order-m. We construct an index combining both expenditure and revenue efficiency indexes to obtain a general efficiency measure. The second step applies the regression models to control for non-discretionary inputs that can affect the average production cost of goods and services. The results show Sao Paulo and Minas Gerais are the most efficient states, while Acre and Amapa are the least efficient. In addition, our findings indicate that variables such as unemployment, labor informality, and population density are significantly associated with efficiency. Our results provide valuable information to Brazilian subnational governments about their expenditure quality and tax effort, which will allow them to identify sectors where public efficiency can be improved.