Average Calculator API
Descriptive statistics for a list of numbers: mean, median, mode, min, max, range, geometric and harmonic means, variance, standard deviation and quartiles.
POST /api/v1/tools/average-calculatorMCP average_calculatorCalculatorsPaste a list of numbers to get the mean, median, mode, range, standard deviation, variance, quartiles, and geometric and harmonic means at once.
Input
Send these as a JSON object. Unknown fields are rejected.
- numbers
- The numbers, separated by spaces, new lines, commas, semicolons or pipes (up to 100,000 values), e.g. "4, 8, 15, 16, 23, 42". (string, required)
- quartileMethod
- inclusive: linear interpolation (Excel QUARTILE.INC, Google Sheets, R default). halves: median of the lower and upper halves (TI-84, many textbooks). (string, one of inclusive, halves, default "inclusive")
- includeSorted
- Include the sorted values in the response. (boolean, default false)
curl https://pithlab.com/api/v1/tools/average-calculator \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"numbers":"4, 8, 15, 16, 23, 42"}'Example response
{
"ok": true,
"result": {
"count": 6,
"sum": 108,
"mean": 18,
"median": 15.5,
"modes": [],
"modeCount": 1,
"min": 4,
"max": 42,
"range": 38,
"geometricMean": 13.9654968462316,
"harmonicMean": 10.4995244780581,
"populationVariance": 151.666666666667,
"populationStdDev": 12.3153021346074,
"sampleVariance": 182,
"sampleStdDev": 13.490737563232,
"q1": 9.75,
"q3": 21.25,
"iqr": 11.5,
"summary": "Count 6, sum 108, mean 18, median 15.5, no mode"
}
}