Free statistics calculators designed for data scientists. This Two Sample t test Calculator:

  • Compares the Mean of Two Data Samples
  • Assesses if Difference is Significant
  • Save & Recycle Data Between Projects

Using The Two Sample t test Calculator

For the details about designing your test, read the guidance below. To use the calculator, enter the data from your sample as a string of numbers, separated by commas. Adjust the calculator's settings (significance level, one or two tailed test) to match the test goals. Hit calculate. It will compute the t-statistic, p-value, and evaluate if we should accept or reject the proposed hypothesis.

For easy entry, you can copy and paste your data into the entry box from Excel. You can save your data for use with this calculator and other calculators on this site. Just hit the "save data" button. It will save the data in your browser (not on our server, it remains private). Saved data sets will appear on the list of saved datasets below the data entry panel. To retrieve it, click the "load data" button next to it.

Two Sample t test Calculator

  • Statistics and Histogram Graph
  • Save data sets in your browser
  • Easily Share results via email

Histogram of Samples

Test Results

T-Statistic: -10.19.
p-value: 0.0000.
The difference is significant at p < 0.01
Reject The Null Hypothesis

Significance Level


One or Two Tailed

One Tailed Test
Two Tailed Test


Click To Clear; enter values seperated by commas or new lines. Cut & Paste from Excel also works.

Can be comma separated or one line per data point; you can also cut and paste from Excel.

Saved Data - Click to Restore

Saved in your browser; you can retrieve these and use them in other calculators on this site.

Sharing Results of The Two Sample t-test Calculator

Need to pass an answer to a friend? It's easy to link and share the results of this calculator. Hit calculate - then hit the share button (below). Simply cut and paste the url after hitting calculate - it will retain the values you enter so you can share them via email or social media.

Explore Single Series

Explore (X,Y) Pairs

Test Single Sample

Compare Samples

Confidence Intervals

Probability Distributions

Classical Statistics

Interpreting Two Sample t test Results

This calculator is designed to evaluate statements comparing the mean of two separate samples. We refer to this statement as the null hypothesis, a claim we would accept in the absence of other evidence. This occurs by accepting the alternate hypothesis, which should be a mutually exclusive claim. For example, in quality control, we may test the hypothesis that two finished items came from the same batch of raw materials, by checking a property like weight or color.

One of the parameters in the calculator asks you to select if you want to run a one sided or two-sided test. A one sided test can be used to test if the sample mean is significantly below the expected mean for the population. The example above was a one-sample test. A two sided test looks for any significant deviation (up or down) relative to the null hypothesis. The two sided test is best when screening for differences, the one side test is useful if checking for a particular defect.

Mathematically, the t-statistic is a composite of several basic metrics from the descriptive statistics panel. We compare the sample mean with the expected value and compare the difference with the sample standard deviation, adjusted for sample size. The sample size is also used to calculate the degrees of freedom for the statistical distribution. The t-statistic is converted into a probability value based on Student's t-distribution, which is used to make the final assessment about the null hypothesis.

It is critical to remember some fundamental assumptions about the underlying population and sample process, particularly if you regularly sample. Increasing the sample size will inevitably make any result appear more significant, through increasing the degrees of freedom reflected in the statistic. This can be problematic if subtle factors in the underlying population change in the process (shift changes, time of day, operating conditions). It often makes sense to split your experiment into parts and seek to replicate results across different periods and operators to ensure your determination is accurate.