Terakoya (寺子屋 terako-ya?, literally temple schools, private elementary schools) were private educational institutions that taught writing and reading to the children of Japanese commoners during the Edo period.
The first terakoya made their appearance at the beginning of the 17th century, as a development from educational facilities founded in Buddhist temples. Before the Edo period, public educational institutions were dedicated to the children of samurai and ruling families, thus the rise of the merchant class in the middle of the Edo period boosted the popularity of terakoya, as they were widely common in large cities as Edo and Osaka, as well as in rural and coastal regions.
The terakoya attendance rate reached 70% in the capital Edo at the end of the 18th century and the beginning of the 19th century. The terakoya were abolished in the Meiji period, when the government instituted the Education System Order (gakusei 学制) in 1872, when attending public schools was made compulsory to give basic education to the whole population.
Terakoya focused on reading and writing, but they dealt with extra subjects and disciplines, as counting with the abacus (soroban), history, and geography. They taught girls sewing, tea ceremony rituals, flower arranging techniques and other arts and crafts.
The classes usually took place in private homes of samurai, Buddhist priests, or even commoner citizens. The instructors, called shishō (師匠) or te-narai-shishō (手習い師匠) were mostly commoners, but samurai and Buddhist clergy also taught at terakoya. The administration tasks were often taken care of by the teachers themselves. A few terakoya were administered by Shinto priests and medical doctors.