ForHosting KIT · Math

Z-score calculator

See how unusual a value is: a test score of 85 against a mean of 70 and a standard deviation of 10 has a z-score of 1.5, within two standard deviations. You can also standardize a whole list. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Value
85
Mean μ
70
Standard deviation σ
10
You get
Calculation mode
point
Z score
1.5
Interpretation
within_2_sd

A z-score, also called a standard score, measures how many standard deviations a raw value sits above or below the mean of a reference distribution. The defining formula is simple and universal: z equals x minus mu divided by sigma. When sigma is known from a population or a published benchmark, you plug the three numbers in and read the signed distance from the center. When you only have a sample or a column of measurements, you first estimate the mean and the standard deviation from the data, then apply the same formula to every point so the column becomes unitless and comparable across scales. This calculator supports both workflows in one contract: send a single value with mean and standard deviation for a one-shot score, or send a full data list to standardize every element and receive the cleaned mean, sigma, and the vector of z-scores. Requests with a zero standard deviation are rejected with a clear validation error, because division by zero would make every z-score undefined.

How the z-score formula works

Start from a raw observation x and a reference mean mu. The difference x minus mu is the signed deviation from the center of the distribution: positive when the observation is above the mean, negative when it is below. Dividing that difference by the standard deviation sigma converts the deviation into units of typical spread.

After this scale change, a result of zero means the observation equals the mean, plus one means one standard deviation above the mean, and minus two means two standard deviations below. For a single known triple of value, mean, and standard deviation the arithmetic is a constant-time division. For an entire data set the calculator first forms the arithmetic mean as the sum of the values divided by the count n.

It then forms the standard deviation from the sum of squared deviations from that mean, using either the population divisor n when ddof equals zero or the sample divisor n minus one when ddof equals one. Each original value is then mapped with the same formula so the returned list has mean near zero and unit scale under the chosen divisor.

Population standardization is the default because feature scaling and many teaching examples divide by n; sample standardization is available when you explicitly need an unbiased sample variance estimator for inference. The special case of sigma equal to zero is rejected: when every value is identical, or when a caller passes a zero standard deviation, there is no meaningful unit of spread and the z-score is undefined.

Where z-score calculators show up in real work

Data science and machine learning pipelines standardize numeric features before distance-based models, principal component analysis, or regularized regression so columns measured in different units do not dominate the fit. Quality control and process monitoring convert sensor readings into z-units against a process mean and sigma to flag excursions beyond two or three sigma without inventing ad-hoc thresholds on the raw scale. Psychometrics and educational measurement report norm-referenced scores on a common scale so a raw number of correct answers becomes comparable across forms and cohorts.

Finance and risk teams sometimes express returns or residual errors in standard-deviation units for stress summaries and simple anomaly screens. If you later need percentiles, p-values from a normal table, t-scores, confidence intervals, or full descriptive statistics for every CSV column, treat those as separate search intents and landings rather than overloading this z-score calculator page.

Compare exam scores across different tests

Convert raw marks from tests with different means and standard deviations into z-scores so students, teachers, and admissions reviewers compare standing on one scale.

Standardize features before modeling

Turn a numeric column into unitless z-scores with population or sample sigma so distance models and regularized regressions treat every feature fairly.

Flag process and sensor outliers

Map measurements to z-units against a known process mean and sigma and highlight values beyond two or three standard deviations for review.

What is the z-score formula?

z = (x − μ) / σ, where x is the raw value, μ is the mean, and σ is the standard deviation. Positive z means above the mean; negative z means below.

What happens if the standard deviation is zero?

When σ = 0 every observation is identical (or the caller passed zero), so division by zero would make z undefined.

Can I standardize a whole list of numbers?

Yes. Send data as an array or a comma-separated string. The calculator estimates mean and σ (or uses your overrides) and returns a z-score for every element.

What is the difference between ddof 0 and ddof 1?

ddof 0 is the population standard deviation (divide by n). ddof 1 is the sample standard deviation (divide by n−1). The default is 0. The setting is ignored when you provide std yourself.

What does it cost?

The browser tool is free and runs locally.

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.

POSThttps://api.kit.forhosting.com/stat/z-score

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.

curl -X POST https://api.kit.forhosting.com/stat/z-score \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":85,"mean":70}'
{
  "value": 85,
  "mean": 70
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "stat.z_score",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

How the z-score formula works

Every step is deterministic floating-point math with no random seeds, no wall-clock timestamps, and no network calls, so identical inputs always produce identical JSON.

What you send and what you get back

For a single z-score send three finite numbers under the fields value, mean, and std. A zero or near-zero standard deviation fails with a message that z-scores are undefined when sigma equals zero. Optionally override mean and std, and optionally set ddof to zero or one when the calculator must estimate sigma from the data. Classic textbook checks include a test score of eighty-five against a mean of seventy and a standard deviation of ten, which yields z equals one point five, and a five-point list such as sixty, seventy, eighty, ninety, one hundred that standardizes symmetrically around the sample center. The field std also accepts the aliases sd, standard_deviation, and sigma so classroom wording and API naming both work. Missing fields, non-numeric strings, NaN, and Infinity fail with invalid_input and are not charged. On success the point-mode response echoes the cleaned value, mean, and std, returns z_score, states the formula string, and attaches a coarse interpretation band such as within_1_sd, within_2_sd, within_3_sd, or beyond_3_sd based on the absolute value of z. For data-set mode send data as a JSON array of numbers or as a comma, space, or semicolon separated list in a string. The response includes mode dataset, the count n, the mean and std actually used, mean_source and std_source flags that say whether each was provided or computed, the cleaned values array, and the parallel z_scores array. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.

Where z-score calculators show up in real work

Secondary-school and college statistics courses constantly assign standard-score drills, empirical-rule tables, and comparisons of exam scores from different means and spreads; a single trusted oracle that returns cleaned JSON speeds grading and demo setup. Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.

Read the full KIT documentation →