Hamlet has been named the nation’s favourite play by William Shakespeare after topping a survey by theatre website WhatsOnStage.

The tragedy narrowly topped the poll with 13% of the vote, just ahead of comedy Much Ado About Nothing with 12% and Macbeth in third place with 11%.

Further down the list was Romeo And Juliet in seventh place, and Richard II rounded up the top 10.

William Shakespeare was born in Stratford-upon-Avon in 1564 (PA)

The results of the survey have been released to coincide with the 454th anniversary of William Shakespeare’s birth in Stratford-upon-Avon on April 23 1564.

Hamlet, which tells the story of the titular Prince of Denmark and the revenge he wreaks upon his treacherous uncle Claudius, contains some of Shakespeare’s most celebrated lines, including the protagonist’s soliloquy that begins “To be, or not to be”.

Recent performances productions of Hamlet have included Sherlock actor Benedict Cumberbatch taking on the lead role at the Barbican and Andrew Scott playing the prince in the Almeida Theatre’s retelling, which was televised on BBC Two last Easter Saturday.

Hamlet wins vote for UK's favourite Shakespeare's play
Benedict Cumberbatch played Hamlet in a production at the Barbican in London (Isabel Infantes/PA)

WhatsOnStage chief operating officer Sita McIntosh said: “Four hundred and 54 years after the world’s greatest playwright was born, William Shakespeare’s plays are as loved as ever.

“Theatres around the UK are largely to thank for this, continuing to celebrate the Bard’s work with world-class performances.”