From Calvin Commentary n the Bible
21.
Him who knew no sin. Do you observe, that, according to Paul, there is no return to favor with God, except what is founded on the sacrifice of Christ alone? Let us learn, therefore, to turn our views in that direction, whenever we desire to be absolved from guilt. He now teaches more clearly, what we adverted to above — that God is propitious to us, when he acknowledges us as righteous. For these two things are equivalent — that we are acceptable to God, and that we are regarded by him as righteous.
To
know no sin is to be free from sin. He says, then, that Christ, while he was entirely exempt from sin, was
made sin for us. It is commonly remarked, that
sin here denotes an expiatory sacrifice for sin, and in the same way the Latin’s term it,
piaculum (566) Paul, too, has in this, and other passages, borrowed this phrase from the Hebrews, among whom אשם (
asham) denotes an
expiatory sacrifice, as well as an
offense or
crime. (567) But the signification of this word, as well as the entire statement, will be better understood from a comparison of both parts of the antithesis.
Sin is here contrasted with
righteousness, when Paul teaches us, that
we were made the righteousness of God, on the ground of
Christ’s having been made sin. Righteousness, here, is not taken to denote a quality or habit, but by way of imputation, on the ground of Christ’s righteousness being reckoned to have been received by us. What, on the other hand, is denoted by
sin? It is the guilt, on account of which we are arraigned at the bar of God. As, however, the curse of the individual was of old cast upon the victim, so Christ’s condemnation was our absolution, and
with his stripes we are healed. (Isaiah 53:5.)
How Was Jesus "Made" Sin? - Christian Research Institute