Sacred scripture, sacred tradition, and the teaching of the magisterium are unanimous that Jesus Christ was, and still is, sinless. Hebrews 4:15 says, “For we have not a high priest who is unable to sympathize with our weaknesses, but one who in every respect has been tempted as we are, yet without sin." This same teaching is echoed in the Catechism (CCC 467) and also appears in the following general audience given by Pope St. John Paul II:
The same Jesus could issue the challenge, "Can any of you charge me
with sin?" (Jn 8:46). The faith of the Church is expressed as follows:
"He was conceived, born and died without sin." This was proclaimed, in
harmony with the whole of Tradition, by the Council of Florence
(Decree for the Jacobites, DS 1347). Jesus "was conceived, was born
and died without sin." He is the truly just and holy man.
We repeat with the New Testament, with the creed, and with Vatican
Council II that Jesus Christ "has truly been made one of us, like us
in all things except sin." It is precisely thanks to this likeness
that "Christ, the final Adam, by the revelation of the mystery of the
Father and his love, fully reveals man to man himself and makes his
supreme calling clear" (GS 22).
There is one misunderstanding about this teaching that sometimes rears its ugly head. Specifically, some people claim that Jesus could have sinned but that he consciously chose not to sin. But the fact of the matter is that Jesus could no more have sinned than 2+2 could equal five. It’s simply impossible.
Why Jesus Could Not Have Sinned
According to Aquinas, sin is, “an utterance, a deed, or a desire contrary to the eternal law." Sin occurs when we disobey divine commands that are rooted in God’s perfectly good, perfectly eternal, and perfectly unchanging nature. God by definition cannot sin because he is perfect goodness itself. It would be a logical contradiction for God to violate his perfectly good and perfectly rational nature.
So if it is impossible for God to sin, then it was impossible for Jesus to sin because Jesus is God. The Council of Chalcedon declared that,
“Following the holy Fathers, we unanimously teach and confess one and
the same Son, our Lord Jesus Christ: the same perfect in divinity and
perfect in humanity, the same truly God and truly man, composed of
rational soul and body; consubstantial with the Father as to his
divinity and consubstantial with us as to his humanity; "like us in
all things but sin."
So why do some Christians think that Jesus could have sinned but, thankfully for us, he did not? One reason is because some people assume that if you can imagine something in the mind then it follows that what is imagined could really happen. Since many people say they can imagine Jesus sinning, even mildly, it is possible Jesus could have sinned even though he actually did not.
The problem with this argument is that just because we can conceive of something in the mind it does not mean that what we conceive is actually possible. For example, some of the things we conceive are not physically or naturally possible. George Lucas might be able to conceive of light sabers and death stars, but that doesn’t mean those things, given the current universe’s laws of physics, could really exist. As far as we know, these things are naturally impossible. We know other things are impossible because we can’t conceive of them at all, things like square-circles or married bachelors. These things are logically impossible.
But between natural impossibility (e.g. jumping to the moon), and logical impossibility (e.g. square-circles) there is another kind of impossibility – metaphysical impossibility. Things that are metaphysically impossible cannot exist but their impossibility can’t be demonstrated through first-order logic.
For example, even if you don’t know what a blork is, you know a blork cannot both exist and not exist at the same time because that would violate the law of non-contradiction (“X equals X” and “X does not equal X” cannot both be true at the same time in the same way).
But you have to know what a “prime minister" and a “prime number" are in order to know that the statement “The prime minister is a prime number" can never be true. It might not be “logically impossible" but it is metaphysically impossible. It can’t happen given the way reality is. Likewise, saying “Jesus could sin" doesn’t sound contradictory, but when we know that Jesus is God and God cannot possibly sin, then the contradiction becomes readily apparent.
An example from mathematics can also show that being able to conceive of something (what philosophers sometimes call epistemic possibility) does not entail metaphysical possibility, or that what is conceived could really happen.
Mindscapes can’t always be landscapes
According to Goldbach’s conjecture any even number greater than two can be expressed as the sum of two prime numbers. So, 12 is the sum of 5 and 7, 84 is the sum of 37 and 47, and so on. The conjecture is thought to be true but it has never been proven. It’s possible that one day a number will be discovered that does not conform to Goldbach’s rule.
So, I could imagine the conjecture being true and mathematicians finding a way to prove that, in principle, no such number will ever be found. Or, I can imagine it being false and see in my mind a group of mathematicians showing us a huge, even number that is not the sum of any two prime numbers.
While I can imagine both possibilities only one is metaphysically possible, or could actually happen, since mathematical truths are necessary truths. There could not be a universe A where the conjecture is true and a universe B where it is false any more than there could be a universe A where 2+2=4 and a universe B where 2+2=5.
To put forward a more familiar example of this kind of possibility, while atheists say they can “imagine" a universe without God the fact is that God is a metaphysically necessary being. God always exists even if the physical universe does not exist. There can be no physical universe that exists without God also existing, regardless of what any of us can imagine.
So to recap, just because I can conceive in my mind an image of Jesus sinning, that does not prove he actually could have sinned. In fact, the evidence I have that Jesus is God incarnate means that God’s properties of being unable to sin also apply to Jesus. Therefore, Jesus could not have sinned no matter what I can “imagine" in my mind.
There are two more objections to the view Jesus could not have sinned that I should answer. First, if Jesus could not have sinned then why did Satan even bother to tempt him? The answer is that Satan probably did not know Jesus was the messiah or God incarnate. Satan isn’t omniscient like God is so he has to acquire his knowledge about the world. Aquinas says,
“The minds of demons are utterly perverted from the Divine wisdom,
they at times form their opinions of things simply according to the
natural conditions of the same. Nor are they ever deceived as to the
natural properties of anything; but they can be misled with regard to
supernatural matters; for example, on seeing a dead man, they may
suppose that he will not rise again, or, on beholding Christ, they may
judge him not to be God. (ST I:58:5)
Second, some people will argue, “Isn’t Jesus more holy or more perfect because he could have sinned but chose not to? How can we say someone is good or amazing if he has no choice in his actions? Praising such a person would be like praising a robot."
But we don’t always praise people just because they succeeded when they could have failed (either through weakness or a deliberate act of the will). Sometimes we praise people and things just because they are good and there is no way they could fail.
For example, which is more impressive — A ship that is unsinkable as long as the captain follows the instructions, or a ship that can’t possibly sink under any condition? I would say the latter is more impressive. Likewise, which is more impressive – a being that could fail but works really hard not to, or a being that is just goodness and perfection itself and so is immune to failure or sin.
I don’t stand in awe of Jesus because he avoided sinning in the same way that a tightrope walker avoids plunging to his death. I stand in awe of Jesus because he is God. The infinite act of being who, for our sake, humbled himself and became man. I trust in him for my salvation not because he is “really good" at being holy, but because holiness is a part of his nature and goodness ultimately comes from his divinity.
When we say, “Jesus I trust in you" we are trusting in the most firm and reliable aspect of reality, not a God who could have failed but thankfully for us, did not.
 “Like us in all things except sin" General Audience, February 3, 1988.
 St. Thomas Aquinas, STh I-II,71,6. CCC 1849
 Cited in CCC 467
By Trent Horn