Computes first, second, and third quartiles (Q1, Q2, Q3) from numerical datasets. Use via MCP in Cursor or Windsurf for instant statistical analysis, or call GET /v1/stats/quartiles with your data array. Returns precise quartile values using standard calculation methods, perfect for box plot generation or outlier detection in AI-driven data analysis workflows.
curl "https://tinyfn.io/v1/stats/quartiles" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/stats/quartiles', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/stats/quartiles',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's statistics tools:
{
"mcpServers": {
"tinyfn-stats": {
"url": "https://tinyfn.io/mcp/stats",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Pass your numerical array to the quartiles tool in your MCP-enabled editor. It returns Q1 (25th percentile), Q2 (median), and Q3 (75th percentile) values.
Uses the standard method where Q1 is the median of the lower half, Q2 is the overall median, and Q3 is the median of the upper half of sorted data.
Yes, the tool handles both cases correctly. For odd-sized datasets, it excludes the median when splitting halves; for even sizes, it splits exactly in half.
Quartiles are specific percentiles: Q1 = 25th percentile, Q2 = 50th percentile (median), Q3 = 75th percentile. Quartiles divide data into four equal parts.
Calculate IQR (Q3 - Q1), then flag values below Q1 - 1.5×IQR or above Q3 + 1.5×IQR as potential outliers using the standard box plot method.
Get your free API key and start using Calculate Quartiles in seconds.
Get Free API Key