A remarkable feature of the human mind is its capacity for assessing or monitoring its own knowledge, known as metacognition. While we increasingly understanding how we perceive, learn and decide based on external information, much less is know about how people construct metacognitive beliefs and use these beliefs to guide behaviour. In the lab we can study this process by asking people to rate their confidence in simple decision tasks, and assess the correspondence between objective accuracy and subjective confidence. In the first part of my talk I will focus on leveraging individual differences in this measure to shed light on the neural substrates of metacognition across different domains, such as perception and memory. I will then zoom in on the level of single trials, and unpack the mechanisms that support accurate metacognitive judgments on a moment-to-moment basis. A minimal computational basis for successful self-evaluation is a joint sensitivity to external stimuli and one’s actions in the world. In a recent experiment we have probed the neural basis of this integration, leveraging functional MRI to track the joint influence of sensory evidence and motor output on a computation of confidence. Taken together these studies indicate that self-knowledge is an active construction that rests on simple neural and computational building blocks.