I saw a program talking about something or other

what caught my attention was a proof of probability experiment;

40 people (or so) were stopped in the street at random and asked the date they were born. The idea being two people with the same birthday being picked as very unlikely. there are 365 possible dates, and only 40 people.

However it's a pair of people and the program said there was something like 800 possible pairs, making two matching dates much more likely (and there was a matching pair)

I get this, What I don't get is the bit where it said the 800 pairs mean theres an 89% chance of a matching pair.

The numbers are probably wrong in the description above, but my point and question still stands, how did they translate 800 possible pairs of dates into 89%?