This timeline shows most of the early life, the political career and death of each prime minister of the United Kingdom from 1846.
Unlike countries where the leader is elected directly to the highest political office of a separate executive, the prime minister must first establish a political career in the UK Parliament and typically serves many years in the House of Commons before becoming prime minister, and in some cases for many years afterwards.
Since the Marquess of Salisbury in 1895, all time in parliamentary service before being prime minister has been in the House of Commons, apart from Sir Alec Douglas-Home's period as a member of the Government while in the House of Lords (1951–63; though he was previously the elected member for Lanark, 1931–1945).
After becoming prime minister, Douglas-Home returned to the Commons by winning a by-election on the recess death of MP Gilmour Leburn.
Uniquely, Cameron's brief parliamentary activity as Foreign Secretary from November 2023 to July 2024 was served while a member of the House of Lords.