{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"percentile"},"result":{"entity_type":"calculator","id":"percentile","calculator_id":"percentile","canonical_url":"https://tttkmbb.com/statistics/percentile","name":"Percentile Calculator","title":"Percentile Calculator – Value at a Percentile and Percentile Rank of a Value in a Data Set","category":"statistics","category_name":"Statistics & Probability","tool_name":"calculate_percentile","featured_mcp_tool":false,"description":"For a list of numbers, computes the value at a given percentile (linear interpolation, as in Excel PERCENTILE.INC) and/or the percentile rank of a given value (percentage of values below it, counting ties as half).","use_when":"You need the k-th percentile of a data set (e.g. the 90th percentile response time) or want to know what percentile a particular value falls at within the data.","do_not_use_when":"You want a percentile from a normal distribution rather than actual data (use z-score or normal-distribution), or you need quartiles together with other summary statistics (use descriptive-statistics).","inputs":[{"name":"values","label":"Values","type":"number_list","required":true,"description":"The data set (order does not matter).","example":[15,20,35,40,50]},{"name":"percentile","label":"Percentile to find","type":"number","unit":"%","required":false,"min":0,"max":100,"description":"Percentile between 0 and 100 whose value you want (e.g. 90 for the 90th percentile). Give this, value, or both.","example":40},{"name":"value","label":"Value to rank","type":"number","required":false,"description":"A value whose percentile rank within the data you want. Give this, percentile, or both.","example":35}],"outputs":[{"name":"value_at_percentile","label":"Value at percentile","type":"number","decimals":4,"description":"Data value at the requested percentile by linear interpolation between sorted values (only when percentile is given)."},{"name":"percentile_rank","label":"Percentile rank of value","type":"number","unit":"%","decimals":2,"description":"100 × (count below + 0.5 × count equal) / n (only when value is given)."},{"name":"count_below","label":"Values below","type":"integer","decimals":4,"description":"Number of data values strictly less than value."},{"name":"count_equal","label":"Values equal","type":"integer","decimals":4,"description":"Number of data values equal to value."},{"name":"count","label":"Number of values","type":"integer","decimals":4,"description":"Size of the data set."}],"input_schema":{"type":"object","properties":{"values":{"description":"The data set (order does not matter).","type":"array","items":{"type":"number"},"minItems":1,"examples":[[15,20,35,40,50]]},"percentile":{"description":"Percentile between 0 and 100 whose value you want (e.g. 90 for the 90th percentile). Give this, value, or both. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[40],"x-unit":"%"},"value":{"description":"A value whose percentile rank within the data you want. Give this, percentile, or both.","type":"number","examples":[35]}},"additionalProperties":false,"required":["values"]},"output_schema":{"type":"object","properties":{"value_at_percentile":{"description":"Data value at the requested percentile by linear interpolation between sorted values (only when percentile is given).","type":"number"},"percentile_rank":{"description":"100 × (count below + 0.5 × count equal) / n (only when value is given). Unit: %.","type":"number","x-unit":"%"},"count_below":{"description":"Number of data values strictly less than value.","type":"integer"},"count_equal":{"description":"Number of data values equal to value.","type":"integer"},"count":{"description":"Size of the data set.","type":"integer"}}},"formula":"value at percentile p: rank = p/100 · (n − 1) on the sorted data, value = x(⌊rank⌋) + (rank − ⌊rank⌋) · (x(⌊rank⌋+1) − x(⌊rank⌋)); percentile rank of v = 100 · (count(x < v) + 0.5 · count(x = v)) / n","method":"The value-at-percentile method is Hyndman & Fan type 7 (Excel PERCENTILE.INC, R and NumPy default); the 'exclusive' method and nearest-rank method give different results for small n. Percentile rank uses the definition with ties counted as half.","sources":[{"name":"Wikipedia – Percentile","url":"https://en.wikipedia.org/wiki/Percentile","type":"reference","retrieved_at":"2026-09-23"},{"name":"Wikipedia – Percentile rank","url":"https://en.wikipedia.org/wiki/Percentile_rank","type":"reference","retrieved_at":"2026-09-23"},{"name":"Microsoft Support – PERCENTILE.INC function","url":"https://support.microsoft.com/en-us/office/percentile-inc-function-680f9539-45eb-410b-9a5e-c1355e5fe2ed","type":"reference","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"40th percentile of 15, 20, 35, 40, 50","inputs":{"values":[15,20,35,40,50],"percentile":40},"expected":{"value_at_percentile":29,"count":5},"url":"https://tttkmbb.com/api/v1/calculate/percentile?values=15%2C20%2C35%2C40%2C50&percentile=40"},{"name":"Rank of 5 and 90th percentile in 2, 4, 4, 4, 5, 5, 7, 9","inputs":{"values":[2,4,4,4,5,5,7,9],"value":5,"percentile":90},"expected":{"percentile_rank":62.5,"count_below":4,"count_equal":2,"value_at_percentile":7.6,"count":8},"url":"https://tttkmbb.com/api/v1/calculate/percentile?values=2%2C4%2C4%2C4%2C5%2C5%2C7%2C9&value=5&percentile=90"}],"faq":[{"q":"Why does Excel give a different number?","a":"PERCENTILE.INC matches this calculator; PERCENTILE.EXC uses rank = p·(n + 1) and is undefined near the ends. Some textbooks use the nearest-rank method, which always returns an actual data value."},{"q":"How are ties handled in the percentile rank?","a":"Values equal to the query count as half below and half above, so the rank of the median of a symmetric data set is 50 %. A value below the minimum has rank 0 and above the maximum rank 100."}],"tags":["percentile","percentile rank","90th percentile","what percentile am i","quantile"],"related":[{"calculator_id":"descriptive-statistics","reason":"Quartiles, median and spread of the same data."},{"calculator_id":"z-score","reason":"Percentile under a normal distribution from mean and SD."}],"links":{"html":"https://tttkmbb.com/statistics/percentile","markdown":"https://tttkmbb.com/statistics/percentile.md","json":"https://tttkmbb.com/statistics/percentile.json","api":"https://tttkmbb.com/api/v1/calculate/percentile","schema":"https://tttkmbb.com/api/v1/calculators/percentile","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:24:37Z"}