When Your Sins Are Countless, God’s Grace Is Greater — Psalm 40

Photo Credit: Lucas Clara on Unsplash

Photo Credit: Lucas Clara on Unsplash

Disclosure: This post may contain affiliate links, meaning Beautiful Christian Life LLC may get a commission if you decide to make a purchase through its links, at no cost to you.

I waited patiently for the Lord; he inclined to me and heard my cry. He drew me up from the pit of destruction, out of the miry bog, and set my feet upon a rock, making my steps secure. He put a new song in my mouth, a song of praise to our God. Many will see and fear, and put their trust in the Lord. — Psalm 40:1-3

What is one thing you so badly want to do, but it is just not in the cards? You may dream of playing basketball at a high level, but providence gave you the stature of 5’2”. You would love to climb mountains, but your fear of heights keeps you grounded. Traveling the world is on your bucket list; yet, it seems impossible that you will ever be able to afford it.

Being fluent in another language would be awesome, but you can’t get those foreign words to stick. The dream you ache for doesn’t align with the abilities and lot that God has given you. Frustration is just the tip of the iceberg. And we struggle under a similar irritation spiritually. That is, we love God; we want to please him. Growing in the fruits of the Spirit and in wisdom is our heart’s desire, but it so often seems to escape us.

We want to do what is right and fall short. We are determined to avoid that sin, but then we do it. We vow to be good and break that vow. We feel stuck in the saying, “It is always with the best intentions that the worst work is done” (Oscar Wilde). Thus, we lament this treadmill. We cry out for deliverance from our inability, and in Psalm 40 God answers us.

Past deliverance gives rise to hope in Yahweh.

This psalm opens on a cheerful note. The psalmist doesn’t cut the air with a desperate cry. There is no begging God for an audience; rather, he records an already answered prayer. With thanksgiving in his soul, he recounts how he had prayed and how the Lord delivered him from his travail.

And in recalling his petition, he drills down on a particular attribute of prayer. When it comes to praying, there are many graces and virtues at work within us. Humility is required to admit our neediness. Faith reaches out trusting that the Lord can and will help. Love warms our affections to delight in all the wonders of our compassionate Savior.

Hope patiently waits upon the Lord.

And there is another virtue quite active in prayer, which is hope. Hope patiently waits upon the Lord to do what he promised. So, the psalmist affirms how his hope was anchored in the Lord. Yeah, this waiting is the term for hope. With his faith resting in God, the psalmist’s hope patiently awaited God’s response.

And this is one feature of hope that we can forget about. Hope’s confidence in the future and its assurance that the Lord will act and do good—these are the sugary parts of hope. But there is another part that is more vinegar: waiting. Hope sits in the waiting room not knowing when your name will be called, and it is calm.

It stands in line aware that the Lord’s timing is not ours and that it is good. Hope’s favorite commercial is the old Heinz ketchup one—the best things come to those who wait. So, the psalmist’s hope waited on God, and it was not disappointed, for the Almighty’s ear was inclined towards his cry. Yahweh heard and delivered, and what a deliverance.

For, the psalmist was rescued not from one of your run-of-the-mill enemies, but from that arch-foe, as old as time, death. He was sinking in the miry bog; the quicksand of the pit was racing him downwards. This is another way in which Sheol was described. As the dungeon of death, Sheol was the land of darkness and shadow; it was the domain of agony and shame.

And it was a slimy quagmire of suffocating mud. Yet, as the psalmist was drowning in the sludge, the Lord plucked him out. He saved him from death. The type of death, we are not informed about, be it sickness, war, or a corrupt court. Nonetheless, God mercifully drew him out of the pit of doom, and he gave him a solid footing upon a rock.

God gives his people a new song to sing.

The contrast between a pit of quicksand and an immoveable rock couldn’t be starker in displaying the new life given by the Lord. However, along with this refreshed life, God grants the psalmist a new song. Yahweh put a new song in his mouth, which depicts inspiration. The Spirit places the words of God upon the tongue of the psalmist.

Yet, why are these praises labeled a new song? Well, songs are responsive to God; he acts, and we reply with musical thanksgiving. A new song, then, means a new act of the Lord. A fresh work of God requires a new hymn to give thanks for it. To reuse an old song for a new rescue would be like re-gifting the same birthday card from last year—awkward.

Blessed are those who trust in the Lord.

