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.[1] 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.[2] 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.
Of the 57 past prime ministers, nine served more than 10 years while eight served less than a year.[5] Robert Walpole is the only person to have served as prime minister for more than two decades. Liz Truss is the shortest-serving prime minister, resigning after seven weeks.[4][6][7] The previous shortest time served was George Canning, who served for less than four months before dying in office.[8] Margaret Thatcher, in office for 11 years and 208 days between 1979 and 1990, is the longest-serving prime minister in modern history,[3] and the longest-serving prime minister officially referred to as such.[9][10] William Gladstone is the only person to have served four separate terms.