Since Paul knew that justification of faith is a refuge for those who lack righteousness of their own [cf. Romans chapter 5], he boldly infers that all who are justified by faith are excluded from works righteousness. But since it is certain that this is common to all believers, from this fact Paul with equal assurance determines that no one is justified by works [cf. Romans 3:20]—on the contrary, that men are justified without any help from our works. But it is one thing to discuss what value works have of themselves, another, to weigh in what place they are to be held after faith righteousness has been established.
If we are to determine a price for works according to their worth, we say that they are unworthy to come before God’s sight; that man, accordingly, has no works in which to glory before God; that hence, stripped of all help from works, he is justified by faith alone. But we define justification as follows: the sinner, received into communion with Christ, is reconciled to God by his grace, while, cleansed by Christ’s blood, he obtains forgiveness of sins, and clothed with Christ’s righteousness as if it were his own, he stands confident before the heavenly judgment seat. After forgiveness of sins is set forth, the good works that now follow are appraised otherwise than on their own merit. For everything imperfect in them is covered by Christ’s perfection, every blemish or spot is cleansed away by his purity in order not to be brought in question at the divine judgment. Therefore, after the guilt of all transgressions that hinder man from bringing forth anything pleasing to God has been blotted out, and after the fault of imperfection, which habitually defiles even good works, is buried, the good works done by believers are accounted righteous, or, what is the same thing, are reckoned as righteousness [Romans 4:22].
—Calvin, Institutes, 3.17.8 (Battles edn) (HT: Jack Miller)