The first prime minister was Robert Walpole (1676-1745). His period of office lasted from 1721-1742.(The term 'prime minister' had no official standing in Britain till 1906. It was a more a nickname for the chief minister, who held the office of First Lord of the Treasury. However, there is unanimous agreement among historians that Walpole was the first prime minister of a cabinet style government responsible to Parliament).
Pedants may note that he would have not called himself "prime minister" and the title, whose origins are obscure (and can be found at least as far back as Queen Anne (1702-14)), first developed as a term of derision towards him and his successors. The official title held was usually First Lord of the Treasury, (a title still held by the Prime Minister to this day).
The term Prime Minister gradually lost its perjorative meaning and became the common informal title, first occurring in official documents under Benjamin Disraeli's premiership. It took until the beginning of the twentieth century for the title to gain full official status and was first held by Henry Campbell-Bannerman, who held the office from 1905-08.
The first Prime Minister - Robert Walpole, from 1721 to 1742 (also the longest serving to date). However, Henry Campbell-Bannermann (PM from 1906-1908) was the first to use the title officially.
Sir Robert Walpole is regarded as being the first British prime minister, in April 1721.
The official title did not exist until 1905 when Sir Henry Campbell-Bannerman assumed office.