List of Prime Ministers of the United Kingdom by tenure

Table columns:
Rank
Prime Minister
Length by time served
Premierships
Party
Start year

Table rows:
cells: 1
Walpole !Sir Robert Walpole
20 years, 314 days
1
Whig
1721
cells: 2
Pitt !William Pitt the Younger
18 years, 343 days
2
Tory (Pittite)
1783
cells: 3
Liverpool !The Earl of Liverpool
14 years, 305 days
1
Tory (Pittite)
1812
cells: 4
Salisbury !The Marquess of Salisbury
13 years, 252 days
3
Conservative
1885
cells: 5
Gladstone !William Ewart Gladstone
12 years, 126 days
4
Liberal
1868
cells: 6
North !Lord North
12 years, 58 days
1
Tory (Northite)
1770
cells: 7
Thatcher !Margaret Thatcher
11 years, 209 days
1
Conservative
1979
cells: 8
Pelham !Henry Pelham
10 years, 191 days
1
Whig
1743
cells: 9
Blair !Tony Blair
10 years, 56 days
1
Labour
1997
cells: 10
Palmerston !The Viscount Palmerston
9 years, 141 days
2
Whig / Liberal
1855
cells: 11
Asquith !H. H. Asquith
8 years, 244 days
1
Liberal
1908
cells: 12
Churchill !Sir Winston Churchill
8 years, 239 days
2
Conservative
1940
cells: 13
Wilson !Harold Wilson
7 years, 279 days
2
Labour
1964
cells: 14
Newcastle !The Duke of Newcastle
7 years, 205 days
2
Whig
1754
cells: 15
Baldwin !Stanley Baldwin
7 years, 82 days
3
Conservative
1923
cells: 16
Disraeli !Benjamin Disraeli
6 years, 339 days
2
Conservative
1868
cells: 17
Macdonald !Ramsay MacDonald
6 years, 289 days
3
Labour / National Labour
1924
cells: 18
Macmillan !Harold Macmillan
6 years, 281 days
1
Conservative
1957
cells: 19
Melbourne !The Viscount Melbourne
6 years, 255 days
2
Whig
1834
cells: 20
Major !John Major
6 years, 154 days
1
Conservative
1990
cells: 21
Attlee !Clement Attlee
6 years, 92 days
1
Labour
1945
cells: 22
Cameron !David Cameron
6 years, 63 days
1
Conservative
2010
cells: 23
Russell !Lord John Russell
6 years, 11 days
2
Whig / Liberal
1864
cells: 24
George !David Lloyd George
5 years, 317 days
1
Liberal
1916
cells: 25
Peel !Sir Robert Peel
5 years, 57 days
2
Conservative
1834
cells: 26
Derby !The Earl of Derby
3 years, 280 days
3
Conservative
1852
cells: 27
Heath !Edward Heath
3 years, 259 days
1
Conservative
1970
cells: 28
Grey !The Earl Grey
3 years, 229 days
1
Whig
1830
cells: 29
Balfour !Arthur Balfour
3 years, 145 days
1
Conservative
1902
cells: 30
Portland !The Duke of Portland
3 years, 82 days
2
Whig / Tory (Pittite)
1783
cells: 31
Addington !Henry Addington
3 years, 54 days
1
Tory (Pittite)
1801
cells: 32
Callaghan !James Callaghan
3 years, 29 days
1
Labour
1976
cells: 33
Chamberlain !Neville Chamberlain
2 years, 348 days
1
Conservative
1937
cells: 34
Wellington !The Duke of Wellington
2 years, 320 days
2
Tory
1828
cells: 35
Brown !Gordon Brown
2 years, 319 days
1
Labour
2007
cells: 36
Perceval !Spencer Perceval
2 years, 221 days
1
Tory (Pittite)
1809
cells: 37
Bannerman !Henry Campbell-Bannerman
2 years, 122 days
1
Liberal
1905
cells: 38
Grenville, George !George Grenville
2 years, 85 days
1
Whig (Grenvillite)
1763
cells: 39
Chatham !The Earl of Chatham
2 years, 76 days
1
Whig (Chathamite)
1766
cells: 40
Aberdeen !The Earl of Aberdeen
2 years, 42 days
1
Peelite
1852
cells: 41
Eden !Sir Anthony Eden
1 year, 279 days
1
Conservative
1955
cells: 42
May !Theresa May
1 year, 231 days (Incumbent)
1
Conservative
2016
cells: 43
Wilmington !The Earl of Wilmington
1 year, 119 days
1
Whig
1742
cells: 44
Rockingham !The Marquess of Rockingham
1 year, 113 days
2
Whig (Rockinghamite)
1765
cells: 45
Rosebery !The Earl of Rosebery
1 year, 109 days
1
Liberal
1894
cells: 46
Grafton !The Duke of Grafton
1 year, 106 days
1
Whig (Chathamite)
1768
cells: 47
Grenville, William !The Lord Grenville
1 year, 42 days
1
Whig
1806
cells: 48
Home !Sir Alec Douglas-Home
362 days
1
Conservative (Scot. Unionist)
1963
cells: 49
Bute !The Earl of Bute
317 days
1
Tory
1762
cells: 50
Shelburne !The Earl of Shelburne
266 days
1
Whig (Chathamite)
1782
cells: 51
Devonshire !The Duke of Devonshire
225 days
1
Whig
1756
cells: 52
Law !Bonar Law
211 days
1
Conservative (Scot. Unionist)
1922
cells: 53
Goderich !The Viscount Goderich
130 days
1
Tory (Canningite)
1827
cells: 54
Canning !George Canning
119 days
1
Tory (Canningite)
1827

Questions about this table:
originalText: who is the uk longest serving prime minister
answer: answerTexts: Sir Robert Walpole