In short, I affirm, that not by our own merit but by faith alone, are both our persons and works justified; and that the justification of works depends on the justification of the person, as the effect on the cause. (John Calvin, Acts of the Council of Trent with the Antidote)Calvin explains from his commentary comments on verse 2 Corinthians 5:10 - [We must all stand before Christ to be judged. Everyone will get what they should. They will be paid for whatever they did—good or bad—when they lived in this earthly body.]
As the passage relates to the recompensing of deeds, we must notice briefly, that, as evil deeds are punished by God, so also good deeds are rewarded, but for a different reason; for evil deeds are requited with the punishment that they deserve, but God in rewarding good deeds does not look to merit or worthiness. For no work is so full and complete in all its parts as to be deservedly well-pleasing to him, and farther, there is no one whose works are in themselves well-pleasing to God, unless he render satisfaction to the whole law. Now no one is found to be thus perfect. Hence the only resource is in his accepting us through unmerited goodness, and justifying us, by not imputing to us our sins. After he has received us into favor, he receives our works also by a gracious acceptance. It is on this that the reward hinges. There is, therefore, no inconsistency in saying, that he rewards good works, provided we understand that mankind, nevertheless, obtain eternal life gratuitously. On this point I have expressed myself more fully in the preceding Epistle, and my Institutes will furnish a full discussion of it.As shown in the diagram at the upper right, it is precisely because we are justified by God's grace through faith alone in Christ (A) that God also justly and graciously looks upon or accepts those works done by us (B), those good works of ours that Scripture defines as good (WCF 16.1) - not for any perfection or merit that is in them but due solely to the forgiveness of sins wrought for us in Christ. The latter (B) flows from the former (A) as a necessary consequence and benefit of our justification. As Calvin notes, this justification or acceptance in Christ is effected for both our person and our works inasmuch as God in Christ is "not imputing to us our sins." Thus God graciously forgives us for those acts (thought, word, and deed), which violate his moral law as well as not imputing to us the imperfections or the remnant of sin, which resides within even our best good works (WCF 16.5,6).