Statistics calculator

Summarise a list of numbers: mean, median, mode, range, variance, standard deviation and quartiles.

Input

The numbers to summarise.

Result

Fill in the input and press Run.

Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.

Use it from code or an agent

curl -s https://setget.net/v1/tools/statistics \
  -H 'Content-Type: application/json' \
  -d '{"input":{"numbers":[2,4,4,4,5,5,7,9]}}'
import json, urllib.request

body = {'input': {'numbers': [2, 4, 4, 4, 5, 5, 7, 9]}}
request = urllib.request.Request("https://setget.net/v1/tools/statistics", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/statistics", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"numbers":[2,4,4,4,5,5,7,9]}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "statistics",
  "input": {
    "numbers": [
      2,
      4,
      4,
      4,
      5,
      5,
      7,
      9
    ]
  }
}
{
  "input": {
    "numbers": [
      2,
      4,
      4,
      4,
      5,
      5,
      7,
      9
    ]
  }
}

Endpoint: POST /v1/tools/statistics. Over MCP: run_tool with slug: "statistics". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
numbers array yes The numbers to summarise.

Example

Input
{
  "numbers": [
    2,
    4,
    4,
    4,
    5,
    5,
    7,
    9
  ]
}
Result
{
  "count": 8,
  "sum": 40,
  "mean": 5,
  "median": 4.5,
  "modes": [
    4
  ],
  "min": 2,
  "max": 9,
  "range": 7,
  "variance_population": 4,
  "variance_sample": 4.57142857143,
  "stdev_population": 2,
  "stdev_sample": 2.1380899353,
  "q1": 4,
  "q3": 5.5,
  "iqr": 1.5
}

Questions

Sample or population standard deviation?
Use population when your numbers are the whole group. Use sample when they are a selection from a larger group: it divides by one less than the count, so it comes out a little larger.
How are quartiles worked out?
By linear interpolation between the sorted values, the same method as QUARTILE.INC in spreadsheets. Other methods can give slightly different answers for small lists.
Why is "modes" empty?
When every value appears only once there is no most common value.