Decision confidence is a forecast about the correctness of one’s decision. It is often regarded as a higher-order function of the brain requiring a capacity for metacognition that may be unique to humans. If confidence manifests itself to us as a feeling, how can then one identify it amongst the brain’s electrical signals in an animal? We tackle this issue by using mathematical models to gain traction on the problem of confidence, allowing us to identify neural correlates and mechanisms. I will present a normative statistical theory that enables us to establish that human self-reports of confidence are based on a computation of statistical confidence. Next, I will discuss computational algorithms that can be used to estimate confidence and decision tasks that we developed to behaviorally read out this estimate in humans and rats. Finally, I will discuss the neural basis of decision confidence and specifically the role of the orbitofrontal cortex.