ForHosting KIT · Math

Standard deviation calculator

For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the population standard deviation is exactly 2, while the sample one is larger because it divides by 7 instead of 8. Paste your numbers and get both versions side by side. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

This standard deviation calculator computes both the population and sample measures of spread for a finite list of numbers. You get the arithmetic mean, the sum of squared deviations from that mean, population variance and standard deviation (divide by n), sample variance and standard deviation with Bessel’s correction (divide by n − 1), plus the observed minimum and maximum. Classic checks include the eight-value series two, four, four, four, five, five, seven, nine, which has mean five, population standard deviation exactly two, and a larger sample standard deviation because the denominator is seven instead of eight. The engine uses a deterministic two-pass algorithm only: no network calls, no random sampling, and no date-dependent shortcuts.

What standard deviation measures and what you get

Standard deviation answers how far typical values sit from the center of a data set. After the mean is known, each observation contributes a squared residual; averaging those squares produces variance, and the square root of variance is the standard deviation, which lives in the same units as the original measurements.

Population formulas divide by n and treat the list as the entire universe of interest; sample formulas divide by n − 1 so that the estimated variance is unbiased when the list is only a draw from a larger process. This calculator always returns both families side by side: n, mean, sum, sum of squared deviations, population variance, population standard deviation, sample variance, sample standard deviation, min, max, and short formula strings that name σ and s.

Where population and sample spread fit in study, science, and product work

Students meet standard deviation when a textbook contrasts population and sample formulas, when a lab report asks for uncertainty on repeated measurements, or when they need a clean check against a calculator that only exposes one of the two conventions. Teachers can pre-generate answer keys for modest series without trusting opaque apps that round intermediate squares differently or hide which denominator they used.

Developers call the same contract from scripts to seed deterministic test vectors, to validate feature-scale pipelines that normalize by σ, or to satisfy data-quality gates that reject columns whose sample standard deviation collapses to zero. Analysts use population measures when the file truly is the whole population for a day or a cohort, and sample measures when the file is a survey draw that should generalize. Product and operations teams watch sample standard deviation of latency, basket size, or error counts to spot regressions that averages alone would mask.

Pair it with binomial or other probability tools when you need distributional models, and with CSV profiling when you need multi-column summaries rather than a single numeric series.

Homework and lab checks

Verify population and sample standard deviation for textbook series and repeated measurement labs with both denominators shown.

Spread monitoring

Track sample standard deviation of latency, basket size, or error rates so regressions are not hidden by the mean alone.

What does the standard deviation calculator cost?

It is free in your browser on this page.

What is the difference between population and sample standard deviation?

Population divides the sum of squared deviations by n; sample divides by n − 1 (Bessel’s correction). This tool returns both.

Why do I need at least two values?

Sample variance and sample standard deviation are undefined for a single observation.

Is the result exact for every data set?

Results are deterministic for the same input; very large or ill-conditioned series may show ordinary double-precision limits.

How do I calculate standard deviation by hand?

Find the mean, subtract it from each value, square the differences and add them up. For 2, 4, 4, 4, 5, 5, 7, 9 that sum is 32; divided by 8 it gives a variance of 4, and its square root, 2, is the standard deviation.

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/standard-deviation

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/standard-deviation \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"values":[2,4,4,4,5,5,7,9]}'
{
  "values": [
    2,
    4,
    4,
    4,
    5,
    5,
    7,
    9
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "stat.standard_deviation",
  "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.

max_n10000
max_abs1000000000000000
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.

What standard deviation measures and what the response contains

There is no approximate Monte Carlo path presented as truth and no silent coercion of text labels into zeros: the engine either finishes the two-pass arithmetic inside the supported length and magnitude limits or rejects the input with invalid_input. Rejected cases include a missing values field, an empty list, a single observation, non-finite entries such as Infinity or NaN, non-numeric tokens, and arrays longer than the published maximum.

How values are read and how the two-pass algorithm stays stable

Each element is parsed as a finite decimal; optional leading signs and scientific notation are allowed, while empty tokens, bare letters, and non-numeric objects fail with a field index in the message so a bad cell does not become a silent zero. Computation is the classic two-pass method: first sum and mean, then sum of squared deviations from that mean, then population variance as SSD over n and sample variance as SSD over n minus one, with standard deviations taken as positive square roots. Returning both denominators in one response avoids the common spreadsheet mistake of mixing STDEV.P and STDEV.S without noticing. The preferred field is values, an array of finite numbers, but aliases data, numbers, x, and series are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. A single comma-separated or whitespace-separated string of numbers is also accepted when a form posts plain text instead of JSON arrays. The engine enforces a hard maximum of ten thousand points and a per-value magnitude ceiling so memory and latency stay inside a predictable budget on the free browser path and on the edge Worker. Pair the free browser run on this page with the priced API when you need the identical descriptive result inside an automated pipeline without re-implementing Bessel’s correction yourself.

Where population and sample spread fit in study, science, and product work

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result.

Deterministic CI fixtures

Generate reproducible mean, variance, and σ values for unit tests and data-quality gates without hand-maintaining tables.

Can I send a comma-separated string instead of a JSON array?

Yes. The values field accepts an array of numbers or a single string of numbers separated by commas, spaces, or semicolons.

Read the full KIT documentation →