With this heavenly-inspired hymn, though, the psalmist sings, and he wants it to benefit others. Many will see and fear and put their trust in the Lord. He even issues a blessing. Blessed is the one who makes the Lord his trust. The new song that celebrates deliverance from death will encourage faith in others.

People will notice how God saved the psalmist; they will hear about his hope not being put to shame, and they will believe. This new song inculcates faith in those who hear it. And this is a saving faith, for it rests in the Lord and it doesn’t turn to the proud. The word for proud here, though, most likely refers to idols, to the arrogant gods of the nations.

Thus, this faith will not join those who stray after the Lie. And the chief lie, capital L, of the Old Testament was idolatry. So also, for us, we should hear about the Lord saving the psalmist from death and we ought to believe in the Lord and denounce all other gods as a lie. Yet, now that we know that this music creates faith, we get to hear the lyrics, v 5.

The wonders of God cannot be counted.

You have multiplied, O Lord my God, your wondrous deeds and your thoughts toward us; none can compare with you! I will proclaim and tell of them, yet they are more than can be told. (Ps. 40:5)

Wondrous works and marvelous designs for us! Nothing compares to the Lord. Thus, the psalmist will recount and tell the story. He will list off all the miracles of God. With doxology, he will count the awesome works of the Almighty. That is, he will try but he won’t succeed because there are too many.

And amazing acts of the Lord pile up beyond counting. We can’t count that high; there isn’t enough paper or ink to write them all down. Infinite are the glorious wonders of our redeeming God. Yes, this is how great our Lord is. Incomparable are his works for us. His graces poured out on us are too numerous to even count.

God prepares his people to please him.

Surely, a new song that lists off the gracious works of the Lord is a great hymn. Yet, now that he has sung the chorus, the psalmist turns to assert a promise. He avows to do what is pleasing to the Lord. He has come; he delights to do God’s will, and the law is within him. With pure joy, the psalmist will obey completely.

He will fulfill everything that brings glory to the Lord. However, the form of this avowed righteousness is noteworthy. For one, he registers the priority of obedience over sacrifice. With peace and grain offerings, the Lord is not pleased. He has not required burnt and sin offerings. Now, this lack of interest in offerings is not a universal judgment.

For clearly, the law commanded sacrifice, and the smoke of the altar gave off an aroma pleasing to the Lord. Rather, these lines put sacrifices in their proper place. For one, obedience is a higher priority than sacrifice, which particularly counters a pagan understanding of sacrifice, where it mattered less if you acted uprightly as long as you paid the gods off with offerings.

Secondly, this keeps sacrifice within its lawful context. That is, sacrifice was limited to specific times and purposes. It wasn’t a one-size-fits-all practice; it couldn’t play on every field of life. Obedience, though, did. Being righteous was proper at all times. Sacrifice belonged to special occasions, but obeying was fitting 24-7.

Thus, the psalmist isn’t condemning all sacrifice, but he is promising to fulfill that higher and more universal priority of being righteous unto the Lord. Additionally, note how God has prepared him to fulfill his vow of obedience. You have given me an open ear. All obedience starts by listening; it begins with the ear.

And a shut ear is a stubborn and rebellious ear. Closed ears refuse to heed and walk in the Word of God. For the Lord to unclog the ear is for him to make you ready and able to obey as a whole person. Likewise, God’s law is within the psalmist, which is another image for success in uprightness. Such an internalization of the law matches up desire and performance.

With the law written inside, the psalmist’s heart is made new; its intention to obey aligns consistently with him performing that obedience. Intent and action are one. Therefore, the psalmist gives thanks to God by promising to be completely pleasing to him in all things. And the first expression of this committed uprightness is to further glorify the Lord.

The redeemed boldly praise the Lord.

The psalmist will enter the great congregation. He will go to church in the temple and before the entire assembly of saints, he will be loud. He will not hide God’s works within him; he will not muzzle his tongue out of shyness. But with boldness and volume, he will declare the excellencies of the Lord. God’s steadfast love and faithfulness he will announce.

The Lord’s salvation and mercy he will shout from the rooftops. He will be a witness and preacher of Yahweh’s saving love, of his faithful mercy, and of his steadfast righteousness. The Lord rescuing the psalmist from death may have been a private act, but his gratitude cannot remain private. He must go public. He has to share his love with the whole church.

He will herald the steadfast love and fidelity of Yahweh loud and clear for all to hear. His new song publicizes the gospel, so that many will put their trust in the Lord and give him the glory. Truly, then, this psalm is one of thanksgiving. The psalmist prayed and hoped in the Lord in a dire time of desperation.

