The final chapter opens with an urgent call: Remember also your Creator in the days of your youth, before the evil days come, and the years draw near, when you will say, I have no pleasure in them. Verses 2-7 are a poem about aging, using pictures: the keepers of the house tremble, the grinders cease, the almond tree blossoms. It ends before the silver cord is severed, or the golden bowl is broken, and the dust returns to the earth as it was, and the spirit returns to God who gave it.
Verse 8 repeats the book's opening refrain: Vanity of vanities, says the Preacher. All is vanity! Then the book describes the Preacher: because the Preacher was wise, he still taught the people knowledge. The Preacher sought to find out acceptable words, and that which was written blamelessly, words of truth. The words of the wise are like goads; and like nails well fastened are words from the masters of assemblies, which are given from one shepherd. Wisdom ultimately comes from God, the one Shepherd.
The book's conclusion: This is the end of the matter. All has been heard. Fear God and keep his commandments; for this is the whole duty of man. For God will bring every work into judgment, with every hidden thing, whether it is good, or whether it is evil. The search under the sun ends by looking above the sun to God. In the New Testament, Paul writes, Therefore if anyone is in Christ, he is a new creation (2 Corinthians 5:17).