The history of schools in Scotland includes the development of all schools as institutions and buildings in Scotland, from the early Middle Ages to the present day. From the early Middle Ages there were bardic schools, that trained individuals in the poetic and musical arts. Monasteries served as major repositories of knowledge and education, often running schools. In the High Middle Ages, new sources of education arose including choir and grammar schools designed to train priests. Benedictine and Augustinian foundations probably had charitable almonry schools to educate young boys, who might enter the priesthood. Some abbeys opened their doors to teach the sons of gentlemen. By the end of the Middle Ages, grammar schools could be found in all the main burghs and some small towns. In rural areas there were petty or reading schools that provided an elementary education. Private tuition in the families of lords and wealthy burghers sometimes developed into "household schools". Girls of noble families were taught in nunneries and by the end of the fifteenth century Edinburgh also had schools for girls, sometimes described as "sewing schools". There is documentary evidence for about 100 schools of these different kinds before the Reformation. The growing humanist-inspired emphasis on education cumulated with the passing of the Education Act 1496.

After the Protestant party became dominant in 1560, the First Book of Discipline set out a plan for a school in every parish, but this proved financially impossible. In the burghs the existing schools were largely maintained, with the song schools and a number of new foundations becoming reformed grammar schools or ordinary parish schools. There were also large number of unregulated private "adventure schools". Girls were only admitted to parish schools when there were insufficient numbers of boys to pay an adequate living for schoolmasters. In the lower ranks of society, girls benefited from the expansion of the parish schools system that took place after the Reformation, but were usually outnumbered by boys and often taught separately, for a shorter time and to a lower level. Acts in 1616, 1633, 1646, and 1696 obliged local landowners (heritors) to provide a schoolhouse and pay a schoolmaster, known in Scotland as a dominie, while ministers and local presbyteries oversaw the quality of the education. By the late seventeenth century there was a largely complete network of parish schools in the Lowlands, but in the Highlands basic education was still lacking in many areas.

In the eighteenth century, wealth from the Agricultural Revolution led to a programme of extensive rebuilding of schools. Many poorer girls were being taught in dame schools, informally set up by a widow or spinster to teach reading, sewing and cooking. Literacy rates were lower in the Highlands than in comparable Lowland rural society, and despite these efforts illiteracy remained prevalent into the nineteenth century. With urbanisation and population growth the kirk established 214 "assembly schools" by 1865. There were also 120 "sessional schools", mainly established by kirk sessions in towns and aimed at the children of the poor. The Disruption of 1843, which created the breakaway Free Church of Scotland, fragmented the kirk school system. By May 1847 it was claimed that 500 schools had been built, along with two teacher training colleges and a ministerial training college. The influx of large numbers of Irish immigrants in the nineteenth century led to the establishment of Catholic schools. Attempts to supplement the parish system included Sunday schools, mission schools, ragged schools, Bible societies and improvement classes. The ragged school movement attempted to provide free education to destitute children. Andrew Bell pioneered the Monitorial System, which developed into the pupil-teacher system of training. In contrast David Stow, advocated the "Glasgow method", which centred on trained adult teachers. Scottish schoolmasters gained a reputation for strictness and frequent use of the tawse.

The Education (Scotland) Act 1872 created approximately 1,000 regional School Boards, which immediately took over the schools of the old and new kirks. The emphasis on a set number of passes at exams also led to much learning by rote and the system of inspection led to even the weakest children being drilled with certain facts. The Education (Scotland) Act 1918 introduced the principle of universal free secondary education. Most of the advanced divisions of the primary schools became junior secondaries, while the old academies and Higher Grade schools became senior secondaries. Increasing numbers stayed on beyond elementary education and the leaving age was eventually raised to 16 in 1973. As a result, secondary education was the major area of growth, particularly for girls. New qualifications were developed to cope with changing aspirations. In the 1980s the curriculum was reformed to take account of the whole range of abilities. Gender differences disappeared as girls' attainment caught up with boys in the early 1980s.

Middle Ages

Early Middle Ages

From the early Middle Ages there were bardic schools, that trained individuals in the poetic and musical arts, but because Scotland was a largely oral society, little evidence of what they taught has survived.K. M. Brown, Noble Society in Scotland: Wealth, Family and Culture from the Reformation to the Revolutions (Edinburgh: Edinburgh University Press, 2004), , p. 220. The establishment of Christianity from the sixth century brought Latin to Scotland as a scholarly and written language. In the early Middle Ages monasteries served as major repositories of knowledge and education, often running schools and providing a small, educated and overwhelmingly male, elite, who were essential to create and read documents in a largely illiterate society.A. Macquarrie, Medieval Scotland: Kinship and Nation (Thrupp: Sutton, 2004), , p. 128.

