{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"descriptive-statistics"},"result":{"entity_type":"calculator","id":"descriptive-statistics","calculator_id":"descriptive-statistics","canonical_url":"https://tttkmbb.com/statistics/descriptive-statistics","name":"Descriptive Statistics Calculator","title":"Descriptive Statistics Calculator – Mean, Median, Mode, Standard Deviation and Quartiles","category":"statistics","category_name":"Statistics & Probability","tool_name":"calculate_descriptive_statistics","featured_mcp_tool":true,"description":"Computes summary statistics for a list of numbers: count, sum, mean, median, mode, range, sample and population variance and standard deviation, standard error, coefficient of variation, quartiles (linear interpolation) and skewness.","use_when":"You have a set of numeric observations and need its central tendency, spread or quartiles, e.g. the standard deviation of a data set.","do_not_use_when":"You need a single percentile or the percentile rank of one value (use percentile), a standardised score (use z-score), or statistics of two paired variables (use correlation or linear-regression).","inputs":[{"name":"values","label":"Values","type":"number_list","required":true,"description":"The data set, as a list of numbers (comma-separated or JSON array). At least 2 values are needed for sample statistics.","example":[2,4,4,4,5,5,7,9]}],"outputs":[{"name":"count","label":"Count (n)","type":"integer","decimals":4,"description":"Number of values."},{"name":"sum","label":"Sum","type":"number","decimals":4,"description":"Sum of all values."},{"name":"mean","label":"Mean","type":"number","decimals":4,"description":"Arithmetic mean = sum / n."},{"name":"median","label":"Median","type":"number","decimals":4,"description":"Middle value of the sorted data (average of the two middle values when n is even)."},{"name":"mode","label":"Mode","type":"string","decimals":4,"description":"Most frequent value(s), comma-separated when several values tie; 'none' when no value repeats."},{"name":"mode_count","label":"Mode frequency","type":"integer","decimals":4,"description":"How many times the mode occurs."},{"name":"min","label":"Minimum","type":"number","decimals":4,"description":"Smallest value."},{"name":"max","label":"Maximum","type":"number","decimals":4,"description":"Largest value."},{"name":"range","label":"Range","type":"number","decimals":4,"description":"max − min."},{"name":"sample_variance","label":"Sample variance (s²)","type":"number","decimals":4,"description":"Σ(x − mean)² / (n − 1). Use when the data are a sample of a larger population (n ≥ 2)."},{"name":"sample_std_dev","label":"Sample standard deviation (s)","type":"number","decimals":4,"description":"√sample_variance (n ≥ 2)."},{"name":"population_variance","label":"Population variance (σ²)","type":"number","decimals":4,"description":"Σ(x − mean)² / n. Use when the data are the entire population."},{"name":"population_std_dev","label":"Population standard deviation (σ)","type":"number","decimals":4,"description":"√population_variance."},{"name":"standard_error","label":"Standard error of the mean","type":"number","decimals":4,"description":"s / √n (n ≥ 2)."},{"name":"coefficient_of_variation_percent","label":"Coefficient of variation","type":"number","unit":"%","decimals":2,"description":"100 × s / mean; only meaningful for ratio-scale data with a positive mean (omitted when the mean is 0)."},{"name":"q1","label":"First quartile (Q1)","type":"number","decimals":4,"description":"25th percentile by linear interpolation (Excel PERCENTILE.INC / R type 7)."},{"name":"q3","label":"Third quartile (Q3)","type":"number","decimals":4,"description":"75th percentile by the same method."},{"name":"iqr","label":"Interquartile range","type":"number","decimals":4,"description":"Q3 − Q1."},{"name":"skewness","label":"Skewness","type":"number","decimals":4,"description":"Adjusted Fisher-Pearson sample skewness G1 (same as Excel SKEW); requires n ≥ 3 and s > 0. Positive = right tail longer."}],"input_schema":{"type":"object","properties":{"values":{"description":"The data set, as a list of numbers (comma-separated or JSON array). At least 2 values are needed for sample statistics.","type":"array","items":{"type":"number"},"minItems":1,"examples":[[2,4,4,4,5,5,7,9]]}},"additionalProperties":false,"required":["values"]},"output_schema":{"type":"object","properties":{"count":{"description":"Number of values.","type":"integer"},"sum":{"description":"Sum of all values.","type":"number"},"mean":{"description":"Arithmetic mean = sum / n.","type":"number"},"median":{"description":"Middle value of the sorted data (average of the two middle values when n is even).","type":"number"},"mode":{"description":"Most frequent value(s), comma-separated when several values tie; 'none' when no value repeats.","type":"string"},"mode_count":{"description":"How many times the mode occurs.","type":"integer"},"min":{"description":"Smallest value.","type":"number"},"max":{"description":"Largest value.","type":"number"},"range":{"description":"max − min.","type":"number"},"sample_variance":{"description":"Σ(x − mean)² / (n − 1). Use when the data are a sample of a larger population (n ≥ 2).","type":"number"},"sample_std_dev":{"description":"√sample_variance (n ≥ 2).","type":"number"},"population_variance":{"description":"Σ(x − mean)² / n. Use when the data are the entire population.","type":"number"},"population_std_dev":{"description":"√population_variance.","type":"number"},"standard_error":{"description":"s / √n (n ≥ 2).","type":"number"},"coefficient_of_variation_percent":{"description":"100 × s / mean; only meaningful for ratio-scale data with a positive mean (omitted when the mean is 0). Unit: %.","type":"number","x-unit":"%"},"q1":{"description":"25th percentile by linear interpolation (Excel PERCENTILE.INC / R type 7).","type":"number"},"q3":{"description":"75th percentile by the same method.","type":"number"},"iqr":{"description":"Q3 − Q1.","type":"number"},"skewness":{"description":"Adjusted Fisher-Pearson sample skewness G1 (same as Excel SKEW); requires n ≥ 3 and s > 0. Positive = right tail longer.","type":"number"}}},"formula":"mean = Σx / n; sample_variance = Σ(x − mean)² / (n − 1); population_variance = Σ(x − mean)² / n; standard_error = s / √n; CV% = 100·s / mean; quartile at p: rank = p·(n − 1), value = x(⌊rank⌋) + (rank − ⌊rank⌋)·(x(⌊rank⌋+1) − x(⌊rank⌋)) on sorted data; skewness G1 = n / ((n − 1)(n − 2)) · Σ((x − mean) / s)³","method":"Quartiles use linear interpolation between order statistics (Hyndman & Fan type 7, the default in Excel PERCENTILE.INC, NumPy and R); other conventions (Tukey hinges, exclusive method) can give different Q1/Q3 for small samples. Sample statistics are omitted for n = 1.","sources":[{"name":"NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.1 Measures of Location","url":"https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm","type":"government","retrieved_at":"2026-09-23"},{"name":"NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.6 Measures of Scale","url":"https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm","type":"government","retrieved_at":"2026-09-23"},{"name":"NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.11 Measures of Skewness and Kurtosis","url":"https://www.itl.nist.gov/div898/handbook/eda/section3/eda35b.htm","type":"government","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":"2, 4, 4, 4, 5, 5, 7, 9","inputs":{"values":[2,4,4,4,5,5,7,9]},"expected":{"count":8,"sum":40,"mean":5,"median":4.5,"mode":"4","mode_count":3,"min":2,"max":9,"range":7,"sample_variance":4.5714,"sample_std_dev":2.1381,"population_variance":4,"population_std_dev":2,"standard_error":0.7559,"coefficient_of_variation_percent":42.76,"q1":4,"q3":5.5,"iqr":1.5,"skewness":0.8185},"url":"https://tttkmbb.com/api/v1/calculate/descriptive-statistics?values=2%2C4%2C4%2C4%2C5%2C5%2C7%2C9"},{"name":"4, 8, 15, 16, 23, 42","inputs":{"values":[4,8,15,16,23,42]},"expected":{"count":6,"mean":18,"median":15.5,"mode":"none","sample_std_dev":13.4907,"population_std_dev":12.3153,"q1":9.75,"q3":21.25,"iqr":11.5,"skewness":1.2426},"url":"https://tttkmbb.com/api/v1/calculate/descriptive-statistics?values=4%2C8%2C15%2C16%2C23%2C42"}],"faq":[{"q":"Sample or population standard deviation?","a":"Use the sample version (n − 1 denominator) when the values are a sample drawn from a larger population and you want to estimate its spread; use the population version (n denominator) when the values are the whole population of interest."},{"q":"Why do my quartiles differ from another tool?","a":"There are several quartile conventions. This calculator uses linear interpolation (Excel PERCENTILE.INC, R type 7); Excel QUARTILE.EXC, Minitab and the Tukey hinge method interpolate differently and can differ for small n."},{"q":"What does the coefficient of variation mean?","a":"It is the standard deviation as a percentage of the mean, allowing spread to be compared between data sets with different units or scales; it is not meaningful when the mean is near zero or negative."}],"tags":["standard deviation","mean median mode","variance","descriptive statistics","quartiles","summary statistics"],"related":[{"calculator_id":"percentile","reason":"Find any percentile or the percentile rank of a value in the same data."},{"calculator_id":"z-score","reason":"Standardise a single value using the mean and standard deviation."},{"calculator_id":"confidence-interval","reason":"Turn the mean and standard deviation into a confidence interval for the population mean."}],"links":{"html":"https://tttkmbb.com/statistics/descriptive-statistics","markdown":"https://tttkmbb.com/statistics/descriptive-statistics.md","json":"https://tttkmbb.com/statistics/descriptive-statistics.json","api":"https://tttkmbb.com/api/v1/calculate/descriptive-statistics","schema":"https://tttkmbb.com/api/v1/calculators/descriptive-statistics","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:24:37Z"}