List of Prime Ministers of the United Kingdom by tenure - wikipedia List of Prime Ministers of the United Kingdom by tenure 20 years, 314 days Robert Walpole from 1721 to 1742 18 years, 343 days William Pitt the Younger from 1783 to 1801 and 1804 to 1806 14 years, 305 days Earl of Liverpool from 1812 to 1827 211 days Bonar Law from 1922 to 1923 130 days Viscount Goderich from 1827 to 1828 119 days George Canning in 1827 This list of Prime Ministers of the United Kingdom lists each Prime Minister in order of term length. This is based on the difference between dates ; if counted by number of calendar days all the figures would be one greater. Of the 54 Prime Ministers, 9 served more than 10 years while 7 served less than 1 year. Sir Robert Walpole is the only person to have served as Prime Minister for more than 20 years. George Canning served as Prime Minister for less than four months before his death. Rank by tenure Rank by length of terms Prime Minister Length by time served Ministries Party Start of 1st Administration Walpole ! Sir Robert Walpole 20 years, 314 days 6 Whig 1721 Pitt ! William Pitt the Younger 18 years, 343 days 5 Pittite ( Tory ) 1783 Liverpool ! The Earl of Liverpool 14 years, 305 days 5 Tory 1812 Salisbury ! The Marquess of Salisbury 13 years, 252 days 5 Conservative 1885 5 Gladstone ! William Ewart Gladstone 12 years, 126 days Liberal 1868 6 North ! Lord North 12 years, 58 days Tory 1770 7 Thatcher ! Margaret Thatcher 11 years, 209 days Conservative 1979 8 Pelham ! Henry Pelham 10 years, 191 days Whig 1743 9 Blair ! Tony Blair 10 years, 56 days Labour 10 Palmerston ! The Viscount Palmerston 9 years, 141 days Whig 1855 11 Asquith ! H.H. Asquith 8 years, 244 days Liberal 1908 12 Churchill ! Sir Winston Churchill 8 years, 239 days Conservative 1940 13 Wilson ! Harold Wilson 7 years, 279 days Labour 1964 14 Newcastle ! The Duke of Newcastle 7 years, 205 days Whig 1754 15 Baldwin ! Stanley Baldwin 7 years, 82 days Conservative 1923 16 Disraeli ! Benjamin Disraeli 6 years, 339 days Conservative 1868 17 Macdonald ! Ramsay MacDonald 6 years, 289 days Labour / National Labour 1924 18 Macmillan ! Harold Macmillan 6 years, 281 days Conservative 1957 19 Melbourne ! The Viscount Melbourne 6 years, 255 days Whig 1834 20 Major ! Sir John Major 6 years, 154 days Conservative 21 Attlee ! Clement Attlee 6 years, 92 days Labour 1945 22 Cameron ! David Cameron 6 years, 63 days Conservative 23 Russell ! Lord John Russell 6 years, 11 days Whig 1864 24 George ! David Lloyd George 5 years, 317 days Liberal 1916 25 Peel ! Sir Robert Peel 5 years, 57 days Conservative 1834 26 Derby ! The Earl of Derby 3 years, 280 days Conservative 1852 27 Heath ! Edward Heath 3 years, 259 days Conservative 1970 28 Grey ! The Earl Grey 3 years, 229 days Whig 1830 29 Balfour ! Arthur Balfour 3 years, 145 days Conservative 1902 30 Portland ! The Duke of Portland 3 years, 82 days Whig / Tory 1783 31 Addington ! Henry Addington 3 years, 54 days Tory 1801 32 Callaghan ! James Callaghan 3 years, 29 days Labour 1976 33 Chamberlain ! Neville Chamberlain 2 years, 348 days Conservative 1937 34 Wellington ! The Duke of Wellington 2 years, 320 days Tory 1828 35 Brown ! Gordon Brown 2 years, 319 days Labour 2007 36 Perceval ! Spencer Perceval 2 years, 221 days Tory 1809 37 Bannerman ! Henry Campbell - Bannerman 2 years, 122 days Liberal 1905 38 Grenville, George ! George Grenville 2 years, 85 days Whig ( Grenvillite ) 1763 39 Chatham ! The Earl of Chatham 2 years, 76 days Whig ( Chathamite ) 1766 40 Aberdeen ! The Earl of Aberdeen 2 years, 42 days Peelite 1852 41 Eden ! Sir Anthony Eden 1 year, 279 days Conservative 1955 42 Wilmington ! The Earl of Wilmington 1 year, 136 days Whig 1742 43 Rockingham ! The Marquess of Rockingham 1 year, 113 days Whig ( Rockinghamite ) 1765 44 Rosebery ! The Earl of Rosebery 1 year, 109 days Liberal 1894 45 Grafton ! The Duke of Grafton 1 year, 106 days Whig ( Chathamite ) 1768 46 May ! Theresa May 7002433000000000000 ♠ 1 year, 68 days ( Incumbent ) Conservative 2016 47 Grenville, William ! The Lord Grenville 1 year, 42 days Whig 1806 48 Home ! Sir Alec Douglas - Home 362 days Conservative 1963 49 Bute ! The Earl of Bute 317 days Tory 1762 50 Shelburne ! The Earl of Shelburne 266 days Whig ( Chathamite ) 1782 51 Devonshire ! The Duke of Devonshire 225 days Whig 1756 52 Law ! Bonar Law 211 days Conservative 1922 53 Goderich ! The Viscount Goderich 130 days Tory ( Canningite ) 1827 54 Canning ! George Canning 119 days Tory ( Canningite ) 1827 See also List of Prime Ministers of the United Kingdom List of Prime Ministers of the United Kingdom by age William Pulteney, 1st Earl of Bath ( sometimes listed as a prime minister ; held office for 2 days in 1746 ) James Waldegrave, 2nd Earl Waldegrave ( sometimes listed as a prime minister ; held office for 4 days in 1757 ) External links Prime Ministers in History from the 10 Downing Street website. Lists relating to Prime Ministers of the United Kingdom List of Prime Ministers of the United Kingdom Lists by order Age Constituencies Cultural depictions Governments Historical rankings Number living Records Service ( graphical ) Term length Peerages By monarch Victoria Edward VII George V Edward VIII George VI Elizabeth II Personal life Burial places Coats of arms Education Nickname Spouse In fiction Fictional Prime Ministers Retrieved from `` https://en.wikipedia.org/w/index.php?title=List_of_Prime_Ministers_of_the_United_Kingdom_by_tenure&oldid=798263797 '' Categories : Lists of people by time in office Lists of Prime Ministers of the United Kingdom Talk About Wikipedia Add links This page was last edited on 31 August 2017, at 22 : 09. About Wikipedia

Question: who is the uk longest serving prime minister
Answer: Sir Robert Walpole