The Jewish custom in Jesus’ day was to forgive someone three times—tops. Keener writes, “Judaism also stressed forgiveness, though some teachers saw the need to limit forgiveness to three instances of premeditated sin, pointing out that repentance was otherwise not genuine.” While Peter was thinking that forgiving someone seven times was over the top, Jesus ups his standard to 77 times!
Jesus was harkening back to Lamech—the evil dictator—in the OT. Lamech said, “If Cain is avenged sevenfold, then Lamech seventy-sevenfold” (Gen. 4:24). In context, Lamech was boasting about how much he could punish the people who had wronged him. While Lamech was saying he was really tough by punishing 77 fold, Jesus is showing that it’s actually more difficult to forgive others 77 fold.
 Keener, Craig. Matthew (Vol. 1). Downers Grove, IL: InterVarsity Press. 1997. Matthew 18:21-22.
 Carson writes, “The Greek could just barely be taken to mean 70 × 7 (490) instead of 70 + 7 (77); but it follows the LXX of Gen 4:24 exactly, which is a rendering of the Hebrew 77.” Carson, D. A. Matthew. In F. E. Gaebelein (Ed.), The Expositor’s Bible Commentary: Matthew, Mark, Luke (Vol. 8). Grand Rapids, MI: Zondervan Publishing House. 1984. 405.