Compute the means of each sample. For one sample, add up all the data points and divide by the number of data points. This is the mean for that sample. Do this again for the other sample. Call these means "xm" and "ym," respectively.
Calculate the difference between the means. Use the formula "xm -- ym." Call the result "diff."
Determine the standard deviation for each sample. Start with one of the samples. Subtract the mean from each data point of that sample. Square the resulting numbers. Sum the resulting squares. Divide this number by the number of data points for that sample. Take the square root. This is the standard deviation. Repeat this process for the other sample. Call these two numbers "xs" and "ys," respectively.
Compute the pooled standard deviation. Let "xn" equal the number of data points in the first sample and "yn" equal the number of data points in the second sample. The pooled standard variance is given by the formula "[(xn -- 1)xs^2 + (yn -- 1)ys^2]/(xn + yn - 2)." Take the square root of this variance to yield the pooled standard deviation. Call this number "sp."
Calculate the standard error. Add the inverses of the number of data points: "xn^-1 + yn^-1." Take the square root of this number. Multiply the result by "sp" to yield the standard error. Call the standard error "se."
Find the t-statistic. This t-statistic is computed with the formula "diff/se."
Compare the t-statistic to the t-statistics listed in a t-table. To use the t-table, you need to know the degrees of freedom for your test, which is "xn + yn -- 2." Compare your t-statistic to the one listed in the table to yield a p-value. The standard procedure is to conclude that there is a significant difference between the two samples if the p-value is less than 0.05.