# 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. As of July 2024, 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 2025) 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.
* The Earl of Bute (Groningen & Leiden): the first prime minister to graduate from a university outside the UK
* William Pitt the Younger (Pembroke, Cambridge): home schooled; went to Cambridge aged 14, graduated at 17, MP at 21, prime minister at 24. MP for Cambridge University
* W. E. Gladstone (Eton; Christ Church, Oxford; Lincoln's Inn): attended the three institutions with most alumni prime ministers. MP for Oxford University
* Margaret Thatcher (Somerville, Oxford): the first female PM, educated at an all-female school and college; studied chemistry, the only PM with a science degree
* Gordon Brown (Edinburgh): the only prime minister to complete a PhD. Served as university rector 1972–75, while still a student

## List of British prime ministers by education

| Prime Minister | Term of office | School | University | Degree | Professional training |
| Walpole, RobertRobert Walpole | 1721–1742 | Eton College | Cambridge (King's Coll.) | 1696–98, did not graduate (LL.D. 1728) | |
| Compton, SpencerSpencer Compton Earl of Wilmington | 1742–1743 | St Paul's School | Oxford (Trinity Coll.) | 1690–?, did not graduate (D.C.L. 1730) | Inns of Court: Middle Temple |
| Pelham, HenryHenry Pelham | 1743–1754 | Westminster School | Cambridge (King's Coll.) | 1709–10 | |
| Pelham, HenryHenry Pelham | 1743–1754 | Westminster School | Oxford (Hart Hall) | 1710–?, did not graduate | |
| Pelham-Holles, ThomasThomas Pelham-Holles Duke of Newcastle | 1754–1756 1757–1762 | Westminster School | Cambridge (Clare Coll.) | 1710–?, did not graduate (LL.D. 1728) | |
| Cavendish, WilliamWilliam Cavendish Duke of Devonshire | 1756–1757 | — | — | — | |
| Stuart, JohnJohn Stuart Earl of Bute | 1762–1763 | Eton College | Groningen University | Civil law 1730–32 | |
| Stuart, JohnJohn Stuart Earl of Bute | 1762–1763 | Eton College | Leiden University | Civil law 1732–34, graduated 1734 | |
| Grenville, GeorgeGeorge Grenville | 1763–1765 | Eton College | Oxford (Christ Church) | 1730–?, did not graduate | Inns of Court: Inner Temple |
| Watson-Wentworth, CharlesCharles Watson-Wentworth Marquess of Rockingham | 1765–1766 1782 | Westminster School | — | — | |
| Pitt, William 1William Pitt the Elder Earl of Chatham | 1766–1768 | Eton College | Oxford (Trinity Coll.) | 1727–28, did not graduate | |
| Pitt, William 1William Pitt the Elder Earl of Chatham | 1766–1768 | Eton College | Utrecht University | 1728 | |
| FitzRoy, AugustusAugustus FitzRoy Duke of Grafton | 1768–1770 | Westminster School | Cambridge (Peterhouse) | 1751–53, M.A. 1753 | |
| North, FrederickFrederick North | 1770–1782 | Eton College | Oxford (Trinity Coll.) | 1749–50, M.A. 1750 | |
| North, FrederickFrederick North | 1770–1782 | Eton College | Leipzig University | 1751–52 | |
| Petty, WilliamWilliam Petty (FitzMaurice) Earl of Shelburne | 1782–1783 | — | Oxford (Christ Church) | 1755–57, did not graduate | |
| Cavendish-Bentinck, WilliamWilliam Cavendish-Bentinck Duke of Portland | 1783 1807–1809 | Westminster School | Oxford (Christ Church) | 1755–57, M.A. 1757 | |
| Pitt, William 2William Pitt the Younger | 1783–1801 1804–1806 | — | Cambridge (Pembroke Coll.) | 1773–76, M.A. 1776 |
| Addington, HenryHenry Addington | 1801–1804 | Winchester College | Oxford (Brasenose Coll.) | 1774–78, B.A. 1778 (M.A. 1780) | Inns of Court: Lincoln's Inn |
| Grenville, WilliamWilliam Grenville Lord Grenville | 1806–1807 | Eton College | Oxford (Christ Church) | 1776–80, B.A. 1780 | Inns of Court: Lincoln's Inn |
| Perceval, SpencerSpencer Perceval | 1809–1812 | Harrow School | Cambridge (Trinity Coll.) | 1780–82, M.A. 1782 | Inns of Court: Lincoln's Inn |
| Jenkinson, RobertRobert Jenkinson Earl of Liverpool | 1812–1827 | Charterhouse School | Oxford (Christ Church) | 1787–90, M.A. 1790 | |
| Canning, GeorgeGeorge Canning | 1827 | Eton College | Oxford (Christ Church) | 1787–91, B.A. 1791 (M.A. 1794) | |
| Robinson, Frederick JohnFrederick J. Robinson Viscount Goderich | 1827–1828 | Harrow School | Cambridge (St John's Coll.) | 1799–1802, M.A. 1802 | |
| Wellesley, ArthurArthur Wellesley Duke of Wellington | 1828–1830 1834 | Eton College | — | — | French Royal Academy of Equitation, Angers |
| Grey, CharlesCharles Grey Earl Grey | 1830–1834 | Eton College | Cambridge (Trinity Coll.) | 1781–83, did not graduate | |
| Lamb, WilliamWilliam Lamb Viscount Melbourne | 1834 1835–1841 | Eton College | Cambridge (Trinity Coll.) | 1796–99, M.A. 1799 | Inns of Court: Lincoln's Inn |
| Lamb, WilliamWilliam Lamb Viscount Melbourne | 1834 1835–1841 | Eton College | Glasgow University | Resident pupil of Prof. John Millar 1799–1801 | Inns of Court: Lincoln's Inn |
| Peel, RobertRobert Peel | 1834–1835 1841–1846 | Harrow School | Oxford (Christ Church) | Classics and Mathematics 1805–08, B.A. 1808 (M.A. 1814) | Inns of Court: Lincoln's Inn |
| Russell, JohnJohn Russell Earl Russell | 1846–1852 1865–1866 | Westminster School | Edinburgh University | Resident pupil of Prof. John Playfair 1809–12 | |
| Smith-Stanley, EdwardEdward Smith-Stanley Earl of Derby | 1852 1858–1859 1866–1868 | Eton College | Oxford (Christ Church) | Classics 1817–20, did not graduate | |
| Hamilton-Gordon, GeorgeGeorge Hamilton-Gordon Earl of Aberdeen | 1852–1855 | Harrow School | Cambridge (St John's Coll.) | 1800–04, M.A. 1804 | |
| Temple, Henry JohnHenry John Temple Viscount Palmerston | 1855–1858 1859–1865 | Harrow School | Edinburgh University | Resident pupil of Prof. Dugald Stewart 1800–03 | |
| Temple, Henry JohnHenry John Temple Viscount Palmerston | 1855–1858 1859–1865 | Harrow School | Cambridge (St John's Coll.) | 1803–06, M.A. 1806 | |
| Disraeli, BenjaminBenjamin Disraeli Earl of Beaconsfield | 1868 1874–1880 | Dr Cogan's School, Walthamstow | — | — | Inns of Court: Lincoln's Inn |
| Gladstone, WilliamWilliam Ewart Gladstone | 1868–1874 1880–1885 1886 1892–1894 | Eton College | Oxford (Christ Church) | Classics and Mathematics 1828–32: B.A. 1832 (M.A. 1834) | Inns of Court: Lincoln's Inn |
| Gascoyne-Cecil, RobertRobert Gascoyne-Cecil Marquess of Salisbury | 1885–1886 1886–1892 1895–1902 | Eton College | Oxford (Christ Church) | Mathematics 1847–50, B.A. 1850 (M.A. 1853), Fellow of All Souls Coll. 1853 | Inns of Court: Lincoln's Inn |
| Primrose, ArchibaldArchibald Primrose Earl of Rosebery | 1894–1895 | Eton College | Oxford (Christ Church) | 1866–68, did not graduate | |
| Balfour, ArthurArthur Balfour | 1902–1905 | Eton College | Cambridge (Trinity Coll.) | Moral Sciences 1866–70, B.A. 1870 (M.A. 1874) | |
| Campbell-Bannerman, HenryHenry Campbell-Bannerman | 1905–1908 | High School of Glasgow | Glasgow University | Greek and Logic 1851–53 | |
| Campbell-Bannerman, HenryHenry Campbell-Bannerman | 1905–1908 | High School of Glasgow | Cambridge (Trinity Coll.) | Classics 1854–58, B.A. 1858 (M.A. 1861) | |
| Asquith, Herbert HenryH. H. Asquith | 1908–1916 | City of London School | Oxford (Balliol Coll.) | Classics 1870–74, B.A. 1874, Fellow 1874–82 | Inns of Court: Lincoln's Inn |
| Lloyd George, DavidDavid Lloyd George | 1916–1922 | Llanystumdwy National School | — | — | Solicitor |
| Law, BonarBonar Law | 1922–1923 | High School of Glasgow | Glasgow University | Extramural student 1879–80 | |
| Baldwin, StanleyStanley Baldwin | 1923–1924 1924–1929 1935–1937 | Harrow School | Cambridge (Trinity Coll.) | History 1885–88, B.A. 1888 (M.A. 1892) | |
| Baldwin, StanleyStanley Baldwin | 1923–1924 1924–1929 1935–1937 | Harrow School | Mason College | Metallurgy | |
| Macdonald, RamsayRamsay MacDonald | 1924 1929–1935 | Drainie Parish School | Birkbeck Literary and Scientific Institution | Extramural student 1886–87 | |
| Chamberlain, NevilleNeville Chamberlain | 1937–1940 | Rugby School | Mason College | Metallurgy 1887–89 | |
| Churchill, WinstonWinston Churchill | 1940–1945 1951–1955 | Harrow School | — | — | RMC Sandhurst |
| Attlee, ClementClement Attlee | 1945–1951 | Haileybury College | Oxford (University Coll.) | Modern History 1901–04, B.A. 1904 (M.A.) | Inns of Court: Inner Temple |
| Eden, AnthonyAnthony Eden | 1955–1957 | Eton College | Oxford (Christ Church) | Persian and Arabic 1919–22, B.A. 1922 (M.A.) | |
| Macmillan, HaroldHarold Macmillan | 1957–1963 | Eton College | Oxford (Balliol Coll.) | Classics 1912–14, did not graduate | |
| Douglas-Home, AlecAlec Douglas-Home Earl of Home | 1963–1964 | Eton College | Oxford (Christ Church) | Modern History 1922–25, B.A. 1925 (M.A.) | |
| Wilson, HaroldHarold Wilson | 1964–1970 1974–1976 | Royds Hall Grammar School; Wirral Grammar School for Boys | Oxford (Jesus Coll.) | PPE (transferred from Modern History) 1934–37, B.A. 1937 (M.A.) Fellow of University Coll. 1938–45 | |
| Heath, EdwardEdward Heath | 1970–1974 | Chatham House Grammar School | Oxford (Balliol Coll.) | PPE 1935–39, B.A. 1939 (M.A.) | |
| Callaghan, JamesJames Callaghan | 1976–1979 | Northern Secondary School, Portsmouth | — | — | Civil Service: Inland Revenue |
| Thatcher, MargaretMargaret Thatcher | 1979–1990 | Kesteven and Grantham Girls' School | Oxford (Somerville Coll.) | Chemistry 1943–47, B.A. 1947 (M.A. 1950) | Inns of Court: Lincoln's Inn |
| Major, JohnJohn Major | 1990–1997 | Rutlish School | — | — | Correspondence course in banking |
| Blair, TonyTony Blair | 1997–2007 | Fettes College | Oxford (St John's Coll.) | Law 1972–75, B.A. 1975 (M.A.) | Inns of Court: Lincoln's Inn |
| Brown, GordonGordon Brown | 2007–2010 | Kirkcaldy High School | Edinburgh University | History 1967–82, M.A. 1972, Ph.D. 1982, University Rector 1972–75 | |
| Cameron, DavidDavid Cameron | 2010–2016 | Eton College | Oxford (Brasenose Coll.) | PPE 1985–88, B.A. 1988 (M.A.) | |
| May, TheresaTheresa May | 2016–2019 | Holton Park Girls' Grammar School | Oxford (St Hugh's Coll.) | Geography 1974–77, B.A. 1977 (M.A.) | |
| Johnson, BorisBoris Johnson | 2019–2022 | Eton College | Oxford (Balliol Coll.) | Classics 1983–87, B.A. 1987 (M.A.) | |
| Truss, LizLiz Truss | 2022 | Roundhay School | Oxford (Merton Coll.) | PPE 1993–96, B.A. | |
| Rishi Sunak | 2022–2024 | Winchester College | Oxford (Lincoln Coll.) | PPE 1998–2001, B.A. | |
| Rishi Sunak | 2022–2024 | Winchester College | Stanford University | Business administration 2004–06, M.B.A. 2006 | |
| Keir Starmer | 2024–present | Reigate Grammar School | Leeds University | Law 1982–85, LL.B. 1985 | Inns of Court: Middle Temple |
| Keir Starmer | 2024–present | Reigate Grammar School | Oxford (St Edmund Hall) | Law 1985–86, B.C.L. 1986 | Inns of Court: Middle Temple |
| Prime Minister | Term of office | School | University | Degree | Professional training |

## University offices held
### 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)