List of prime ministers of the United Kingdom by education

A list of prime ministers of the United Kingdom and the educational institutions they attended. , of the 58 prime ministers to date, 31 were educated at the University of Oxford (including 13 at Christ Church), and 14 at the University of Cambridge (including six at Trinity College). Three attended the University of Edinburgh, three the University of Glasgow, two Mason Science College, a predecessor institution of the University of Birmingham, and one - the incumbent prime minister Keir Starmer - the University of Leeds. John Major was (as of 2024) the last of the eight prime ministers who did not attend university after leaving secondary education. A number of the prime ministers who attended university never graduated. Oxford gained its 29th prime-ministerial alumnus when Liz Truss succeeded Boris Johnson in September 2022, and its 30th - and fifth consecutive - a month later in Rishi Sunak. Starmer followed his undergraduate degree at Leeds with a postgraduate Bachelor of Civil Law degree at Oxford.

Twenty prime ministers were schooled at Eton College, of whom nine were educated at Eton and Christ Church, Oxford, including all three who held office between 1880 and 1902 (Gladstone, Salisbury, Rosebery). Seven were educated at Harrow School and six at Westminster School. Rishi Sunak was the second to be educated at Winchester College. Eleven prime ministers to date have been educated at only non-fee-paying schools; these include all five who held office between 1964 and 1997 (Wilson, Heath, Callaghan, Thatcher, Major). Theresa May was educated at both independent and grammar schools. Three did not receive (primary or secondary) school education and were homeschooled during childhood.

Sixteen Prime ministers trained as barristers at the Inns of Court, including 12 at Lincoln's Inn (although not all were called to the bar). Two (Wellington and Churchill) completed officer training at military academies.

Although William Pulteney, 1st Earl of Bath (in 1746) and James Waldegrave, 2nd Earl Waldegrave (in 1757) briefly attempted to form governments, neither is usually counted as prime minister. They are not listed below.

Chancellor
The following Prime Ministers served as Chancellor of their university:

Cambridge:
 * Thomas Pelham-Holles, 1st Duke of Newcastle (1748–1768)
 * Augustus FitzRoy, 3rd Duke of Grafton (1768–1811)
 * Arthur Balfour, 1st Earl Balfour (1919–1930)
 * Stanley Baldwin, 1st Earl Baldwin of Bewdley (1930–1947)

Oxford:
 * Frederick North, 2nd Earl of Guilford (1772–1792)
 * William Cavendish-Bentinck, 3rd Duke of Portland (1792–1809)
 * William Grenville, 1st Baron Grenville (1809–1834)
 * Edward Smith-Stanley, 14th Earl of Derby (1852–1869)
 * Robert Gascoyne-Cecil, 3rd Marquess of Salisbury (1869–1903)
 * Harold Macmillan, 1st Earl of Stockton (1960–1986)

Member of Parliament
The following Prime Ministers served as MP for the university constituency for their university:

Cambridge:
 * William Pitt the Younger (1784–1806)
 * Henry John Temple, 3rd Viscount Palmerston (1811–1831)

Oxford:
 * Robert Peel (1817–1829)
 * William Ewart Gladstone (1847–1865)