The Lord heard and answered his petition with a life-giving deliverance. Then, in response, the psalmist promised total obedience and pervasive praise in the worshipping congregation. This somewhat pictures our whole salvation: deliverance from death, a new will to please God, and glorifying the Lord unendingly.

Sin besieges even the thankful believer.

However, just as the melody of this gratitude sweeps us away in its beauty, a shrill note tears at the harmony. The harp on which he plays breaks a string. The high-flying thankfulness crash lands into a lament. As he sings in church, evils assault him. Bad things besiege and molest the psalmist. Yet, what are these evils?

Are they foreign enemies, hostile neighbors, or miserable providences? No, these evils are his iniquities. Evils encompass; sins overtake. Such evils are not external forces, but internal depravities. The wild passions of sin prey upon us from within and bite us with their poison. And the sins that defeat the psalmist are many.

They aren’t a little here and a bit there, but they outnumber the hairs upon his head. An avalanche of transgressions sweeps over him to bury him with guilt and shame. And the effect of this mountain of sin adds up to delirium. He cannot see; his heart or mind forsakes him. The shame blackens his vision so that he cannot see straight.

The flood of sins destroys his sanity. He feels like he is losing his mind. And why do the sins drive him crazy? Because he just vowed to please the Lord completely. He affirmed the law was written on his heart, that his pure intention to obey would be consistently actualized in every part of life. But now, despite this sincere promise, sins overwhelm him.

The psalmist thought success was certain, but iniquities laid him waste. How can his best intentions yield the worst performance of countless sins? His mind cannot make sense of it, but there is one thing he can do—cry for help.

The believer cries out for the Lord’s help.

Be pleased, O Lord, to deliver me! O Lord, make haste to help me! (Ps. 40:13)

As he cried out previously to be delivered from death, now the psalmist prays again to be saved from sin. With his mind now working properly, he reverts to his old, good habit of praying in faith. And what does this rescue look like? Well, first, his petitions request the shaming of hostiles.

These are those who wanted the psalmist’s life to end; they took pleasure in his demise; and they loved to cheer over his defeat. Simply put, this group wanted the psalmist to be convicted as a sinner and executed as a felon, and they wanted to celebrate in the stands as they watched him perish. They mocked the psalmist’s faith as being in vain.

They ridiculed his hope as that of a fool—the Lord won’t save him; his hope is worthless. Those who blasphemed the Lord as being untrustworthy, who labeled hope in Yahweh as rubbish, these must be shamed. The Lord’s fidelity to be merciful has to be vindicated over those who scorn it. Additionally, on the other side of the coin, he prays for those loyal to God to rejoice.

Those who seek the Lord rejoice in him.

For those who seek the Lord continually, for those who trust in God unfailingly, may they be glad in God. Let their hope and faith be ratified by enjoying the grace of God. Indeed, the psalmist prays that those who love the salvation of God would constantly chant, “Yahweh is great!” Great is the Lord and greatly to be praised.

This is the soundtrack of their lives, the happiness of their souls, and their chief end. For, they put their faith in God; they placed their hope in the Lord, and it was not put to shame, but it was proven effective as they became heirs of God’s deliverance. So then, the salvation prayed for will shame unbelief and it will vindicate true faith with joyful worship.

The needy believer pleads for God to act quickly.

As for me, I am poor and needy, but the Lord takes thought for me. You are my help and my deliverer; do not delay, O my God! (Ps. 40:17)

However, until the Lord answers, the psalmist is mired down in his weakness. He is plagued by spiritual poverty and moral neediness. His hope holds on to the Lord, but his grip is feeble. He trusts in God, but his faith is weak. So, he urgently pleads for the Lord to be quick. Don’t delay, my Helper and Deliverer.

Under the urgency of overwhelming sin, the psalmist requires redemption and fast. Nevertheless, even though he is desperate, a solid seed of faith remains evident in the psalmist. This closing petition is not riddled with doubt, but it is infused with assurance. How is this felt? Well, the latter half of this psalm, which is a lament, follows the first half.

And the first part was a thanksgiving for a past rescue. The previous deliverance from death gives the psalmist certitude that the Lord will also save him from sin. The wonders God had done are surety for the ones he will yet do. Though, how does this work? The psalmist did promise obedience in his thanksgiving, and this didn’t succeed due to sin.

