The original purpose of medieval grammar schools was the teaching of Latin. Over time the curriculum was broadened, first to include Ancient Greek, and later English and other European languages, natural sciences, mathematics, history, geography, and other subjects. In the late Victorian era grammar schools were reorganised to provide secondary education throughout England and Wales; Scotland had developed a different system. Grammar schools of these types were also established in British territories overseas, where they have evolved in different ways.
Grammar schools became the selective tier of the Tripartite System of state-funded secondary education operating in England and Wales from the mid-1940s to the late 1960s and continuing in Northern Ireland. With the move to non-selective comprehensive schools in the 1960s and 1970s, some grammar schools became fully independent and charged fees, while most others were abolished or became comprehensive (or sometimes merged with a secondary modern to form a new comprehensive school). In both cases, many of these schools kept "grammar school" in their names. More recently, a number of state grammar schools still retaining their selective intake gained academy status, meaning that they are independent of the Local Education Authority (LEA). Some parts of England retain forms of the Tripartite System, and a few grammar schools survive in otherwise comprehensive areas. Some of the remaining grammar schools can trace their histories to before the 16th century.
Although the term scolae grammaticales was not widely used until the 14th century, the earliest such schools appeared from the sixth century, e.g. the King's School, Canterbury (founded 597) and the King's School, Rochester (604). The schools were attached to cathedrals and monasteries, teaching Latin – the language of the church – to future priests and monks. Other subjects required for religious work were occasionally added, including music and verse (for liturgy), astronomy and mathematics (for the church calendar) and law (for administration).
With the foundation of the ancient universities from the late 12th century, grammar schools became the entry point to a liberal arts education, with Latin seen as the foundation of the trivium. Pupils were usually educated in grammar schools up to the age of 14, after which they would look to universities and the church for further study. Three of the first schools independent of the church – Winchester College (1382), Oswestry School (1407) and Eton College (1440) – were closely tied to the universities; they were boarding schools, so they could educate pupils from anywhere in the nation.
An example of an early grammar school founded by an early modern borough corporation unconnected with church or university is Bridgnorth Grammar School, founded in 1503 by Bridgnorth Borough Corporation.