Taelor, if each guest clinks glass with everyone else, then each person clinks glasses with 39 other people, so you may think the answer may be 40 x 39 = 1560, but not quite.
Guest 1 will clink with 39 other people. Guest 2 has already clinked glasses with Guest 1 and has 38 other people. Guest 3 would have already clinked with Guests 1 and 2 and have 37 more clinks. We keep going until Guest 40 has no one left to clink with.
So, we'd have 39 + 38 + ... + 1 (Guest 39, who still clinks glasses with Guest 40)
Now, instead of taking your calculator and adding it in order, let's remember that 39 + 1 = 40, 38 + 2 = 40, etc.
So, we have 20 pairs that equal 40. 40 x 20 = 800 clinks!

Arthur D.
11/02/14