Prior short-term studies have shown the effectiveness of worked examples and self-explanation prompts in improving elementary students' mathematics knowledge. However, year-long classroom-based interventions have been tested only with older students. The purpose of the current study was to explore the effectiveness of a year-long classroom intervention, MathByExample, which paired worked examples and self-explanation prompts with practice problems. We utilized a classroom-based experimental design where 5th-grade classrooms were randomly assigned to one of two conditions. Findings illustrate that intervention dosage impacts the effectiveness of the intervention in improving 5th graders' grade-level mathematics knowledge. In addition, prior knowledge impacted the effectiveness of the intervention for two of the four outcome variables. This study expands the literature on the use of worked examples and self-explanation prompts in several ways. It provides evidence that this tool has the potential to improve elementary students' learning. It included four different measures of math knowledge, which provides stronger support for the effectiveness of the intervention. Finally, it adds to the literature that shows the benefits of studying and explaining both correct and incorrect worked examples.