The longest of Shakespeare's plays is Hamlet with 3,901 lines, and the shortest play is The Comedy of Errors with 1,911 lines.