The Bible teaches that regardless of how long ago the sin was, it should be confessed to God and, potentially, to the people affected by the sin (depending on the circumstance). All sin is primarily against God (Genesis 39:9; Psalm 51:4). We miss the mark on His holy standard, which is why He sent Christ to die for our sins. God wants people to confess their sins to Him, and when they do, He forgives them (1 John 1:9). God's heart toward those who are sinned against is apparent throughout Scripture, including Old Testament Mosaic Law. The Law required restitution to the victim (Leviticus 6:4-5). The New Testament presents an example of this principle in action with Zacchaeus. He went beyond even what the Law required when he vowed to Jesus that he would give half his fortune and four times what he had defrauded people of (Luke 19:8-9). This sets a standard for today: if cheating (or any other sin) has consequences even years later and some relief can be proffered, the sin should be confessed and action taken to mitigate its consequences. Those who are truly repentant and who love their neighbor will try to make things right (Mark 12:31).
On crime shows, the police grill the suspect so hard and for so long that he breaks. The pressure is too great; he confesses to the crime.
Believers also confess but for a different reason: We love God. He wants us to confess our sins to Him and repent so that we can be in close relationship with Him.
Ultimately, all of our sins are against God; we've broken His righteous standard. We show love for Him when we acknowledge that (Matthew 22:36-38).
Confessing a sin to the person we've sinned against is a little less clear and depends on the context. If the sin is recent, it would likely be wise to confess it to the person you've harmed. If the sin is from many years past, the effects are no longer relevant, and you've long lost touch with the victim, then it may be implausible to confess. But if you're still in touch with the person and discomfort is all that holds you back, that's not a good enough reason.
Your repentance (recognizing your sin, turning to God) can be a powerful testimony to Christ in your life. In a world where people would rather hide, justify, or minimize their wrongs, a believer who walks in honesty and humility stands out. Confession says you are no longer ruled by pride or image management but by a desire to be right with God above all else. It acknowledges that sin is not something to conceal but something to bring into the light so it can be forgiven and healed. And when appropriate, it is willing to take the additional step of seeking reconciliation with others, not to relieve guilt alone but to restore what was broken. This kind of integrity reflects the heart of the gospel, where truth is faced, mercy is received, and restoration becomes possible.