As humans, we continually assess our subjective confidence in our percepts, memories as part of a self-monitoring process termed metacognition. Confidence is also studied in the computational sciences as an objective statistical quantity, the estimated probability that a chosen hypothesis is correct. This raises the possibility that we can define confidence from first principles in statistics to provide a formal foundation for the scientific inquiry into subjective confidence. I will describe an approach incorporating mathematical models and human psychophysics that enabled us to study confidence in rats. The statistical framework, however, does not constrain the neural architecture for confidence computations and I will show how the frontal cortex in rats supports confidence judgments in a centralized, abstract and cell-type-specific manner. These observations are consistent with psychological conjectures about a “metacognitive bottleneck” and I will finish on implications for AI architectures.