This is a list of prime ministers of the United Kingdom by length of tenure. This is based on the difference between dates; if counted by the number of calendar days, the figures would be one day greater for each term served.

The term prime minister appeared in the early eighteenth century as an unofficial title for the leader of the government, usually the head of the Treasury. Jonathan Swift, for example, wrote that in 1713 there had been "those who are now commonly called Prime Minister among us", referring to Sidney Godolphin and Robert Harley, Queen Anne's lord treasurers and chief ministers. Robert Walpole is regarded as the first prime minister; he became First Lord of the Treasury of Great Britain in 1721. This list includes all prime ministers of the Kingdom of Great Britain, the United Kingdom of Great Britain and Ireland, and the modern-day United Kingdom of Great Britain and Northern Ireland.

Notable lengths

Of the 58 past prime ministers, nine served more than 10 years while eight served less than a year. Robert Walpole is the only person to have served as prime minister (then Great Britain) for more than two decades. Liz Truss is the shortest-serving prime minister, resigning after seven weeks or 49 days. The previous shortest time served was George Canning, who served for less than four months before dying in office. Margaret Thatcher, in office for 11 years and 208 days between 1979 and 1990, is the longest-serving prime minister in modern history, and the longest-serving prime minister officially referred to as such. William Gladstone is the only person to have served four separate terms.

List of office holders by tenure Rank Prime Minister Tenure length Tenures Party StartEnd Reason for exit 1 Sir Robert Walpole 1 Whig 17211742Resigned 2 William Pitt the Younger 2 Tory (Pittite) 17831801Resigned18041806Died 3 The Earl of Liverpool 1 Tory (Pittite) 18121827Resigned due to illness 4 The Marquess of Salisbury 3 Conservative 18851886Resigned18861892Defeated in election18951902Resigned due to illness 5 William Ewart Gladstone 4 Liberal 18681874Defeated in election18801885Defeated in election18861886Resigned18921894Resigned 6 Lord North 1 Tory (Northite) 17701782Resigned 7 Margaret Thatcher 1 Conservative 19791990Resigned 8 Henry Pelham 1 Whig 17431754Died 9 Tony Blair 1 Labour 19972007Resigned 10 The Viscount Palmerston 2 WhigLiberal 18551858Resigned18591865Died 11 H. H. Asquith 1 Liberal 19081916Resigned 12 Sir Winston Churchill 2 Conservative 19401945Defeated in election19511955Resigned due to illness 13 Harold Wilson 2 Labour 19641970Defeated in election19741976Resigned 14 The Duke of Newcastle 2 Whig 1754175617571762Dismissed by King George III 15 Stanley Baldwin 3 Conservative 19231924Lack of majority after election19241929Defeated in election19351937Resigned 16 Benjamin Disraeli 2 Conservative 18681868Defeated in election18741880Defeated in election 17 Ramsay MacDonald 2 Labour 19241924Defeated in electionLabourNational Labour19291935Resigned due to illness 18 Harold Macmillan 1 Conservative 19571963Resigned due to illness 19 The Viscount Melbourne 2 Whig 18341834Resigned18351841Defeated in election 20 John Major 1 Conservative 19901997Defeated in election 21 Lord John Russell 2 WhigLiberal 18461852Defeated in election18651866Resigned 22 Clement Attlee 1 Labour 19451951Defeated in election 23 David Cameron 1 Conservative 20102016Resigned 24 David Lloyd George 1 Liberal 19161922Resigned 25 Sir Robert Peel 2 Conservative 18341835Defeated in election18411846Resigned 26 The Earl of Derby 3 Conservative 185218521858185918661868Resigned due to illness 27 Edward Heath 1 Conservative 19701974Defeated in election 28 The Earl Grey 1 Whig 18301834Resigned 29 Arthur Balfour 1 Conservative 19021905Resigned 30The Duke of Portland 2 WhigTory (Pittite) 1783178318071809Resigned due to illness 31 Henry Addington 1 Tory (Pittite) 18011804Replaced 32 Boris Johnson 1Conservative20192022Resigned 33 James Callaghan 1 Labour 19761979Defeated in election 34 Theresa May 1 Conservative 20162019Resigned 35 Neville Chamberlain 1 Conservative 19371940Resigned 36The Duke of Wellington 2 Tory 18281830Replaced18341834Caretaker ministry 37 Gordon Brown 1 Labour 20072010Defeated in election 38 Spencer Perceval 1 Tory (Pittite) 18091812Assassinated 39 Sir Henry Campbell-Bannerman 1 Liberal 19051908Resigned due to illness 40 George Grenville 1 Whig (Grenvillite) 17631765Replaced 41 The Earl of Chatham 1 Whig (Chathamite) 17661768Resigned due to illness 42 The Earl of Aberdeen 1 Peelite 18521855Resigned 43 Sir Keir Starmer1 Labour20242026 Resigned 44 Sir Anthony Eden 1 Conservative 19551957Resigned due to illness 45 Rishi Sunak1 Conservative20222024Defeated in election 46 The Earl of Wilmington 1 Whig 17421743Died 47 The Marquess of Rockingham 2 Whig (Rockinghamite) 17651766Resigned17821782Died 48 The Earl of Rosebery 1 Liberal 18941895Defeated in election 49 The Duke of Grafton 1 Whig (Chathamite) 17681770Resigned 50 The Lord Grenville 1 Whig 18061807Replaced 51 Sir Alec Douglas-Home 1 Conservative (Scot. Unionist) 19631964Defeated in election 52 The Earl of Bute 1 Tory 17621763Resigned 53 The Earl of Shelburne 1 Whig (Chathamite) 17821783Replaced 54 The Duke of Devonshire 1 Whig 17561757Replaced 55 Andrew Bonar Law 1 Conservative (Scot. Unionist) 19221923Resigned due to illness 56 The Viscount Goderich 1 Tory (Canningite) 18271828Replaced 57 George Canning 1 Tory (Canningite) 18271827Died 58 Andy Burnham1 Labour (Lab Co-op) 2026 Incumbent 59 Liz Truss 1 Conservative20222022Resigned

Disputed Prime Minister Length served Terms in office Party Start and end Reason for exit The Earl Waldegrave 0 Whig 1757Unsupported The Earl of Bath 0 Whig 1746Unsupported

See also History of the prime minister of the United Kingdom List of leaders of the opposition of the United Kingdom by length of tenure List of prime ministers of Australia by time in office List of prime ministers of Canada by time in office List of prime ministers of the United Kingdom List of prime ministers of the United Kingdom by age

References