The true economic functions of the criminal courts are, first, to deter potential prospective offenders from committing offences, and in so doing reduce the total social costs of crime in the future; and secondly, to force the convicted offender to bear some of the costs, which the crime has externalised onto the victim(s) and wider society through retributive justice. These objectives are achieved through the sentencing function. Critics have lamented that too many extraneous factors are taken into account when setting penalties but the authors argue in this article that nevertheless these sentences are optimal because of the judges' comparative advantage. What is of great interest, and the focus of this article, are the implicit valuations of the social costs of crime that these sentences imply. Using the South Australia higher criminal courts as a case study, the authors estimate and utilise these judicial valuations to suggest a methodology for measuring the true economic value of the criminal courts. The analysis helps put into perspective the courts' very valuable contribution to social welfare.