P-Value Calculator: From z, t, Chi-Square, F or r

A p-value of 0.03 does not mean there is a 3% chance your result is a fluke, and it does not mean the null hypothesis has a 3% chance of being true. It means something narrower: if the null hypothesis were true, a result at least as extreme as yours would turn up about 3% of the time. That one sentence is behind every p-value, whichever test produced it.

This calculator turns a z, t, chi-square (χ²), F or correlation (r) statistic into a p-value, for a two-tailed, right-tailed or left-tailed test. It also gives the critical value at your significance level, both tail areas, and a curve with the p-value shaded. It is set to the worked example below.

P-Value Calculator

Use z when the population standard deviation is known, or for a test of proportions.

p-value –
Curve
Step by step

    One Test From Raw Data to a p-Value

    A delivery company advertises an average delivery time of 30 minutes. You time 15 deliveries and get a mean of 33.2 minutes with a standard deviation of 5.4 minutes. Is that evidence the true average is different from 30, or could a sample like this come from a 30-minute service by chance?

    1. Set up the hypotheses. The null hypothesis is that the true mean is 30 minutes. The alternative is that it is not 30. “Different from” in either direction makes this a two-tailed test.
    2. Work out the test statistic. The population standard deviation is unknown, so this is a one-sample t-test. The standard error is 5.4 ÷ √15 = 1.3943, and t = (33.2 − 30) ÷ 1.3943 = 2.2951.
    3. Find the degrees of freedom. For a one-sample t-test, df = n − 1 = 14.
    4. Get the p-value. Type t = 2.2951 and df = 14 into the t tab. The area beyond 2.2951 in one tail is 0.018849. Two tails double it: p = 0.0377.
    5. Compare with α. With α = 0.05 chosen in advance, 0.0377 ≤ 0.05, so the result is statistically significant at the 5% level. The data are hard to square with a 30-minute average.

    The calculator also shows the critical value, ±2.1448 for df = 14 at α = 0.05. Since 2.2951 is beyond it, the decisions match: a statistic past the critical value always gives a p-value below α.

    A 95% confidence interval tells the same story from another side: 33.2 ± 2.1448 × 1.3943 runs from 30.21 to 36.19 minutes. It leaves out 30, which is what p < 0.05 in a two-tailed one-sample t-test means.

    Which Statistic You Have: z, t, χ², F or r

    The p-value depends on which distribution the statistic follows, and the test you ran decides that. Here is where each tab fits and where the degrees of freedom come from:

    Test you ranTabDegrees of freedom
    Mean, population SD known; or a large-sample test of a proportionznone
    One-sample or paired t-testtn − 1 (pairs for a paired test)
    Two-sample t-test, pooled variancetn₁ + n₂ − 2
    Two-sample t-test, Welchtfrom the Welch formula, can be a decimal
    Chi-square goodness of fitχ²number of categories − 1
    Chi-square test of independenceχ²(rows − 1) × (columns − 1)
    One-way ANOVAFk − 1 and N − k (k groups, N values)
    Pearson correlationrn − 2, worked out for you from n

    Statistics software prints the statistic and its degrees of freedom next to each other, such as t(14) = 2.30 or χ²(4) = 4.0. Those two numbers are all the calculator needs. A Welch df of 17.63 can be typed as it is; the t-distribution is defined for any positive degrees of freedom.

    A test of a proportion uses z. Say a website change is tried on 1,000 visitors and 540 of them (54%) click, against an old rate of 50%. The standard error under the null hypothesis is √(0.5 × 0.5 ÷ 1,000) = 0.0158, so z = (0.54 − 0.50) ÷ 0.015811 = 2.5298. The two-tailed p-value is 0.0114, and the right-tailed one, if “better” was the only question asked in advance, is 0.0057.

    Two Groups: Pooled t or Welch’s t

    Comparing two group means adds a choice. Class A has 12 students with a mean of 78 and a standard deviation of 8. Class B has 10 students with a mean of 71 and a standard deviation of 9.

    Pooled (equal variances assumed). Combine the two standard deviations into one: sp = √((11 × 8² + 9 × 9²) ÷ 20) = 8.4646. The standard error of the difference is sp × √(1/12 + 1/10) = 3.6243, so t = (78 − 71) ÷ 3.6243 = 1.9314 with 12 + 10 − 2 = 20 degrees of freedom. Two-tailed p = 0.0677.

    Welch (variances not assumed equal). Each group keeps its own variance: the standard error is √(8²/12 + 9²/10) = 3.6652, so t = 1.9099. The Welch formula gives 18.27 degrees of freedom, and p = 0.0720.

    Both miss 0.05 here, and they are close because the two standard deviations are similar. They drift apart when the groups differ in both size and spread. Welch’s version doesn’t need the equal-variance assumption, and some statistics packages, such as R’s t.test, use it by default. Whichever you use, type the t and df your method produced. If you have the raw scores or the means and SDs instead, the t-test calculator runs either version and shows the other one next to it.

    One Tail or Two, Decided Before You Look

    A two-tailed test asks “is it different?” and counts results that are extreme in either direction. A one-tailed test asks “is it higher?” or “is it lower?” and counts only one side. For z and t, the two-tailed p-value is twice the one-tailed one when the statistic falls on the predicted side. In the delivery example that is 0.0377 against 0.0188.

    That halving is exactly why the choice has to come first. Picking a one-tailed test after seeing which way the data went turns a two-tailed 0.08 into a one-tailed 0.04 and a “significant” result. A one-tailed test is honest only when the opposite direction was ruled out before the data came in, and a result in that direction would have been treated as “no effect”.

    If the statistic lands on the wrong side, a one-tailed p-value goes above 0.5. A right-tailed test with t = −2.10 and df = 20 gives p = 0.9757. The data point the other way, and a right-tailed test cannot call that significant however large it is. The calculator warns you when this happens.

    Why t Gives a Bigger p-Value Than z

    In the delivery example, treating 2.2951 as a z-score would give a two-tailed p of 0.0217 instead of 0.0377. The t-distribution has heavier tails than the normal curve because the standard deviation itself was estimated from a small sample, which adds uncertainty. The smaller the sample, the heavier the tails.

    The same statistic, t = 2.30, two-tailed:

    Degrees of freedomp-valueCritical value at α = 0.05
    50.0698±2.5706
    100.0443±2.2281
    140.0374±2.1448
    300.0286±2.0423
    1000.0235±1.9840
    Normal curve (z)0.0214±1.9600

    At 5 degrees of freedom, t = 2.30 is not significant at the 5% level. At 10 and above it is. As the degrees of freedom grow, t closes in on z, which is why large samples can use the normal curve. The calculator shows the z version of your t next to the answer, so you can see how much the small sample costs.

    For areas under the normal curve itself, such as a z of 1.47 read straight from a printed table, the z-score table lists them all, and the z-score calculator turns a raw score into z first.

    Chi-Square and F Tests Use the Right Tail

    A chi-square or F statistic is built from squared differences, so it can’t be negative, and a bigger value always means a worse fit to the null hypothesis. The p-value is therefore the area to the right, and the calculator sets that tail when you open the χ² or F tab.

    Chi-square goodness of fit. A shop expects customers to spread evenly over five weekdays. Over one week, 150 customers come in: 38, 26, 30, 24 and 32. With 30 expected each day:

    χ² = (8² + 4² + 0² + 6² + 2²) ÷ 30 = 120 ÷ 30 = 4.0, with 5 − 1 = 4 degrees of freedom.

    The right-tailed p-value is 0.4060. If customers really spread evenly, a week this uneven would turn up about 41% of the time, so there’s no evidence of busier days. The critical value at α = 0.05 is 9.4877, well above 4.0.

    F in a one-way ANOVA. Three teaching methods with 10 students each give F = 3.35 with 2 and 27 degrees of freedom. The p-value is 0.0502, and the critical value is 3.3541. The F statistic misses it by 0.0041.

    A two-tailed χ² or F test exists for a narrower set of questions. Testing whether a variance equals a set value, or whether two variances are equal, can count values that are too small as evidence too. For those, pick “two-tailed” and the calculator doubles the smaller tail. Goodness-of-fit, independence and ANOVA tests stay right-tailed.

    Testing a Correlation: Why Sample Size Changes Everything

    A Pearson correlation r is tested by turning it into t = r√(n − 2) ÷ √(1 − r²), with n − 2 degrees of freedom. The r tab does that step for you. The answer depends heavily on n:

    rSample sizetTwo-tailed p
    0.42302.44890.0208
    0.42101.30900.2269
    0.101,0003.17500.0015

    The same r = 0.42 is significant with 30 pairs and nowhere near it with 10. And r = 0.10, a weak relationship that explains only 1% of the variation (r² = 0.01), comes out highly significant with 1,000 pairs. A small p-value says the correlation is unlikely to be exactly zero. It doesn’t say the relationship is strong or useful.

    What a p-Value Doesn’t Tell You

    In 2016 the American Statistical Association published a statement on p-values because they were so widely misread. Its six principles, in short:

    1. A p-value can show how incompatible the data are with a specified statistical model.
    2. It does not measure the probability that the hypothesis is true, or the probability that the data came from chance alone.
    3. Conclusions and decisions should not rest only on whether p passes a threshold.
    4. Proper inference needs full reporting and transparency.
    5. A p-value does not measure the size of an effect or the importance of a result.
    6. By itself, a p-value is not a good measure of evidence about a model or hypothesis.

    Two of these trip people up in practice. The p-value is calculated assuming the null hypothesis is true, so it can’t also be the chance that the null is true. And “not significant” means the data didn’t rule out the null hypothesis, not that the null hypothesis was proven. With only 10 pairs, an r of 0.42 may be a real relationship that the sample was too small to detect.

    A Non-Significant Result and the Power to Find One

    “Not significant” can mean there is nothing to find, or that the study was too small to find it. Statistical power is the chance a test detects an effect of a given size when the effect is real. It depends on the size of the effect, the sample size and α.

    Go back to the correlation table. If the true correlation really were 0.42, a study with 10 pairs would reach p ≤ 0.05 only about 22% of the time (using the Fisher z approximation). With 30 pairs that rises to about 64%, and it takes about 44 pairs to reach roughly 82%. So the p = 0.2269 from 10 pairs is weak evidence either way: the study had little chance of a significant result even if the relationship is real.

    Two error types sit behind this. A Type I error is calling a result significant when the null hypothesis is true; α sets its rate. A Type II error is missing a real effect, and its rate is 1 minus the power. Lowering α to 0.01 cuts Type I errors but, with the same sample, raises Type II errors. Sample size is the lever that improves both.

    p = 0.049 and p = 0.051 Are Almost the Same Result

    The ANOVA above gave p = 0.0502. Had the F statistic been 3.36 instead of 3.35, p would be 0.0498 and the result “significant”. A difference of 0.01 in F should not flip a conclusion, and the ASA’s third principle says as much.

    Some habits that keep the threshold in its place:

    • Choose α before the analysis and say what it was. 0.05 is a convention, not a law, and a study can set 0.01 or a stricter level instead.
    • Use the rule p ≤ α consistently. A p-value exactly equal to α counts as significant under that rule, but with real data an exact tie is vanishingly unlikely.
    • Report the exact p-value, not just “significant” or “p < 0.05”, so readers can see 0.0502 for what it is.
    • Give the effect size and a confidence interval next to the p-value: how big the difference is, and how precisely it was measured.

    The Significant at box in the calculator lists the common levels the result passes (0.10, 0.05, 0.01, 0.001), which shows at a glance how close to a cut-off it sits.

    Running Many Tests at Once

    Each test at α = 0.05 has a 5% chance of a false alarm when the null hypothesis is true. Run 10 independent tests where nothing is going on, and the chance that at least one comes out “significant” is 1 − 0.95¹⁰ = 40.13%. The probability calculator works out this kind of “at least once” chance for any number of tries.

    The simplest correction is Bonferroni’s: divide α by the number of tests. For 10 tests, each one needs p ≤ 0.05 ÷ 10 = 0.005. It is strict, and other methods such as Holm’s give up less power, but the point stands either way. A single p = 0.03 picked out of 10 tests is weak evidence, and a report should say how many tests were run.

    Writing the Result in a Report

    APA style (7th edition), common in psychology and the social sciences, sets out these rules for p-values:

    • Give exact p-values to two or three decimal places: p = .038, p = .41.
    • Below .001, write p < .001 instead of the exact value.
    • Leave out the zero before the decimal point, since a p-value can’t be greater than 1: p = .038, not p = 0.038.
    • Put p in italics, like other statistical symbols.

    The delivery example would read: t(14) = 2.30, p = .038. The shop example: χ²(4) = 4.00, p = .406.

    Software sometimes prints “p = .000” or “0.0000”. That is a rounded display, not a p-value of zero, so report it as p < .001. The calculator never rounds a p-value down to zero. A z of 6, for example, gives a two-tailed p of 1.973 × 10⁻⁹ in scientific notation.