Skip to content
CalculatorZilo Logo
  • Home
  • CalculatorsExpand
    • Finance
    • Math
    • Health & Fitness
    • Education
    • Science
    • Real Estate
    • Chemistry
  • About Us
  • Contact Us
CalculatorZilo Logo
Home /  P Value T Test Calculator
Statistics Calculators

 P Value T Test Calculator

Published onApril 30, 2026 Updated onOctober 9, 2026 7:37 am

This one-sample t-test calculator runs a complete hypothesis test from your sample data. Enter the sample mean, standard deviation, sample size, and the hypothesized population mean to get the t statistic, degrees of freedom, p-value, confidence interval, and a plain-language conclusion.

On this page
  • One-Sample T-Test Calculator
  • How the one-sample t-test works
  • Worked example
  • One-tailed or two-tailed?
  • Assumptions behind the test
  • What the p-value does not mean
  • Frequently asked questions
  • Two-sample (Welch) and paired t-tests
  • Cohen's d effect size

One-Sample T-Test Calculator

Hypotheses
t statistic
Degrees of freedom
p-value
Critical t value
Confidence interval for the mean
Cohen’s d (effect size)

How the one-sample t-test works

The test statistic measures how far the sample mean is from the hypothesized mean, in units of standard error:

t = (x̄ − μ₀) / (s / √n), with df = n − 1 degrees of freedom. The p-value is the probability of seeing a t statistic at least this extreme if the null hypothesis were true, computed from the t distribution. For a two-tailed test, p = 2 × P(T > |t|); for one-tailed tests, p is the matching one-sided tail area.

The calculator also reports the critical t value and a confidence interval, x̄ ± t* × (s / √n), which always agrees with the test decision: the null value falls outside the interval exactly when the test rejects.

Worked example

A researcher weighs 40 turtles: sample mean 300 pounds, sample SD 18.5, and wants to test whether the species mean differs from 310 pounds (two-tailed, α = 0.05):

  • Standard error: 18.5 / √40 = 2.9253
  • t = (300 − 310) / 2.9253 = −3.4187; df = 39
  • p-value = 0.001487, well below 0.05
  • Critical t (95%) = 2.0227; 95% CI = [294.08, 305.92], which excludes 310
  • Conclusion: reject H₀. The data provide statistically significant evidence that the mean differs from 310 pounds.

These are the exact values the calculator above produces for these inputs.

One-tailed or two-tailed?

Use a two-tailed test when you care about a difference in either direction. Use a one-tailed test only when the research question is directional from the start, for example testing whether a new drug lowers blood pressure. Switching to one-tailed after seeing the data is a common misuse that halves the p-value without justification.

Assumptions behind the test

The one-sample t-test assumes the observations are a random sample and that the population is approximately normal. With n of 30 or more, the central limit theorem makes the test robust to non-normality. If the data are heavily skewed with a small sample, a nonparametric alternative such as the Wilcoxon signed-rank test is safer.

What the p-value does not mean

A p-value is not the probability that the null hypothesis is true, and a non-significant result does not prove the null is true. It only says the data are compatible with it. For practical importance, also look at the confidence interval and the effect size, Cohen's d = (x̄ − μ₀) / s, which is −0.54 in the turtle example, a medium-sized effect.

Frequently asked questions

What is a p-value in a t-test?

It is the probability of observing a t statistic at least as extreme as yours if the null hypothesis were true. A small p-value means your data would be surprising under the null, which is evidence against it.

When should I use a one-sample t-test instead of a z-test?

Use the t-test when the population standard deviation is unknown and estimated from the sample, which is the usual case. The z-test applies when the population standard deviation is known in advance or the sample is very large, where the two give nearly identical results.

When is a one-tailed test appropriate?

Only when your research question is directional before you see the data, such as testing whether a treatment increases a score. If you would have been interested in a difference in either direction, use two-tailed.

What significance level should I use?

The conventional default is 0.05, but 0.01 is common in fields that need stronger evidence, and 0.10 appears in exploratory work. Choose the level before running the test, not after seeing the p-value.

Why does the calculator show a confidence interval?

The interval shows the range of population means compatible with your data. It always agrees with the test: the hypothesized mean falls outside the 95% interval exactly when the two-tailed test rejects at the 0.05 level.

Can I paste raw data into this calculator?

No. This calculator works from summary statistics: the sample mean, standard deviation, and size. Compute those first in a spreadsheet or statistics package if you have raw observations.

What does it mean to fail to reject the null hypothesis?

It means the data do not provide statistically significant evidence against the null at your chosen level. It does not prove the null is true; the true mean could still differ by an amount too small for this sample to detect.

Two-sample (Welch) and paired t-tests

The test-type selector adds the two tests researchers ask for most. Two-sample (Welch): compare two independent groups without assuming equal variances, using Welch's t and the Welch-Satterthwaite degrees of freedom. Enter summary statistics (or raw data) for both samples; the output is the t statistic, fractional df, p-value, and a confidence interval for the mean difference. Example: sample 1 (mean 100, sd 15, n 25) versus sample 2 (mean 92, sd 12, n 30) gives t = 2.1535, df = 45.67, p = 0.0366: significant at 0.05.

Paired: for before-and-after measurements on the same subjects. Paste both lists (they must be the same length); the calculator works with the paired differences. Example: before [85, 90, 78, 92, 88] and after [80, 88, 75, 90, 82] gives differences with mean 3.6, t = 4.4313, df = 4, p = 0.0114.

Raw data input: every mode accepts raw values (commas, spaces, or one per line) instead of summary statistics; the mean, standard deviation, and n are computed for you. In one-sample mode, pasting raw data overrides the summary fields.

Cohen's d effect size

Every test now reports Cohen's d: one-sample d = (mean - hypothesized mean) / sd; two-sample d = mean difference / pooled sd; paired d = mean difference / sd of differences. It is labeled negligible (below 0.2), small (0.2), medium (0.5), or large (0.8). A significant p-value tells you an effect exists; d tells you whether it matters.

Related calculators

Statistics CalculatorsSample Mean Calculator: Free Stats Tool OnlineThe Sample Mean Calculator helps you find the average of any data set in seconds. Whether you are a student...Statistics CalculatorsProbability Mean Calculator Probability and statistics play a vital role in mathematics, finance, economics, engineering, data science,...Statistics CalculatorsBaseball ERA CalculatorA Baseball ERA Calculator is a sports statistics tool used to calculate a pitcher’s Earned Run Average,...Statistics CalculatorsStandard Deviation Probability CalculatorGiven a normal distribution described by its mean (μ) and standard deviation (σ), this calculator finds the...Statistics CalculatorsLinear Regression CalculatorLinear regression finds the straight line that best fits your data: the line that minimizes the squared...Statistics CalculatorsStatistics CalculatorPaste a dataset and this calculator returns the full descriptive picture: how many values you have, their...

CalculatorZilo

Free calculators for everything. Accurate, fast, no signup.

Categories

Finance Math Health & Fitness Education Science Real Estate Chemistry Browse all calculators

Legal

Privacy Policy Terms and Conditions Disclaimer Cookie Policy DMCA Policy

Company

About Us Contact Us FAQ Accessibility Statement

We use cookies to analyze traffic and to serve ads that keep our calculators free. You can accept or decline cookies below. Learn more

© 2026 CalculatorZilo. All rights reserved.

  • Home
  • Calculators
    • Finance
    • Math
    • Health & Fitness
    • Education
    • Science
    • Real Estate
    • Chemistry
  • About Us
  • Contact Us
Search