I have the pattern: 1 + 2 + 3 + 4 + 5 + 6, but I need the formula for it I'm writing some software that takes a group of users and compares each user with every other user in the group. I need to display the amount of comparisons needed for a countdown type feature. 

For example, this group [1,2,3,4,5] would be analysed like this:

1-2, 1-3, 1-4, 1-5
2-3, 2-4, 2-5
3-4, 3-5
4-5


By creating little diagrams like this I've figured out the pattern which is as follows:

Users - Comparisons
2     -   1
3     -   3 (+2)
4     -   6 (+3)
5     -   10 (+4)
6     -   15 (+5)
7     -   21 (+6)
8     -   28 (+7)
9     -   36 (+8)


I need to be able to take any number of users, and calculate how many comparisons it will take to compare every user with every other user.

Can someone please tell me what the formula for this is?
You want to know how many ways there are to choose $2$ users from
a set of $n$ users.

Generally, the number of ways to choose $k$ elements from a set of
order $n$ (that is, all elements in the set are distinct) is denoted
by 
$$
\binom{n}{k}
$$

and is equivalent to 
$$
\frac{n!}{(n-k)!k!}
$$

In the case of $k=2$ the latter equals to 
$$
\frac{n!}{(n-2)!2!}=\frac{n(n-1)}{2}
$$

which is also the sum of $1+2+...+n-1$.

For more information see Binomial coefficient and Arithmetic progression
This is kind of a pseudo code:

Say you have n number of people, and you labeled them.

for i in (1,2,3,...,n), person i need to compare with all the people who has a number larger (strictly), so person i need to compare (n-i) times.

so adding up would be
(n-1) + (n-2) + ... + 3 + 2 + 1...

which would be the sum from 1 to (n-1)