Statistics calculator
Summarise a list of numbers: mean, median, mode, range, variance, standard deviation and quartiles.
Input
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
| Name | Type | Required | What 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.
Related tools
- Calculator and expression evaluatorWork out an arithmetic expression safely: brackets, powers, functions such as sqrt and log, and variables.
math-eval - Percentage calculatorWork out percentages: X% of Y, what percent X is of Y, percent change, and increase or decrease by X%.
percent - CSV profilerSummarise each CSV column: type, blanks, distinct values, min, max, mean and top values.
csv-profile - Add or subtract time from a dateAdd or subtract years, months, weeks, days, hours and minutes from a date and get the resulting date.
date-add - Age calculatorWork out an exact age in years, months and days on a given date, plus the next birthday.
age-calculator - Aspect ratio calculatorSimplify a width and height to a ratio such as 16:9, and scale to a new width or height.
aspect-ratio