Romans 4:5

5 However, to the one who does not work but trusts God who justifies the ungodly, their faith is credited as righteousness.

Read Romans 4:5 Using Other Translations

But to him that worketh not, but believeth on him that justifieth the ungodly, his faith is counted for righteousness.
And to the one who does not work but believes in him who justifies the ungodly, his faith is counted as righteousness,
But people are counted as righteous, not because of their work, but because of their faith in God who forgives sinners.

What does Romans 4:5 mean?

John Gill's Exposition of the Bible
Romans 4:5

But to him that worketh not
Not that the believer does not work at all, but not from such principles, and with such views as the other; he does not work in order to obtain life and salvation; he does not seek for justification by his doings:

but believeth on him that justifieth the ungodly:
or that ungodly one: particular reference is had to Abraham, who in his state of unregeneracy was an ungodly person; as all God's elect are in a state of nature, and are such when God justifies them, being without a righteousness of their own; wherefore he imputes the righteousness of another, even that of his own Son, unto them: and though he justifies the ungodly, he does not justify their ungodliness, but them from it; nor will he, nor does he leave them to live and die in it; now to him that worketh not, that is perfect righteousness; or has no opportunity of working at all; or what he does, he does not do, that he might be justified by it; but exercises faith on God as justifying persons, who, like himself, are sinners, ungodly and destitute of a righteousness:

his faith is counted for righteousness;
not the act, but the object of it; which was Abraham's case, and therefore was not justified by works. The Vulgate Latin version here adds, "according to the purpose of the grace of God".

California - Do Not Sell My Personal Information  California - CCPA Notice