Dispersion calculator
For 2, 4, 4, 4, 5, 5, 7 and 9 you get a range of 7, a variance of 4 and a standard deviation of 2, all three at once. See how consistent your data are, not only where their average sits. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Measures of dispersion describe how widely the numbers in a dataset spread out, not merely where they sit on average. Range is the distance between the largest and the smallest observation, variance is the mean of the squared deviations from the arithmetic mean, and standard deviation is the square root of that variance so the spread is expressed on the same scale as the original values. Analysts, students and quality engineers ask for those three numbers together whenever a single centre is not enough to judge consistency.
Range, variance and standard deviation as one family of spread
Range, variance and standard deviation are the three classical measures of statistical dispersion taught in every introductory course, and they answer complementary questions about the same list. Range is the simplest: subtract the minimum from the maximum. It is easy to explain and immediately shows the full width of the observed interval, but it uses only two points, so a single extreme observation can stretch it while the rest of the list stays clustered.
Variance repairs that blindness by using every value. First form the arithmetic mean, then square the distance of each observation from that mean, then divide the sum of those squared distances by n. Because every point contributes, a tight cluster produces a small variance and a list that wanders far from its centre produces a large one.
The squares punish large deviations more than small ones, which is why variance is sensitive to outliers even though it is not defined by the two extremes alone. Standard deviation is the positive square root of that variance. Returning the three together lets you report the crude width, the mean-square spread, and the same-scale spread without calling three separate tools or guessing whether a neighbour calculator divided by n or by n minus one.
A list of one finite number is valid: range, variance and standard deviation are all zero because there is no spread to measure. An empty list is not a dataset, and a non-numeric token is not an observation; both fail validation instead of inventing numbers.
Your data, the calculation and the result
After validation the core walks the list once to accumulate the sum and to record the minimum and the maximum, then walks again to accumulate the sum of squared deviations from the mean. Range is max minus min. Variance is that sum of squares divided by n, the descriptive divisor that treats the list as the complete set you already hold.
Standard deviation is the square root of that variance. A microscopic clamp prevents floating round-off on a zero-spread list from inventing a negative sum of squares. Example: the eight numbers two, four, four, four, five, five, seven and nine have mean five, range seven, variance four and standard deviation two.
What you can do with it
Homework and introductory statistics labs
Students and graders verify range, variance and standard deviation on the same list, including the hard rule that an empty dataset or a non-numeric token is invalid.
Quality control and sensor batches
Engineers turn a finished batch of readings into a stable width and mean-square spread for reports without choosing a divisor or calling three separate calculators.
FAQ
Which variance formula does this calculator use?
The descriptive whole-dataset formula: the sum of squared deviations from the mean divided by n. Standard deviation is the square root of that variance. Range is max minus min.
What happens if the dataset is empty or contains a non-numeric value?
At least one finite number is required, and every entry must be numeric. Validation failures are not charged.
Can I send a single number?
Yes. A list of one finite number is a valid dataset with no spread: range, variance and standard deviation are all zero, and mean equals that number.
What does the dispersion calculator cost?
The browser tool runs free on your device.
Why is the variance in squared units?
Because it averages the squared distances from the mean. Measurements in centimetres give a variance in square centimetres. The standard deviation takes the square root and brings the spread back to centimetres, the unit of your data.
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/dispersion \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"values":[2,4,4,4,5,5,7,9]}'const res = await fetch("https://api.kit.forhosting.com/stat/dispersion", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"values": [
2,
4,
4,
4,
5,
5,
7,
9
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/stat/dispersion",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"values": [
2,
4,
4,
4,
5,
5,
7,
9
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/stat/dispersion", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"values":[2,4,4,4,5,5,7,9]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"values":[2,4,4,4,5,5,7,9]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/stat/dispersion", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"values": [
2,
4,
4,
4,
5,
5,
7,
9
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "stat.dispersion",
"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.
Limits
max_values | 100000 |
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
This calculator accepts a non-empty list of finite numbers, returns the three descriptive measures in one object, and rejects an empty dataset or any non-numeric entry with invalid_input so a broken pipeline never invents a silent zero. The arithmetic is fully deterministic, runs free in the browser, and is available over the API at $0.002 per successful request.
Range, variance and standard deviation as one family of spread
Taking the root returns the spread to the original unit of the data: if the observations are centimetres or seconds, the standard deviation is centimetres or seconds, whereas variance is square centimetres or square seconds. This endpoint uses the descriptive, whole-dataset formulas: range equals max minus min, variance equals the mean of squared deviations from the arithmetic mean, and standard deviation is the square root of that variance.
Input contract, two-pass arithmetic, and the response shape
Send a JSON body whose required field is values: a non-empty array of finite numbers. The same list is also accepted under the aliases numbers, data, list and x, and as a comma-separated or whitespace-separated string so a pasted column from a spreadsheet does not need a rename step. Each entry may arrive as a JSON number or as a numeric string; empty strings, NaN, Infinity, objects and words are rejected with invalid_input naming the offending index. A missing field, a non-array non-string payload, an empty array, and a list longer than the published maximum also fail, and those failures do not consume balance. The response echoes n, min, max and mean beside the three dispersion fields so you can audit the arithmetic without a second request.
Where a dispersion calculator earns its keep
Use the browser tool when you want an immediate range, variance and standard deviation while checking a homework answer, profiling a small sensor batch, or explaining why a mean without a spread is incomplete. Results are fully deterministic: the same values always yield the same n, min, max, mean, range, variance and standard deviation. There is no language model, no external statistics service and no randomness, so the capability is safe to pin in continuous-integration checks and reproducible lesson materials. Pair it with a dedicated variance or standard-deviation neighbour if you specifically need Bessel's sample divisor n minus one; this landing answers the search for measures of dispersion as a family, not a single moment. Each successful request is one billable item at $0.002; failed validation does not consume balance. Accepted lists stay bounded for Worker isolates: up to one hundred thousand values cover classroom tables, laboratory excerpts and typical analytics samples while still finishing quickly. Wire the endpoint into data-science tutorials, spreadsheet-migration tests, coding-interview sandboxes, or preprocessing steps where you already prefer closed-form two-pass formulas over approximate streaming sketches.
Integration use cases
Scripts and CI numeric fixtures
Pipelines and interview sandboxes call a deterministic dispersion contract instead of reimplementing min, max, two-pass variance and a square root in every language.
Technical questions
How do I compute measures of dispersion with this calculator?
Send JSON with values (a non-empty array of finite numbers) to stat.dispersion. The response returns range, variance, standard_deviation, plus n, min, max and mean.