The human capacity to compute the likelihood that a decision is correct - known as metacognition - has proven difficult to study in isolation as it usually co-occurs with decision-making. Here, we isolated post-decisional from decisional contributions to metacognition by combining a novel paradigm with multimodal imaging. Healthy volunteers reported their confidence in the accuracy of decisions they made or decisions they observed. We found better metacognitive performance for committed vs. observed decisions, indicating that committing to a decision informs confidence. Relying on concurrent electroencephalography and hemodynamic recordings, we found a common correlate of confidence following committed and observed decisions in the inferior frontal gyrus, and a dissociation in the anterior prefrontal cortex and anterior insula. We discuss these results in light of decisional and post-decisional accounts of confidence, and propose a generative model of confidence in which metacognitive performance naturally improves when evidence accumulation is constrained upon committing a decision.