“Lest we stumble from the first step (which would happen if we entered into dispute about something uncertain), we must first explain what these ways of speaking mean: "to be justified before God" and "to be justified by faith or by works." “That person is said to be justified before God who is counted righteous before God's judgment and is acceptable to His righteousness. Since iniquity is hateful to God, the sinner cannot find grace before His face; therefore, where sin is, there God's wrath and vengeance make themselves known. So that person is justified who is not counted as a sinner but as righteous, and for this reason he can rest tranquilly at God's judicial throne, before which all sinners stumble and are confounded. As when some person who was wrongly accused, when he has been examined by the judge and absolved and declared innocent, we say that he is justified in righteousness; so we say that a person is justified before God who, being separated from the number of sinners, has God as witness and proof of his righteousness. So we say that a person is justified before God by his works when there is such a purity and holiness in his life that it deserves the name of righteousness before God, or when by the integrity of his works he can satisfy God's judgment. On the contrary, that person is said to be justified by faith who, being excluded from the righteousness of works, by faith grasps Jesus Christ's righteousness and, clad in that, appears before God's face not as a sinner but as righteous.
“However, because the majority of people imagine a righteousness of faith mixed with works, let us also show (before we pass on) that the righteousness of faith is so different from that of works that if the one is established, the other is overturned. The apostle says that "he has counted all things as excrement to gain Christ and to be found in Him, not having his own righteousness which is of the law but that which is by faith in Jesus Christ, that is the righteousness which is from God by faith" (Phil. 3[8-9]). We see here that he compares the two things as opposites, and shows that it is necessary for the one who wants to obtain Christ's righteousness to abandon his own.”
John Calvin, Institutes of the Christian Religion: The First English Version of the 1541 French Edition