According to The Folger Shakespeare Library’s edition of Macbeth, lines 21 to 31 of Act 5, Scene 5 are:
There would have been a time for such a word.
To-morrow, and to-morrow, and to-morrow,
Creeps in this petty pace from day to day
To the last syllable of recorded time,
And all our yesterdays have lighted fools
The way to dusty death. Out, out, brief candle!
Life's but a walking shadow, a poor player
That struts and frets his hour upon the stage
And then is heard no more: it is a tale
Told by an idiot, full of sound and fury,
Macbeth delivers this speech upon receiving “word” about the death of his wife, Lady Macbeth. Macbeth uses multiple metaphors to expound on his view that life and mortal existence are ultimately meaningless.
In lines 22-23, Macbeth compares the future (“To-morrow and to-morrow…”) to a creature that “creeps” or moves forward ceaselessly and inexorably at a “petty” or insignificant pace. Despite Lady Macbeth’s death, life goes on; it will continue to be trivial but inevitable.
In lines 25-26, he realizes that the past merely provides a beacon of light guiding people (“fools”) to the end (“dusty death”). No matter how glorious a person’s history (“yesterdays”) is, it just forges a path to death. Therefore, the sum of one’s lifetime accomplishments is insignificant in the end.
In line 26, Macbeth emphasizes the fragility and ephemeral nature of life with “Out, out, brief candle!” Any living person–male, female, nobility, soldier–is a flame easily extinguished. And life is short!
In lines 27-28, he compares a living person to a nebulous, insubstantial, and essentially meaningless “walking shadow”; a person is merely a histrionic actor whose existence consists of showy and emotional actions (“struts and frets”) that are ultimately hollow and futile. A mortal being appears and lives for only a brief time (“hour”) in this world (“stage”), only to die and be “heard no more.” Snuffed out like the earlier-mentioned a candle, a person is an image ("player") that actually leaves no trace, legacy, or anything of real value.
In lines 29-31, Macbeth sums up his thesis that life and existence are meaningless in the end. He compares them to a story (“tale”) that is played or lived out (“told”) by person (“idiot”). The narrative of a person’s life–although filled with action, drama, and emotion (“sound and fury”)–lacks and does not leave behind any purpose or meaning, “signifying nothing.”