Well, the solution deals with who is speaking. David authored this psalm and as the anointed one of God, David had two voices, two accents. As the chosen Messiah of the Lord, his first dialect aligned with Christ. Positively, David foreshadowed Jesus, both his person and his work. Though as a fallen human, David’s second voice matched our sinful accent.

Christ came to fulfill the Father’s will.

Like us, David had to confess sin, admit to weak faith, and hope in the salvation of God. And in Psalm 40, David uses both of his voices. In the first half, we hear the voice of Christ himself. In fact, Hebrews 10 quotes from this psalm, particularly verses 6-8, as coming from the mouth of Jesus.

In coming into the world, our Savior took this vow of perfect obedience. He took on human flesh to do the will of God. The righteousness of the law was upon his heart. His delight was to complete everything that was written about in the Old Testament scroll. Yet, Hebrews tweaks the language of Psalm 40:6—“You have given me an open ear”—which expresses the ability to obey.

Hebrews reads this line as “a body you prepared for me,” which also expresses the capacity to obey. The ear represents the righteousness of the whole person. So the overall thrust of these lines is the same. Yet, the shift in anatomy from ear to body does shape the nature of obedience. The body prepared for Jesus was the righteousness to offer himself as the one sacrifice for sin.

The sacrifices that didn’t delight the Lord, then, were animal offerings. The blood of cows and lambs didn’t put the smile of atonement on God’s face. There was only one offering that did delight the Father—the righteousness of the Son to lay down his life as our atonement. Bovine blood couldn’t wash away our sins or appease wrath.

The holy blood of Christ, however, did. The miraculous work of Jesus upon the cross worked your marvelous redemption, once and for all. Therefore, David speaks with the voice of Jesus here in verses 6-8, and he talks about the sacred obedience of Christ to die as our sacrifice. And this voice of Jesus provides the sure foundation for the second half of the psalm.

The saving wonders of God overcome our sin.

In verse 12, David’s accent switches from Messianic to sinner. He confesses his countless sins; he humbles himself under the guilt and shame of his constant depravity. And he prays to be saved from these encompassing transgressions. Now, David speaks as one of us. He expresses his affinity with us who are sinners.

And what is the cause of redemption from sin? It is the obedient offering of Christ vowed and fulfilled. The work of God in the first half of the psalm is the fountain for deliverance in the latter half. And this is highlighted by the failure of math. In verse 12, the vastness of the psalmist’s sins was uncountable. They were too numerous to account for in full.

But something else was innumerable! The wondrous deeds of God surpass counting (Ps. 40:5). The uncountable can only be conquered by the uncountable. The power of human sin is only vanquished by the miracles of God’s love. And nowhere is God’s love more immeasurable than at the cross. The Divine Son died for us ungrateful sinners.

Christ gives his people a new heart.

“I delight to do your will, O my God; your law is within my heart.” (Ps. 40:8)

The bottomless debts of our transgressions were paid for by the infinite righteousness of Jesus. The terrifying wrath of justice was appeased by the blood of the Holy One. While we hated God, Jesus became our sacrifice. The richness of this grace cannot be counted.

Additionally, by his death, Jesus also fulfilled verse 8 in you. Here, David affirms that the law was within his heart, but he nevertheless finds himself overcome by sin. Thus, this benefit of a law-inscribed heart became a chief tenet of the new covenant promise. As Jeremiah preached, in the coming everlasting covenant God will write the law on hearts.

Believers live by a sure hope in Christ.

God regenerates us from death to life. He justifies us to be the righteousness of God. And he sanctifies us so that we actually please him. By grace, God gives us ears to heed his word; he gives us eyes to see his truth, and he fashions a new heart in us that delights to please God. The mercy of God enables us to do what we dream of doing but can’t do.

God’s love strengthens our feeble faith; his fidelity works the virtues of the Spirit in us. And his kindness equips us to hope ever in the Lord. Christ fashions patient waiting on him, a sure hope that will not be put to shame. For waiting upon the Lord is still a chief part of our piety, as we await the final deliverance from death and this body of depravity—the resurrection.

We are forgiven, but not yet fully holy. We are justified, but yet to be glorified. And during this time gap, from the cross to the second coming, Jesus gives you a living hope. And this hope is able to praise God continually in the great congregation. So, let us ever chant, “Great is the Lord,” now and until our hope becomes the reality of glorifying God in heaven for all eternity.


This article is adapted from the Rev. Zach Keele’s sermon on Psalm 40, preached at Escondido Orthodox Presbyterian Church on July 6, 2025.

Related Articles: