P-value from z-score calculator
A z of 1.96 in a two-sided test gives a p-value of almost exactly 5%. Choose the left, right or two-sided tail to match your question, and the probability comes from the standard normal curve, with no table needed. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Z
- 1.96
- Tail
- two-sided
- P value
- 0.0499957859
This p-value from z-score calculator converts a finite z statistic into the probability associated with the selected tail of the standard normal distribution. Choose a left tail for unusually low outcomes, a right tail for unusually high outcomes, or a two-sided tail when departures in either direction matter. The result is deterministic and requires no lookup table, network request, or simulation, making it suitable for quick checks as well as repeatable automated analysis.
Choose the tail before interpreting the result
A p-value is not determined by the z statistic alone; it also depends on the alternative hypothesis. Select left when increasingly negative values provide evidence against the null hypothesis, such as testing whether a process mean has fallen below a benchmark. Select right when increasingly positive values are the relevant evidence, such as testing whether a conversion rate has improved.
Select two-sided when either a positive or negative departure of the same magnitude would count as evidence. That final choice doubles the probability beyond the absolute observed z magnitude, with symmetry supplied by the standard normal distribution. Make the choice from the study question, ideally before looking at the data.
Switching from two-sided to one-sided merely because the observed direction is convenient changes the test after the fact and can make the reported significance misleading. Enter z as a signed number: the sign is essential for left- and right-tail calculations, while a two-sided result depends on its absolute magnitude.
Understand what the calculator computes
The calculation uses the cumulative distribution function of a standard normal random variable, which has mean zero and standard deviation one. For a left-tailed test, the returned p-value is the probability of observing a value less than or equal to the supplied z statistic. For a right-tailed test, it is the complementary probability above that statistic.
For a two-sided test, it is twice the smaller of those two tail probabilities, capped within the valid probability interval from zero to one. The implementation evaluates a deterministic complementary-error-function approximation, so identical inputs always produce identical numeric output and no external statistical service is involved. Very large magnitudes may round to zero or one at ordinary JavaScript floating-point precision; that reflects numeric representation at extreme tails rather than an assertion that an event is logically impossible.
For routine hypothesis tests, the output provides substantially more precision than is normally shown in a report. You can retain the full value for computation and round only when presenting the result.
Report the p-value with the test context
Use the result alongside the test definition, significance threshold, assumptions, and effect estimate. A small p-value says that the observed statistic, or something more extreme in the chosen tail, would be unusual under the null model. It does not give the probability that the null hypothesis is true, measure the practical importance of an effect, or prove that a research claim is correct.
Before using this calculator, confirm that a standard normal reference distribution is justified. That may follow from a known population variance, a large-sample approximation, or a statistic explicitly defined to have a standard normal null distribution. Smaller samples with an estimated standard deviation may require a t distribution instead.
In a report, state the z statistic, whether the test was left-tailed, right-tailed, or two-sided, and the resulting p-value. Compare it with a threshold chosen in advance, while also reporting confidence intervals or effect sizes when available.
What you can do with it
Check a hypothesis-test result
Convert software output that supplies a z statistic into the correct one- or two-tailed probability.
Verify a textbook calculation
Compare a worked normal-distribution exercise with a deterministic result at greater precision than a printed table.
FAQ
Which tail should I choose?
Choose left for an alternative below the null value, right for an alternative above it, and two-sided when deviations in either direction matter.
Why does the sign of z matter?
The sign locates the statistic below or above zero. It changes one-tailed probabilities, although two-sided probabilities are symmetric for positive and negative z values.
Does a small p-value prove the alternative hypothesis?
No. It measures how unusual the observed or more extreme statistic is under the null model; it does not assign a probability to either hypothesis.
Can I use this for a t statistic?
No. A t statistic must be evaluated with a t distribution and its degrees of freedom, not the standard normal distribution used here.
Does a small p-value prove my hypothesis?
No. It says the result, or something more extreme in the chosen tail, would be unusual if the null model were true. It does not give the probability that the null is true or measure how important the effect is.
Can I switch to a one-sided test after seeing the data?
You should not. Changing from two-sided to one-sided because the observed direction happens to suit you changes the test after the fact and can make the reported significance misleading.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/stat/p-value-z \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"z":1.96,"tail":"two-sided"}'const res = await fetch("https://api.kit.forhosting.com/stat/p-value-z", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"z": 1.96,
"tail": "two-sided"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/stat/p-value-z",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"z": 1.96,
"tail": "two-sided"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/stat/p-value-z", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"z":1.96,"tail":"two-sided"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"z":1.96,"tail":"two-sided"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/stat/p-value-z", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"z": 1.96,
"tail": "two-sided"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "stat.p_value_z",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Report the p-value with the test context
API automation costs $0.002 per request, while the browser calculation can be used directly for an individual check.
Integration use cases
Automate statistical reporting
Generate consistent p-values from stored z statistics in a repeatable API workflow.
Technical questions
How much does the API calculation cost?
Each API request costs $0.002. The same deterministic calculation is available in the browser without an API request.