Humans, and other animals, show a remarkable capability to learn the statistics of their environment, even when those statistics change over time. This learning process has been studied extensively in a large body of experiments; however, those studies often neglected that learning is also accompanied by a sense of confidence, a “feeling of knowing”, about what has been learned. In this talk, I will show that the human sense of confidence during learning is rational: it conforms to several normative properties of a Bayesian computation. Those behavioral results indicate that the brain is able to estimate the reliability of its own inferences in the course of learning. With computational modeling, behavioral data, fMRI and MEG, I will also show that this confidence information is used for regulating the learning process itself, and that this confidence-weighting mechanism is key to learn in volatile environments.