It has often been claimed that children's mathematical understanding is based on their ability to reason logically, but there is no good evidence for this causal link. We tested the causal hypothesis about logic and mathematical development in two related studies. In a longitudinal study, we showed that (a) 6-year-old children's logical abilities and their working memory predict mathematical achievement 16 months later; and (b) logical scores continued to predict mathematical levels after controls for working memory, whereas working memory scores failed to predict the same measure after controls for differences in logical ability. In our second study, we trained a group of children in logical reasoning and found that they made more progress in mathematics than a control group who were not given this training. These studies establish a causal link between logical reasoning and mathematical learning. Much of children's mathematical knowledge is based on their understanding of its underlying logic.