Jesus never committed a single sin. He was the spotless Lamb of God. That's why His sacrifice was perfect; and that's how the Father could accept Jesus' (the Son's) death as an atonement for those who put their faith and trust in Him.
"God made him who had no sin to be sin for us, so that in him we might become the righteousness of God." (2 Corinthians 5:21)
"For we do not have a high priest who is unable to sympathize with our weaknesses, but we have one who has been tempted in every way, just as we are—yet was without sin." (Hebrews 4:15)
"He committed no sin, and no deceit was found in his mouth." (1 Peter 2:22)
"...but with the precious blood of Christ, a lamb without blemish or defect." (1 Peter 1:19)