The accounts in Matthew 26:6-13 and John 12:1-8 are understood to describe the same anointing of Jesus at Bethany. Although there are differences in the details recorded by the two Gospel writers, the similarities are substantial: the setting is Bethany, an expensive ointment is used to anoint Jesus, there is criticism that the ointment could have been sold and the money given to the poor, and Jesus defends the woman and connects her action with his coming burial. One apparent difference is the number of days before Passover when the anointing took place. This difference can be explained by the way Matthew arranges his account. Matthew sometimes groups events together because they are closely related, rather than always putting them in exact time order.
Consider how Matthew 24-26 are laid out. After Jesus left the temple and delivered his great prophecy, recorded in Matthew 24–25, he told his disciples that the Passover would be in two days and that he would then be crucified (Matthew 26:1–2). Matthew next tells us that the chief priests and other religious leaders were already planning how they could have Jesus killed (verses 3–4). At this point, Matthew goes back to an event that had happened earlier—the anointing of Jesus at Bethany (verses 6–13). Matthew places this event here because it is closely related to the events surrounding Jesus’ coming death. Jesus explained that the woman had anointed his body in preparation for his burial. The account is immediately followed by Judas’ decision to betray Jesus. Matthew tells us that Judas went to the chief priests and agreed to betray Jesus (verses 14–16). Thus, Matthew is not necessarily giving us the events in exact day-by-day order. Rather, he brings together events that are closely connected in their meaning: Jesus’ coming death, the leaders’ plot to kill him, the anointing that pointed to his burial, and Judas’ decision to betray him.
John, on the other hand, gives a specific chronological statement: “Then Jesus six days before the Passover came to Bethany” (John 12:1). The supper at which Mary anointed Jesus followed (John 12:2-3), and “the next day” Jesus made his triumphal entry into Jerusalem (John 12:12). Thus, John’s account clearly places the anointing six days before Passover.
Therefore, the statement in Matthew 26:2 that Passover was two days away should not be used to place the Bethany anointing two days before Passover. Matthew is not necessarily saying that the anointing happened two days before Passover. Instead, after telling us that Jesus would die soon, Matthew gives us another event that is closely connected with his coming death. John’s explicit statement in John 12:1 places the anointing six days before Passover, and the following day’s triumphal entry helps establish its position within the final week of Jesus’ earthly ministry.
There are other differences in the details of Matthew 26:6-13 and John 12:1-8, but they do not require us to conclude that there were two separate anointings. Matthew does not name the woman, while John identifies her as Mary. Matthew describes the ointment being poured upon Jesus’ head, while John emphasizes Mary’s anointing of his feet. Matthew refers to the disciples’ objection, whereas John identifies Judas Iscariot as the one who objected. These differences do not mean that the writers are describing two different events. Each writer gives some details that the other does not give.