A T-test is used to compare the means of two different groups. It is used to see if the two difference between the groups are statistically significant. Which means that differences between the two groups did not happen due to sampling error or by chance.
\({(x_1-x_2) \over (\sqrt{s^2*({1 \over n_1}-{1 \over n_2}}))}\)