Developed by StatCalc.net Team Statistically reviewed by — Senior Statistician & Editor Last updated

One-Sample T-Test Calculator

Use this one-sample t-test calculator to test whether a population mean differs from a hypothesized value when the population standard deviation is unknown. Enter summary data, paste raw data, or upload a dataset to get the t statistic, p-value, critical value, confidence interval, effect sizes, SPSS-style output tables, and an APA-formatted result.

Optional. This name is used in the output tables and APA result.
Enter α as a decimal, such as 0.05.
Select the alternative hypothesis that matches your research question.
Enter the population mean stated in the null hypothesis.

Summary data is selected by default. You can also paste raw values or upload CSV, TXT, XLS, or XLSX data.
Separate values with commas, spaces, semicolons, tabs, or new lines. The calculator finds x̄, s, and n automatically.
Upload a CSV, TXT, XLS, or XLSX file. The selected column name is automatically used as the variable name.
Preview uploaded data
Important: Use a one-sample t test when the population standard deviation is unknown and is estimated using the sample standard deviation, s. If the population standard deviation, σ, is known, use the one-sample z-test calculator instead.
Answer

    One-Sample Statistics

    Variable N Mean Std. Deviation Std. Error Mean

    One-Sample Test

    Variable t df p Mean Difference 95% Confidence Interval of the Difference
    Lower Upper

    One-Sample Effect Sizes

    Effect Size Estimate Magnitude

    APA-Formatted Result

    How to Use the One-Sample T-Test Calculator

    This calculator allows you to perform a one-sample t-test using summary data, raw data, or an uploaded dataset. Therefore, using the calculator depends on whether you have summary data, raw data, or a dataset in a file.

    1. Summary Data

    To perform a one-sample t-test from summary data using the calculator, follow these steps:

    1. Enter the variable name. This is optional, but it helps ensure the APA report generated by the calculator uses the actual variable name.
    2. Enter the significance level.
    3. Select the alternative hypothesis.
    4. Enter the hypothesized mean, μ₀.
    5. Enter the sample mean (x̄), sample standard deviation (s), and sample size (n).
    6. Click Calculate.

    The calculator will instantly return the test statistic, p-value, critical value, Cohen’s d, decision, and conclusion. Additionally, it provides the One-Sample Statistics, One-Sample Test, and One-Sample Effect Sizes tables, followed by an APA-formatted result that you can copy.

    2. Raw Data

    If you have the individual observations rather than the summary statistics, select Raw Data.

    • Enter the variable name, significance level, alternative hypothesis, and hypothesized mean.
    • Type or paste the observations into the raw data box. You should separate the values using commas, spaces, tabs, semicolons, or line breaks.
    • Click Calculate.

    The calculator first finds the sample mean, sample standard deviation, and sample size from the data before performing the t-test.

    This option is useful when you want to copy a column of values directly from Excel, Google Sheets, SPSS, or another data source without calculating the summary statistics yourself.

    3. Upload Dataset

    If your data are already stored in a file, select Upload Dataset. The calculator accepts CSV, TXT, XLS, and XLSX files. After uploading the file, select the numeric variable you want to analyze. The selected column heading is automatically used as the variable name, so you do not need to enter it separately.

    You only need to specify the significance level, alternative hypothesis, and hypothesized mean. The calculator extracts the numeric observations from the selected variable and performs the one-sample t-test.

    Missing and non-numeric values in the selected column are excluded from the analysis.

    Understanding the One-Sample T-Test Output

    After clicking Calculate, the calculator first displays the main answer and then provides the statistical output in separate tables.

    To demonstrate how to read the output, suppose we perform a two-tailed one-sample t-test using the following summary data:

    • Sample mean, x̄ = 72.60
    • Sample standard deviation, s = 8.40
    • Sample size, n = 25
    • Hypothesized mean, μ₀ = 70
    • Significance level, α = 0.05
    • Alternative hypothesis, H₁: μ ≠ 70

    The calculator gives: t(24) = 1.5476, p = 0.1348.

    Since the p-value is greater than 0.05, we fail to reject the null hypothesis. Therefore, there is insufficient evidence to conclude that the population mean differs from 70.

    The sections below explain how to interpret the other outputs generated by the calculator.

    One-Sample Statistics

    The One-Sample Statistics table gives the descriptive statistics for the sample used in the test.

    For our example, the table should show approximately:

    VariableNMeanStd. DeviationStd. Error Mean
    Score2572.6008.4001.680

    The N column shows that the analysis is based on 25 observations. The sample has a mean score of 72.60 and a standard deviation of 8.40. The Std. Error Mean is 1.68. This value estimates how much the sample mean would vary from sample to sample and is calculated using the formula, SE = s/√n.

    These descriptive statistics provide the information needed to calculate the one-sample t statistic.

    One-Sample Test

    The One-Sample Test table contains the main results of the hypothesis test. The test value displayed above the table is the hypothesized population mean, which is 70 in our example.

    The output should look approximately like this:

    VariabletdfpMean DifferenceLowerUpper
    Score1.54824.1352.600-0.8676.067

    The calculated test statistic is t = 1.548. Since the value is positive, the sample mean is above the hypothesized mean.

    The df column gives 24 degrees of freedom. For a one-sample t-test, degrees of freedom are calculated as n − 1. Therefore, df = 25 − 1 = 24.

    The p-value is approximately .135. Since .135 is greater than α = .05, we fail to reject the null hypothesis.

    The Mean Difference is 2.60, which is obtained by subtracting the hypothesized mean from the sample mean. In this case, Mean Difference = 72.60 − 70 = 2.60. This means that the observed sample mean is 2.60 points above the hypothesized value.

    The final two columns give the confidence interval for the mean difference. In this example, the 95% confidence interval is approximately [-0.867, 6.067].

    Since the interval contains zero, a population mean difference of zero remains plausible. This agrees with the p-value result, which was not statistically significant at the 0.05 level.

    Want to quickly find a p-value from t statistic and degrees of freedom? Use the p-value from t calculator.

    Critical T Value

    The calculator also reports the critical t value in the answer box. For the example above, the test is two-tailed with α = 0.05 and df = 24. The critical values are approximately ±2.0639. The calculated t statistic is t = 1.5476.

    Since 1.5476 falls between −2.0639 and 2.0639, we fail to reject H₀.

    As you can see, both the critical-value approach and p-value approach should lead to the same statistical decision.

    For a right-tailed test, the calculator gives the positive critical value, and the rejection region lies to its right. However, for a left-tailed test, it gives the negative critical value, and the rejection region lies to its left.

    If you only need the critical value rather than the complete hypothesis test, use our T Critical Value Calculator.

    One-Sample Effect Sizes

    The One-Sample Effect Sizes table reports Cohen’s d and Hedges’ g. These statistics show the size of the difference between the sample mean and the hypothesized mean rather than simply telling us whether the difference is statistically significant.

    For our example, the calculator reports the effect sizes as shown below.

    Effect SizeEstimateMagnitude
    Cohen’s d0.310Small
    Hedges’ g0.300Small

    Cohen’s d of approximately 0.31 means that the sample mean is about 0.31 standard deviations above the hypothesized mean.

    As a general guide, Cohen’s d values around 0.20, 0.50, and 0.80 are commonly described as small, medium, and large effects, respectively. However, you should not treat these values as strict cutoffs because the practical importance of an effect depends on the context of the study.

    Hedges’ g measures the same standardized difference but applies a correction for the small-sample bias that can occur with Cohen’s d. This is why Hedges’ g is slightly smaller than Cohen’s d in our example.

    How to Report a One-Sample T-Test in APA Style

    When reporting a one-sample t-test, start by telling the reader what test was performed and what you wanted to determine. You can then report the descriptive statistics, t-test result, confidence interval, effect size, and conclusion.

    Using our example, follow these steps to report the results in APA:

    1. State the test. In this case, you would say “A one-sample t-test was performed to determine whether the population mean score differed from 70.”
    2. Report the descriptive statistics. ” The sample had a mean score of 72.60 (SD = 8.40, n = 25).”
    3. Report the t-test result. “The mean score was not significantly different from 70, t(24) = 1.55, p = .135.”
    4. Report the confidence interval and effect size. “The 95% confidence interval for the mean difference ranged from −0.87 to 6.07, and the effect size was small, Cohen’s d = 0.31.”

    Therefore, the complete APA report becomes:

    A one-sample t-test was performed to determine whether the population mean score differed from 70. The sample had a mean score of 72.60 (SD = 8.40, n = 25). The mean score was not significantly different from 70, t(24) = 1.55, p = .135, 95% CI for the mean difference [−0.87, 6.07], Cohen’s d = 0.31. Therefore, there was insufficient evidence at the 0.05 significance level to conclude that the population mean differed from 70.

    Struggling with reporting one-sample t-test results in APA style? Our one-sample t-test calculator automatically generates the report for you based on the data and the alternative hypothesis. You can copy the result and revise the wording so that it matches the variable and research question in your study.

    Why Use This One-Sample T-Test Calculator?

    A basic one-sample t-test calculator may only give you the t statistic and p-value. This calculator provides the additional information commonly needed when analyzing and reporting a one-sample t-test.

    You can perform the test from summary statistics, raw observations, or an uploaded dataset. The calculator also supports two-tailed, right-tailed, and left-tailed hypotheses and returns the critical value, confidence interval, Cohen’s d, and Hedges’ g.

    The calculator then organizes the results into One-Sample Statistics, One-Sample Test, and One-Sample Effect Sizes tables similar to the output used in statistical software. You also get an APA-formatted result that can be copied and adapted for your report.

    This means you can move from your data to the statistical results and reporting without having to use separate tools for the t-test, critical value, effect size, and APA statement.

    When Should You Use a One-Sample T-Test?

    Use a one-sample t-test when you want to compare the mean of one population with a known, expected, or hypothesized value and the population standard deviation is unknown.

    For example, you could use the test to determine whether the average lifetime of a battery exceeds 100 hours, whether the mean examination score differs from a benchmark, or whether the mean amount placed in a package differs from the value stated on the label.

    The test is suitable when you have one quantitative variable and independent observations. However, if the population standard deviation, σ, is known, use the One-Sample Z-Test Calculator instead.

    Want to learn more about the one-sample t-test, its formulas, assumptions, and how to perform the test manually? See our One-Sample T-Test guide.

    Frequently Asked Questions

    What is a one-sample t-test calculator?

    A one-sample t-test calculator is an online tool used to test whether the mean of one population differs from a specified or hypothesized value when the population standard deviation is unknown. This calculator allows you to perform the test using summary statistics, raw data, or an uploaded dataset. It calculates the t statistic, degrees of freedom, p-value, critical t value, confidence interval, Cohen’s d, and Hedges’ g, and also provides SPSS-style output tables and an APA-formatted result.

    Can I perform a one-sample t-test from summary data?

    Yes. If you already know the sample mean, sample standard deviation, and sample size, select Summary Data and enter these values directly. You do not need the original observations to calculate the t statistic.

    Can I use raw data?

    Yes. Select Raw Data and enter or paste the individual observations. The calculator will calculate the sample mean, standard deviation, sample size, and standard error before performing the test.

    Can I upload an Excel or CSV dataset?

    Yes. You can upload CSV, TXT, XLS, or XLSX files. After uploading the file, select the numeric variable you want to analyze, and the calculator will use the selected column in the one-sample t-test.

    Does the calculator calculate effect size?

    Yes. The calculator reports both Cohen’s d and Hedges’ g. Cohen’s d measures the standardized difference between the sample mean and hypothesized mean, while Hedges’ g applies a correction for small-sample bias.

    Does the calculator generate an APA-formatted result?

    Yes. The calculator generates an APA-formatted result that starts by stating the test that was performed and then reports the descriptive statistics, t statistic, degrees of freedom, p-value, confidence interval, effect size, and conclusion.

    Cite

    Choose APA, MLA, Chicago, or Harvard. Citations credit StatCalc.net as the corporate author.

    StatCalc.net. (2026, October 22). One-Sample T-test Calculator. Retrieved October 27, 2026, from https://statcalc.net/one-sample-t-test-calculator/

    About This Calculator

    This calculator was developed by the StatCalc.net Team and statistically reviewed by , Senior Statistician & Editor.

    Formulas, calculation logic, worked examples, and explanatory content are reviewed for statistical accuracy and clarity.

    Add to Preferred Sources