It seems that there were probably two incidents, one described in Matthew, Mark and John, and one described in Luke.
The accounts in Matthew, Mark, and John all seem to be one account:
- All take place in Bethany
- Mark and John both mention that it is pure nard
- Mark and John both mention the figure of 300 denarii
- In all three, some of the disciples are indignant that the perfume wasn't sold for the poor
- Jesus mentions that this is to prepare him for his burial
- All take place around the time of the triumphal entry
Luke's account reads a bit differently:
- It takes place at the home of a Pharisee, probably in Galilee
- Chronologically, it seems to occur much earlier in Jesus' ministry than the account in the other three
- The indignation raised about the event is by the Pharisee that the woman is a great sinner
- Jesus uses the opportunity to tell a parable
There are differences between John and the Matthew and Mark accounts, but these aren't nearly as difficult to reconcile. However, the position, purpose, and details of the Luke account are disparate enough that many scholars consider that to be a separate story. In fact, some think that John's mention of Mary wiping Jesus' feet with her hair is a mistake and that John confused the two accounts. However, Carson points out that in both Matthew and Mark, Jesus says that the perfume was poured "on my body" and suggests that John has different theological reasons for mentioning the feet than Matthew and Mark have for mentioning the head.