{
    "name": "P-value Calculator",
    "url": "https://calculators.geekmidst.com/calculators/p-value-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/p-value-calculator.md",
    "category": "Statistics & probability",
    "description": "Get the exact p-value for a z, t, chi-square or F test statistic, one- or two-tailed, and see whether it is significant at your chosen α.",
    "summary": "The p-value is the probability, if the null hypothesis were true, of a test statistic at least as extreme as the one you observed. Enter the statistic, its distribution and degrees of freedom.",
    "also_called": [
        "P-value from test statistic",
        "Significance calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "test",
            "label": "Distribution of the statistic",
            "type": "select",
            "default": "t",
            "options": {
                "z": "z (standard normal)",
                "t": "Student’s t",
                "chi2": "Chi-square (χ²)",
                "f": "F"
            }
        },
        {
            "name": "stat",
            "label": "Test statistic",
            "type": "number",
            "default": "2.5"
        },
        {
            "name": "df1",
            "label": "Degrees of freedom",
            "type": "number",
            "default": "20"
        },
        {
            "name": "df2",
            "label": "Denominator degrees of freedom",
            "type": "number",
            "default": "10",
            "shown_when": {
                "test": "f"
            }
        },
        {
            "name": "tail",
            "label": "Tail",
            "type": "segmented",
            "default": "two",
            "options": {
                "two": "Two-tailed",
                "right": "Right-tailed",
                "left": "Left-tailed"
            }
        },
        {
            "name": "alpha",
            "label": "Significance level (α)",
            "type": "number",
            "default": "5",
            "unit": "%"
        }
    ],
    "outputs": [
        {
            "key": "p",
            "label": "p-value",
            "format": "number"
        },
        {
            "key": "p_text",
            "label": "p-value (full precision)",
            "format": "text"
        },
        {
            "key": "decision",
            "label": "Decision",
            "format": "text"
        },
        {
            "key": "distribution",
            "label": "Distribution used",
            "format": "text"
        }
    ],
    "formula": {
        "text": "Right tail p = P(X ≥ x);  left tail p = P(X ≤ x);  two-tailed p = 2 × min(left, right)",
        "variables": {
            "X": "the test statistic’s distribution under the null hypothesis",
            "x": "the observed statistic"
        }
    },
    "worked_example": {
        "inputs": {
            "test": "t",
            "stat": "2.5",
            "df1": "20",
            "df2": "10",
            "tail": "two",
            "alpha": "5"
        },
        "steps": [
            "Under the null hypothesis the statistic follows a t-distribution with 20 degrees of freedom.",
            "P(T ≥ 2.5) = 0.010617.",
            "Two-tailed: p = 2 × 0.010617 = 0.021234, which is below α = 0.05."
        ],
        "result": "A t statistic of 2.5 with 20 degrees of freedom gives a two-tailed p-value of 0.0212, significant at the 5% level."
    },
    "interpretation": "A small p-value means the data would be surprising if the null hypothesis were true. It is not the probability that the null hypothesis is true, and it says nothing about how large or important the effect is, so report an effect size or confidence interval alongside it.",
    "assumptions": [
        "The statistic really follows the chosen distribution under the null hypothesis (the test’s own assumptions hold).",
        "Two-tailed p for chi-square and F doubles the smaller tail; most chi-square and F tests are right-tailed."
    ],
    "limitations": [
        "Does not compute the test statistic from raw data; use the matching test first."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "One-tailed or two-tailed?",
            "answer": "Use two-tailed unless you decided before seeing the data that only one direction matters. A one-tailed p is half the two-tailed p for symmetric tests, which is why switching after the fact is not legitimate."
        },
        {
            "question": "Which tail for chi-square and F tests?",
            "answer": "Goodness-of-fit, independence and ANOVA tests are right-tailed: large values are evidence against the null."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Z-score Calculator",
            "url": "https://calculators.geekmidst.com/calculators/z-score-calculator"
        },
        {
            "name": "Confidence Interval Calculator",
            "url": "https://calculators.geekmidst.com/calculators/confidence-interval-calculator"
        },
        {
            "name": "Standard Deviation Calculator",
            "url": "https://calculators.geekmidst.com/calculators/standard-deviation-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}