Z-Score Calculator with P-Value, Percentile and Sample Mean

Compute z = (x − μ) / σ, or z = (x̄ − μ) / (σ / √n) when you enter a sample size. Then read the left-tail percentile, right-tail and two-tailed p-values. Edit z directly or enter a probability to work backwards to x.

Leave n blank for a single observation, z = (x − μ) / σ. If n is greater than 1, x is treated as a sample mean and the denominator is the standard error σ/√n.

Common z

Z-score formula

z = (x − μ) / σ (single value) z = (x̄ − μ) / (σ / √n) (sample mean) x = μ + z·σ or x̄ = μ + z·(σ / √n) percentile = Φ(z) × 100 one-tailed p (right) = 1 − Φ(z) two-tailed p = 2 × (1 − Φ(|z|))

Φ is the cumulative distribution function (CDF) of the standard normal distribution. This calculator evaluates Φ with a double-precision rational approximation (accurate to about 1×10⁻¹⁴ across the range, including far tails such as z = −8) and inverts it with Acklam's algorithm plus a Halley refinement step, so reverse lookups are accurate to roughly nine significant digits.

Worked example

An exam has mean μ = 70 and standard deviation σ = 10. A student scores x = 85. The z-score is z = (85 − 70) / 10 = 1.5. Φ(1.5) = 0.93319, so the student is at the 93.3rd percentile: about 6.7% of scores are higher (right-tail p = 0.0668). The two-tailed p-value — the probability of a result at least 1.5 standard deviations from the mean in either direction — is 0.1336.

Going the other way: what score marks the top 5%? The left-tail probability is 0.95, so z = Φ⁻¹(0.95) = 1.645 and x = 70 + 1.645 × 10 = 86.4.

Sample mean: a sample of n = 16 observations has mean x̄ = 74. The population mean is μ = 70 and σ = 8. The standard error is 8 / √16 = 2, so z = (74 − 70) / 2 = 2.00. Φ(2) = 0.97725 (the 97.7th percentile) and the two-tailed p-value is 0.04550. Enter 16 in the sample-size box to use this form; leave it blank to score a single value against σ.

Z table (standard normal)

zLeft tail P(ZRight tailTwo-tailed p
0.000.500000.500001.00000
0.500.691460.308540.61708
1.000.841340.158660.31731
1.280.900080.099920.19984
1.500.933190.066810.13361
1.6450.950020.049980.09997
1.960.975000.025000.05000
2.000.977250.022750.04550
2.330.989990.010010.02002
2.5760.995000.005000.01000
3.000.998650.001350.00270
3.290.999500.000500.00100

One-tailed vs two-tailed p-values

Use a one-tailed test when your hypothesis has a direction ("the new process is faster"). Use a two-tailed test when any difference counts ("the process is different"). The classic critical values are z = 1.645 (one-tailed, α = 0.05), z = 1.96 (two-tailed, α = 0.05) and z = 2.576 (two-tailed, α = 0.01). For z = 1.96, the two-tailed p-value is 0.0500.

When is a z-score appropriate?

Z-scores assume the data are approximately normal and that σ is known (or the sample is large). With small samples and an estimated standard deviation, a t-distribution gives more accurate p-values. Z-scores are also used without normality simply to standardise values onto a common scale, but then the percentile interpretation does not hold.

Frequently asked questions

What does a z-score of 0 mean?

The value equals the mean. Half of a normal distribution lies below it, so it is the 50th percentile.

What is the p-value for z = 1.96?

Two-tailed p = 0.0500 and one-tailed (right) p = 0.0250. That is why 1.96 is the critical value for a 95% confidence interval. To form the interval itself (mean or proportion), use the <a href='/confidence-interval-calculator'>confidence interval calculator</a>.

Can a z-score be negative?

Yes. A negative z means the value is below the mean. z = −1 corresponds to the 15.87th percentile.

How do I convert a percentile to a z-score?

Enter the percentile as a probability (e.g. 0.90 for the 90th percentile) in the probability box. The calculator returns z = 1.2816 and the matching x.

How accurate is this normal CDF?

It uses a double-precision rational approximation with absolute error around 1e-14, far more precise than printed z tables, which give four or five decimals.

How do I calculate a z-score for a sample mean?

Use z = (x̄ − μ) / (σ / √n). Enter the sample mean as x, the population (or hypothesized) mean as μ, the population standard deviation as σ, and the sample size n. For n = 16, x̄ = 74, μ = 70 and σ = 8, z = 2.00.

What is the p-value of a z-score?

The right-tail p-value is 1 − Φ(z); the two-tailed p-value is 2 × (1 − Φ(|z|)). For z = 1.96 those are 0.0250 and 0.0500.

Related calculators

Confidence Interval CalculatorCalculate a z confidence interval for a mean (known σ) or a proportion…