In Castel San Pietro there were a total of 302 students (). The Ticino education system provides up to three years of non-mandatory kindergarten and in Castel San Pietro there were 42 children in kindergarten. The primary school program lasts for five years and includes both a standard school and a special school.
In the municipality, 108 students attended the standard primary schools and 3 students attended the special school. In the lower secondary school system, students either attend a two-year middle school followed by a two-year pre-apprenticeship or they attend a four-year program to prepare for higher education. There were 72 students in the two-year middle school, while 39 students were in the four-year advanced program.