Inspect how the null model and direction of a test determine its p-value.
Quick Answer
A small p-value means the observed result would be relatively unlikely if the null hypothesis and statistical model were true. A large p-value means the observed result is not unusual enough to reject the null hypothesis under the selected test.
Free Statistics Calculator
p-value Calculator
Use this p-value Calculator to find p-values from z-scores, t-scores, chi-square statistics, and F-statistics. Select left-tailed, right-tailed, or two-tailed tests, enter your test statistic, degrees of freedom where needed, and compare the result with your significance level.
Calculate a p-value
Choose the distribution that matches your hypothesis test. For z-tests, degrees of freedom are not needed. For t, chi-square, and F tests, enter the required degrees of freedom.
Statistical note: a p-value is not the probability that the null hypothesis is true. It is the probability of observing a result at least as extreme as the test statistic, assuming the null hypothesis and model assumptions are true.
What Is a p-value Calculator?
A p-value Calculator is a statistics tool that calculates the probability of obtaining a test statistic at least as extreme as the observed value, assuming the null hypothesis is true. In hypothesis testing, the p-value helps researchers, students, analysts, and teachers decide whether the observed evidence is unusual enough to reject a null hypothesis at a chosen significance level.
The p-value is widely used in z-tests, t-tests, chi-square tests, F-tests, regression analysis, ANOVA, goodness-of-fit tests, independence tests, and many other inferential statistics procedures. The exact calculation depends on the distribution of the test statistic and the direction of the alternative hypothesis. That is why this calculator lets you choose the normal distribution, Student’s t distribution, chi-square distribution, or F distribution.
A small p-value means the observed result would be relatively unlikely if the null hypothesis and statistical model were true. A large p-value means the observed result is not unusual enough to reject the null hypothesis under the selected test. However, the p-value is often misunderstood. It is not the probability that the null hypothesis is true. It is not the probability that the alternative hypothesis is true. It is not a direct measure of practical importance. It must be interpreted with context, sample size, assumptions, and effect size.
This calculator is designed for education and clear mathematical learning. It shows the result, decision at the selected significance level, and the formulas behind common p-value calculations. It is especially useful for AP Statistics, IB Math AI/AA, college statistics, research methods, business analytics, psychology, biology, economics, and data science learning.
How to Use the p-value Calculator
First, choose the distribution. Select Normal z-score when your test statistic follows the standard normal distribution. Select Student’s t-score when your test uses a t-statistic and requires degrees of freedom. Select Chi-square statistic for chi-square tests, such as goodness-of-fit or independence tests. Select F-statistic for F-tests and ANOVA-style comparisons, where two degrees of freedom values are required.
Second, choose the test tail. A right-tailed test looks for unusually large values. A left-tailed test looks for unusually small values. A two-tailed test looks for unusually large magnitude in either direction. For z and t tests, two-tailed p-values usually double the smaller tail probability. For chi-square and F tests, right-tailed tests are most common, although the calculator also provides left-tail and two-tail-style calculations for learning.
Third, enter the test statistic. The test statistic should come from your hypothesis test calculation. For a z-test, enter the z-score. For a t-test, enter the t-score and degrees of freedom. For a chi-square test, enter the chi-square statistic and degrees of freedom. For an F-test, enter the F-statistic, numerator degrees of freedom, and denominator degrees of freedom.
Finally, enter the significance level \(\alpha\), usually 0.05, 0.01, or 0.10. Click calculate. The result panel will show the p-value and a decision statement. If \(p\le\alpha\), the calculator says to reject the null hypothesis. If \(p>\alpha\), it says there is not enough evidence to reject the null hypothesis.
p-value Calculator Formulas
The exact p-value formula depends on the sampling distribution. In the formulas below, \(T\) represents a test statistic, \(t\) represents the observed value, and \(F(x)\) represents the cumulative distribution function for the selected distribution.
Right-tailed p-value
\[p=P(T\ge t)=1-F(t)\]
Left-tailed p-value
\[p=P(T\le t)=F(t)\]
Two-tailed z or t p-value
\[p=2\min\{F(t),1-F(t)\}\]
Decision rule
\[\text{Reject }H_0\text{ if }p\le\alpha\]
For the normal distribution, the calculator uses a numerical approximation to the standard normal cumulative distribution function. For t, chi-square, and F distributions, it uses numerical integration and beta/gamma-function approximations. These methods are appropriate for educational calculator use and produce close practical results for common classroom statistics problems.
Left-tailed, Right-tailed, and Two-tailed Tests
The tail of a test is determined by the alternative hypothesis. A right-tailed test is used when the alternative hypothesis claims the parameter is greater than the null value. A left-tailed test is used when the alternative hypothesis claims the parameter is less than the null value. A two-tailed test is used when the alternative hypothesis claims the parameter is different from the null value without specifying only greater or only less.
For example, if a researcher tests whether a mean is greater than 50, the p-value is the probability of getting a test statistic as large or larger than the observed statistic. If the researcher tests whether the mean is less than 50, the p-value is the probability of getting a statistic as small or smaller. If the researcher tests whether the mean is simply different from 50, evidence in both directions matters, so a two-tailed p-value is used.
Choosing the tail after seeing the data is poor statistical practice. The alternative hypothesis should be selected before the test is performed. The tail direction changes the p-value, so it must match the research question.
Which Distribution Should You Choose?
Choose the distribution based on the test you are performing. A z-test uses the standard normal distribution and is common when population standard deviation is known or when large-sample approximations apply. A t-test uses Student’s t distribution and is common when estimating a mean with sample standard deviation and limited sample size. The t distribution has heavier tails than the normal distribution, especially with small degrees of freedom.
A chi-square test uses the chi-square distribution. It is common in goodness-of-fit tests, tests of independence, and variance-related tests. Chi-square statistics are usually nonnegative, and right-tailed p-values are common because larger chi-square values indicate greater discrepancy from the expected pattern.
An F-test uses the F distribution and requires two degrees of freedom values. F statistics are also nonnegative. The F distribution is used in ANOVA, variance ratio tests, and model comparison settings. In many common cases, the right-tail probability is used because large F values indicate stronger evidence against the null hypothesis.
Distribution
Common Test
Required Inputs
Normal z
z-test, large-sample test
z-score and tail type
Student’s t
one-sample or two-sample t-test
t-score, degrees of freedom, tail type
Chi-square
goodness-of-fit, independence, variance
chi-square statistic, degrees of freedom
F
ANOVA, variance ratio, model comparison
F-statistic, numerator df, denominator df
How to Interpret a p-value
A p-value should be interpreted as evidence against the null hypothesis under the assumptions of the test. If the p-value is small, the data are relatively unusual under the null model. If the p-value is large, the data are not unusual enough to reject the null hypothesis. The cutoff is the significance level \(\alpha\), which is chosen before the test.
For example, if \(p=0.032\) and \(\alpha=0.05\), then \(p\le\alpha\), so the result is statistically significant at the 5% level. If \(p=0.12\) and \(\alpha=0.05\), then \(p>\alpha\), so there is not enough statistical evidence to reject the null hypothesis at the 5% level.
Statistical significance does not automatically mean practical importance. A very large sample can produce a tiny p-value for a small effect that may not matter in the real world. Conversely, a small study may fail to reject the null even when an effect could be meaningful. Always pair p-values with effect sizes, confidence intervals, study design, data quality, and subject-matter context.
p-value Calculation Examples
Suppose a z-test gives \(z=1.96\) and the hypothesis is two-tailed. The p-value is the probability of getting a z-score at least as extreme as 1.96 in either direction.
Example two-tailed z p-value
\[p=2(1-\Phi(1.96))\approx0.050\]
Now suppose a right-tailed t-test gives \(t=2.20\) with 15 degrees of freedom. The p-value is the area to the right of 2.20 under the t distribution with 15 degrees of freedom.
Example right-tailed t p-value
\[p=P(T_{15}\ge2.20)\]
For a chi-square test, suppose \(\chi^2=12.5\) with 5 degrees of freedom. A right-tailed p-value is used in many goodness-of-fit settings:
Example chi-square p-value
\[p=P(\chi^2_5\ge12.5)\]
Common p-value Mistakes
One common mistake is saying that the p-value is the probability that the null hypothesis is true. It is not. The p-value assumes the null hypothesis is true and then asks how unusual the observed data would be under that assumption.
Another mistake is treating \(p>0.05\) as proof that the null hypothesis is true. Failing to reject the null does not prove the null. It only means the test did not provide enough evidence against it at the selected significance level. Low power, small sample size, noisy data, and poor design can all produce nonsignificant results.
A third mistake is ignoring assumptions. A p-value is only as meaningful as the model behind it. Normality, independence, random sampling, expected counts, equal variance assumptions, and correct test selection matter. Always check whether the selected test is appropriate for the data.
p-value Calculator FAQs
What does a p-value calculator do?
It calculates the probability of observing a test statistic at least as extreme as the entered value, assuming the null hypothesis and test assumptions are true.
What is a good p-value?
A “good” p-value depends on the significance level and context. Commonly, \(p\le0.05\) is considered statistically significant, but this cutoff should not be used blindly.
What does p-value less than 0.05 mean?
It means the result is statistically significant at the 5% level, so the null hypothesis is rejected under the chosen test and assumptions.
Is a p-value the probability that the null hypothesis is true?
No. A p-value is calculated assuming the null hypothesis is true. It is not the probability that the null hypothesis itself is true.
When should I use a two-tailed p-value?
Use a two-tailed p-value when the alternative hypothesis is that the parameter is different from the null value in either direction.
Why do t-tests need degrees of freedom?
The shape of the t distribution depends on degrees of freedom. Smaller degrees of freedom produce heavier tails, which affects the p-value.
Important Note
This p-value Calculator is for educational and general statistics learning purposes only. It does not replace a full statistical analysis, research design review, professional data analysis, or subject-matter interpretation. Always check assumptions, sample quality, effect size, confidence intervals, and context before making conclusions.
Advertisement
Read the shaded tail before comparing a threshold
Suppose a standardized statistic equals 1.96 and the reference distribution under the null hypothesis is standard normal. Approximately 0.025 of its area lies above 1.96. A prespecified upper-tail test therefore has a p-value of about 0.025. In a two-sided test that treats equally extreme deviations in either direction alike, the matching lower tail adds another 0.025. Both answers come from the same observed statistic. Choosing the direction after seeing the result changes the question and invalidates the original comparison. Neither number gives the probability that the null hypothesis is true.
Moving Toward Normality
Let’s take a look at a histogram for the dataset in our section opener:
This is interesting, but the data seem pretty sparse. There were no trials where you saw between 43 and 47 heads, for example. Those results don’t seem impossible; we just didn’t flip enough times to give them a chance to pop up. So, let’s do it again, but this time we'll perform 100 coin flips 100 times. Rather than review all 100 results, which could be overwhelming, let's instead visualize the resulting histogram.
From the histogram, we see that most of the trials resulted in between, say, 44 and 56 heads. There were some more unusual results: one trial resulted in 70 heads, which seems really unlikely (though still possible!). But we’re starting to maybe get a sense of the distribution. More data would help, though. Let’s simulate another 900 trials and add them to the histogram!
We can still see that 70 is a really unusual observation, though we came close in another trial (one that had 68 heads). Now, the distribution is coming more into focus: It looks quite symmetric and bell-shaped. Let’s just go ahead and take this thought experiment to an extreme conclusion: 10,000 trials.
The distribution is pretty clear now. Distributions that are symmetric and bell-shaped like this pop up in all sorts of natural phenomena, such as the heights of people in a population, the circumferences of eggs of a particular bird species, and the numbers of leaves on mature trees of a particular species. All of these have bell-shaped distributions. Additionally, the results of many types of repeated experiments generally follow this same pattern, as we saw with the coin-flipping example; this fact is the basis for much of the work done by statisticians. It’s a fact that’s important enough to have its own name: the Central Limit Theorem.
The Normal Distribution
In the coin flipping example above, the distribution of the number of heads for 10,000 trials was close to perfectly symmetric and bell-shaped:
Because distributions with this shape appear so often, we have a special name for them: normal distributions. Normal distributions can be completely described using two numbers we’ve seen before: the mean of the data and the standard deviation of the data. You may remember that we described the mean as a measure of centrality; for a normal distribution, the mean tells us exactly where the center of the distribution falls. The peak of the distribution happens at the mean (and, because the distribution is symmetric, it’s also the median). The standard deviation is a measure of dispersion; for a normal distribution, it tells us how spread out the histogram looks. To illustrate these points, let’s look at some examples.
Identifying the Mean of a Normal Distribution
This graph shows three normal distributions. What are their means?
Solution
Step 1: Take a look at the three curves on the graph. Since the mean of a normal distribution occurs at the peak, we should look for the highest point on each distribution. Let’s draw a line from each curve's peak down to the axis, so we can see where these peaks occur:
Step 2: The peak of the red (leftmost) distribution occurs over the number 1 on the horizontal axis. Thus, the mean of the red distribution is 1. Similarly, the mean of the blue (middle) distribution is 2, and the mean of the yellow (rightmost) distribution is 3.
Identifying the Standard Deviation of a Normal Distribution
This graph shows three distributions, all with mean 2. What are their standard deviations?
Solution
Step 1: Identifying the standard deviation from a graph can be a little bit tricky. Let’s focus in on the yellow (lowest peaked) curve:
Step 2: Notice that the graph curves downward in the middle, and curves upwards on the ends. Highlighted in red is the part that curves downward and in green, the part that curves upward:
Step 3: The places where the graph changes from curving up to curving down (or vice versa) are called inflection points. Let’s identify where those occur by dropping a line straight down from each:
Step 4: We can estimate that the inflection points occur at and ; the mean is at (as shown by the middle dotted line). The difference between the mean and the location of either inflection point is the standard deviation; since , we conclude that the standard deviation of the green distribution is 3.
Step 5: Now, looking at the other two graphs, let's first identify the inflection points:
Step 6: The red (tallest peaked) distribution has inflection points at 1 and 3, and the mean is 2. Thus, the standard deviation of the red distribution is . The blue (lower peaked) distribution has inflection points at 0 and 4, and its mean is also 2. So, the standard deviation of the blue distribution is 2.
Let’s put it all together to identify a completely unknown normal distribution.
Identifying the Mean and Standard Deviation of a Normal Distribution
Using the graph, identify the mean and standard deviation of the normal distribution.
Solution
Step 1: Let’s start by putting dots on the graph at the peak and at the inflection points, then drop lines from those points straight down to the axis:
Step 2: From the red (middle) line, we can see that the mean of this distribution is 55. The blue (outermost) lines are each 3 units away from the mean (at 52 and 58), so the standard deviation is 3.
Properties of Normal Distributions: The 68-95-99.7 Rule
The most important property of normal distributions is tied to its standard deviation. If a dataset is perfectly normally distributed, then 68% of the data values will fall within one standard deviation of the mean. For example, suppose we have a set of data that follows the normal distribution with mean 400 and standard deviation 100. This means 68% of the data would fall between the values of 300 (one standard deviation below the mean: ) and 500 (one standard deviation above the mean: ). Looking at the histogram below, the shaded area represents 68% of the total area under the graph and above the axis:
Since 68% of the area is in the shaded region, this means that of the area is found in the unshaded regions. We know that the distribution is symmetric, so that 32% must be divided evenly into the two unshaded tails: 16% in each.
Of course, datasets in the real world are never perfect; when dealing with actual data that seem to follow a symmetric, bell-shaped distribution, we’ll give ourselves a little bit of wiggle room and say that approximately 68% of the data fall within one standard deviation of the mean.
The rule for one standard deviation can be extended to two standard deviations. Approximately 95% of a normally distributed dataset will fall within 2 standard deviations of the mean. If the mean is 400 and the standard deviation is 100, that means 95% calculation describes the way we compute standardized scores. (two standard deviations below the mean: ) and 600 (two standard deviations above the mean: ). We can visualize this in the following histogram:
As before, since 95% of the data are in the shaded area, that leaves 5% of the data to go into the unshaded tails. Since the histogram is symmetric, half of the 5% (that’s 2.5%) is in each.
We can even take this one step further: 99.7% of normally distributed data fall within 3 standard deviations of the mean. In this example, we’d see 99.7% of the data between 100 (calculated as ) and 700 (calculated as ). We can see this in the histogram below, although you may need to squint to find the unshaded bits in the tails!
This observation is formally known as the 68-95-99.7 Rule.
Using the 68-95-99.7 Rule to Find Percentages
If data are normally distributed with mean 8 and standard deviation 2, what percent of the data falls between 4 and 12?
If data are normally distributed with mean 25 and standard deviation 5, what percent of the data falls between 20 and 30?
If data are normally distributed with mean 200 and standard deviation 15, what percent of the data falls between 155 and 245?
Solution
Let’s look at a table that sets out the data values that are even multiples of the standard deviation (SD) above and below the mean:
Mean
2
4
6
8
10
12
14
Since 4 and 12 represent two standard deviations above and below the mean, we conclude that 95% of the data will fall between them.
Let’s build another table:
Mean
10
15
20
25
30
35
40
We can see that 20 and 30 represent one standard deviation above and below the mean, so 68% of the data fall in that range.
Let’s make one more table:
Mean
155
170
185
200
215
230
245
Since 155 and 245 are three standard deviations above and below the mean, we know that 99.7% of the data will fall between them.
Using the 68-95-99.7 Rule to Find Data Values
If data are distributed normally with mean 100 and standard deviation 20, between what two values will 68% of the data fall?
If data are distributed normally with mean 0 and standard deviation 15, between what two values will 95% of the data fall?
If data are distributed normally with mean 14 and standard deviation 2, between what two values will 99.7% of the data fall?
Solution
The 68-95-99.7 Rule tells us that 68% of the data will fall within one standard deviation of the mean. So, to find the values we seek, we’ll add and subtract one standard deviation from the mean: and . Thus, we know that 68% of the data fall between 80 and 120.
Using the 68-95-99.7 Rule again, we know that 95% of the data will fall within 2 standard deviations of the mean. Let’s add and subtract two standard deviations from that mean: and . So, 95% of the data will fall between -30 and 30.
Once again, the 68-95-99.7 Rule tells us that 99.7% of the data will fall within three standard deviations of the mean. So, let’s add and subtract three standard deviations from the mean: and . Thus, we conclude that 99.7% of the data will fall between 8 and 20.
There are more problems we can solve using the 68-95-99.7 Rule. but first we must understand what the rule implies. Remember, the rule says that 68% of the data falls within one standard deviation of the mean. Thus, with normally distributed data with mean 100 and standard deviation 10, we have this distribution:
Since we know that 68% of the data lie within one standard deviation of the mean, the implication is that 32% of the data must fall beyond one standard deviation away from the mean. Since the histogram is symmetric, we can conclude that half of the 32% (or 16%) is more than one standard deviation above the mean and the other half is more than one standard deviation below the mean:
Further, we know that the middle 68% can be split in half at the peak of the histogram, leaving 34% on either side:
So, just the “68” part of the 68-95-99.7 Rule gives us four other proportions in addition to the 68% in the rule. Similarly, the “95” and “99.7” parts each give us four more proportions:
We can put all these together to find even more complicated proportions. For example, since the proportion between 100 and 120 is 47.5% and the proportion between 100 and 110 is 34%, we can subtract to find that the proportion between 110 and 120 is :
Finding Other Proportions Using the 68-95-99.7 Rule
Assume that we have data that are normally distributed with mean 80 and standard deviation 3.
What proportion of the data will be greater than 86?
What proportion of the data will be between 74 and 77?
What proportion of the data will be between 74 and 83?
Solution
Before we can answer these questions, we must mark off sections that are multiples of the standard deviation away from the mean:
To figure out what proportion of the data will be greater than 86, let's start by shading in the area of data that are above 86 in our figure, or the data more than two standard deviations above the mean.
We saw in diagram that this proportion is 2.5%.
To figure out what proportion of the data will be between 74 and 77, let's start by shading in that area of data. These are data that are more than one but less than two standard deviations below the mean.
From diagram, we know that the proportion of data less than two standard deviations below the mean is 47.5%. And, from YOUR TURN 8.33, we know that 34% of the data is less than one standard deviation below the mean:
Subtracting, we see that the proportion of data between 74 and 77 is 13.5%.
To figure out what proportion of the data will be between 74 and 83, let's start by shading in that area of data in our figure.
Next, we'll break this region into two pieces at the mean:
From diagram, we know the blue (leftmost) region represents 47.5% of the data. And, using YOUR TURN 8.33, we get that the red (rightmost) region covers 34% of the data. Adding those together, the proportion we want is 81.5%.