Calculates specific percentiles from numerical datasets with precise statistical accuracy. Use via MCP in AI coding tools like Cursor or Windsurf, or call GET /v1/stats/percentile directly. Perfect for data analysis tasks where you need the 95th percentile response time, median salary, or any percentile between 0-100. Returns exact values using standard statistical methods.
curl "https://tinyfn.io/v1/stats/percentile" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/stats/percentile', {
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/percentile',
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 and percentile value (0-100) to the endpoint. For the 90th percentile of [1,2,3,4,5], you'd get 4.6 using linear interpolation.
Percentiles divide data into 100 parts (any value 0-100), while quartiles are specific percentiles: Q1=25th, Q2=50th (median), Q3=75th percentile.
Yes, AI agents in Cursor or Cline can call this tool to analyze response times, calculate SLA thresholds, or monitor system performance percentiles automatically.
Yes, it properly handles duplicates, single-value arrays, and uses standard interpolation methods for datasets with fewer elements than the percentile rank.
Uses linear interpolation (R-6/Excel method) which provides consistent results across statistical tools and handles fractional ranks smoothly.
Get your free API key and start using Calculate Percentile in seconds.
Get Free API Key