Where is boasting then? It is excluded. By what law? Of works? No, but by the law of faith. Therefore we conclude that a man is justified by faith apart from the deeds of the law. (Romans 3:27-28)
Because God had set Jesus forth as a propitiation, those He died for had no room for boasting about themselves or their deeds.
If a man is saved not as a righteous person, but as a pardoned criminal, where is there room for boasting? There is none at all; it is excluded. - McGarvey, 122
All have sinned (Romans 3:23); therefore, all deserve to face the judicial wrath of the righteous Judge. Even someone who tried to live a more moral life than most had still sinned and still deserved death.
The law of works.
The “law of works” referred to here by Paul does not specifically refer to the Law of Moses - but instead refers to a man’s moral performance.
When Paul used law in this verse, he did not have in mind the law of Moses, as he usually did, but a “principle” or “rule.” The principle of works does not stop boasting, but rather increases it. - Pollard, Truth for Today Commentary, 128
In the argument of this epistle the “law of works” stands for the arrangement by which a man is acquitted before God on the ground of his moral performance - flawless performance. The man who gains acquittal on the basis of the “law of works” (that is, by his flawless performance) has earned his acquittal. He has reason to boast. HE did it. - McGuiggan, Romans , 133
If a person lived a sinless life, then they would be able to stand before God based on their record - their performance would be flawless, and they would be able to boast about that.
However, “all have sinned” (Romans 3:23), so no one can boast. Why? Because no one can stand before God based on their performance.
The difference between the law of works and the law of faith.
The “law of works” doesn’t exclude boasting; it encourages it. The “law of faith” which is the will of God in connection with the justified ones, confesses the need for mercy and so excludes boasting. The “law of faith” is just that, God’s law which demands faith. The “law of works” is just that, God’s law that demands (flawless) works. - McGuiggan, Romans , 133
The basis of the “law of works” is an individual’s performance. The basis of the “law of faith” is the sacrifice of Jesus Christ on the cross.
We shouldn’t take from this that God does not demand obedience today under the law of faith because there are still conditions placed on our justification.
Conditions on which God grants justification or salvation, yes; but not the basis that makes it possible for Him to grant it - the basis is Calvary! - Reese, Romans, 146
Paul is merely taking us back to his main point in Romans.
For I am not ashamed of the gospel of Christ, for it is the power of God to salvation for everyone who believes, for the Jew first and also for the Greek. For in it the righteousness of God is revealed from faith to faith; as it is written, "THE JUST SHALL LIVE BY FAITH." (Romans 1:16-17)