High Middle Ages In the High Middle Ages, new sources of education arose. Choir and grammar schools were designed to train priests, with an emphasis respectively on music and Latin grammar. The reorganisation of the church that began in the reign of David I (1124–53) gave the church a clearer diocesan and parochial structure, meaning that the seats of sheriffdoms like Perth received schools that were usually under monastic patrons. Early examples of grammar schools include the High School of Glasgow in 1124 and the High School of Dundee in 1239. These were usually attached to cathedrals or a collegiate church. The newly created diocesan chancellors may have had authority over cathedral schools and schoolmasters within their diocese.S. Murdoch, "Schools and schooling: I to 1696", in M. Lynch, ed., The Oxford Companion to Scottish History (Oxford: Oxford University Press, 2001), , pp. 561–3.

The new religious orders that became a major feature of Scottish monastic life in this period also brought new educational possibilities and the need to train larger numbers of monks. Benedictine and Augustinian foundations probably had almonry schools, charity schools using funds from the almoner to provide a type of bursary to educate young boys, who might enter the priesthood.S. Boynton, "Boy singers in Monasteries and Cathedrals", in S. Boynton and E. N. Rice eds, Young Choristers: 650–1700 (Boydell & Brewer Ltd, 2008), , p. 44. At the Cluniac Paisley Abbey, secular chaplains were employed as schoolmasters. Some monasteries, including the Cistercian abbey at Kinloss, Sweetheart Abbey and Beauly, opened their doors to a wider range of students to teach the sons of gentlemen. St Andrews, which was both the seat of a bishop and the site of a major Augustinian foundation, had both a grammar school, under the archdeacon, and a song school, under the priory.

Late Middle Ages

The number and size of song and grammar schools seems to have expanded rapidly from the 1380s. The foundation of over 100 collegiate churches of secular priests between 1450 and the Reformation would have necessitated the training of large numbers of choristers. Sometimes, as at Lochwinnoch, they were taught both music and grammar. Dominican friars were noted for their educational achievementsJ. P. Foggie, Renaissance Religion in Urban Scotland: The Dominican Order, 1450–1560 (BRILL, 2003), , p. 101. and were usually located in urban centres, probably teaching grammar, as at Glasgow and Ayr. By the end of the Middle Ages, grammar schools could be found in all the main burghs and some small towns.

Educational provision was probably much weaker in rural areas, but there were petty or reading schools in rural areas that provided an elementary education.M. Lynch, Scotland: A New History (Random House, 2011), , pp. 104–7. There was also the development of private tuition in the families of lords and wealthy burghers. Sometimes these developed into "household schools", that may also have catered to farming neighbours and kin, as well as the sons of the laird's household, which is known to have happened at Huntly. All these schools were almost exclusively aimed at boys. Girls of noble families were taught in nunneries such as Elcho, Aberdour and Haddington. By the end of the fifteenth century Edinburgh also had schools for girls, sometimes described as "sewing schools", whose name probably indicates one of their major functions, although reading may also have been taught in these schools.E. Ewen, "'Hamperit in ane hony came': sights, sounds and smells in the Medieval town", in E. J. Cowan and L. Henderson, A History of Everyday Life in Medieval Scotland: 1000 to 1600 (Edinburgh: Edinburgh University Press, 2011), , p. 126. The students were probably taught by a combination of lay women and nuns.

There is documentary evidence for about 100 schools of these different kinds before the Reformation. Most of the schoolmasters of these schools were clergy, and also chaplains of religious foundations, hospitals or private chaplains of noblemen, which they probably undertook in order to supplement merge incomes.M. Lynch, Scotland: A New History (London: Pimlico, 1992), , p. 106. To some extent, all education was controlled by different branches of the church, but towards the end of the period there was an increasing lay interest. This sometimes resulted in conflict, as between the burgh of Aberdeen and the cathedral chancellor, when the former appointed a lay graduate as schoolmaster in 1538, and when a married man was appointed to the similar post in Perth. Education began to widen beyond the training of the clergy, particularly as lay lawyers began to emerge as a profession, with a humanist emphasis on educating the future ruling class for their duties.I. S. Ross, William Dunbar (Brill Archive, 1981), , p. 75. The growing humanist-inspired emphasis on education cumulated with the passing of the Education Act 1496, thought to have been steered through parliament by the Keeper of the Privy Seal William Elphinstone, Bishop of Aberdeen, which decreed that all sons of barons and freeholders of substance should attend grammar schools to learn "perfyct Latyne". All this resulted in an increase in literacy, which was largely concentrated among a male and wealthy elite,P. J. Bawcutt and J. H. Williams, A Companion to Medieval Scottish Poetry (Woodbridge: Brewer, 2006), , pp. 29–30. with perhaps 60 per cent of the male nobility being literate by the end of the period.J. Wormald, Court, Kirk, and Community: Scotland, 1470–1625 (Edinburgh: Edinburgh University Press, 1991), , pp. 68–72.

Early modern era

Sixteenth century