[{"data":1,"prerenderedAt":636},["ShallowReactive",2],{"content-query-yzqzYPExpH":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"heading":10,"prompt":11,"tags":15,"files":17,"nav":6,"presets":18,"gallery":35,"body":37,"_type":629,"_id":630,"_source":631,"_file":632,"_stem":633,"_extension":634,"sitemap":635},"/tools/z-score-calculator","tools",false,"","Z-Score Calculator for Excel, CSV, or Typed Values","Calculate z-scores online from Excel, CSV, or manual values. Standardize observations, flag outliers, and compare to percentiles with AI.","Z-Score Calculator",{"prefix":12,"label":13,"placeholder":14},"Calculate z-scores","Describe the z-score calculation you want","e.g. compute z-scores for all countries' GDP per capita, flag values beyond ±2 as outliers",[16],"statistics",true,[19,25,30],{"label":20,"prompt":21,"dataset_url":22,"dataset_title":23,"dataset_citation":24},"GDP per capita outlier detection","compute z-scores for GDP per capita for all countries in the most recent year; flag countries with |z| > 2 as outliers; plot the distribution with z-score bands; list the top 5 and bottom 5 countries by z-score with their values","https://ourworldindata.org/grapher/gdp-per-capita-worldbank.csv","GDP per capita (World Bank)","Our World in Data",{"label":26,"prompt":27,"dataset_url":28,"dataset_title":29,"dataset_citation":24},"Life expectancy standardization","standardize life expectancy values by world region: compute z-scores within each region so countries can be compared relative to their region's mean; show which countries are most above or below their regional average; bar chart of top outliers","https://ourworldindata.org/grapher/life-expectancy.csv","Life expectancy",{"label":31,"prompt":32,"dataset_url":33,"dataset_title":34,"dataset_citation":24},"CO₂ emissions z-score ranking","compute z-scores for CO2 emissions per capita (log-transformed) for all countries; identify the most extreme emitters; plot a normal distribution with each country's z-score marked; compute the percentile rank for each country","https://ourworldindata.org/grapher/co-emissions-per-capita.csv","CO₂ emissions per capita",[36],"/img/tools/z-score-calculator.png",{"type":38,"children":39,"toc":620},"root",[40,49,77,89,108,114,180,186,342,348,452,458,487,493,517,548,579,603],{"type":41,"tag":42,"props":43,"children":45},"element","h2",{"id":44},"what-is-a-z-score",[46],{"type":47,"value":48},"text","What Is a Z-Score?",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53,55,61,63,68,70,75],{"type":47,"value":54},"A ",{"type":41,"tag":56,"props":57,"children":58},"strong",{},[59],{"type":47,"value":60},"z-score",{"type":47,"value":62}," (also called a ",{"type":41,"tag":56,"props":64,"children":65},{},[66],{"type":47,"value":67},"standard score",{"type":47,"value":69},") measures how many ",{"type":41,"tag":56,"props":71,"children":72},{},[73],{"type":47,"value":74},"standard deviations",{"type":47,"value":76}," a data point is from the mean of its distribution. The formula is simple: z = (x − μ) / σ, where x is the observation, μ is the mean, and σ is the standard deviation. A z-score of 0 means the value is exactly average; a z-score of +2 means the value is 2 standard deviations above average; a z-score of −1.5 means 1.5 standard deviations below.",{"type":41,"tag":50,"props":78,"children":79},{},[80,82,87],{"type":47,"value":81},"The power of z-scores is ",{"type":41,"tag":56,"props":83,"children":84},{},[85],{"type":47,"value":86},"standardization",{"type":47,"value":88}," — they let you compare values that come from different scales or distributions. A student who scored 85 on a history test (mean 70, std 10) has z = +1.5. Another student who scored 620 on a math exam (mean 500, std 100) also has z = +1.2. Without z-scores, comparing 85 to 620 is meaningless; with z-scores, you can see the history student performed relatively better. This cross-scale comparison is used everywhere: standardizing biomarker levels before combining them into a risk score, comparing country performance across indicators with different units, and scaling features before machine learning.",{"type":41,"tag":50,"props":90,"children":91},{},[92,94,99,101,106],{"type":47,"value":93},"Z-scores also directly encode ",{"type":41,"tag":56,"props":95,"children":96},{},[97],{"type":47,"value":98},"percentile rank",{"type":47,"value":100}," when the data is approximately normally distributed. A z-score of +1 corresponds to roughly the 84th percentile; +2 is the 97.7th percentile; −2 is the 2.3rd. This makes z-scores the standard tool for ",{"type":41,"tag":56,"props":102,"children":103},{},[104],{"type":47,"value":105},"outlier detection",{"type":47,"value":107},": observations with |z| > 2 are in the outer 5% of the distribution, and |z| > 3 are in the outer 0.3% — typically flagged as potential outliers worth investigating.",{"type":41,"tag":42,"props":109,"children":111},{"id":110},"how-it-works",[112],{"type":47,"value":113},"How It Works",{"type":41,"tag":115,"props":116,"children":117},"ol",{},[118,129,145],{"type":41,"tag":119,"props":120,"children":121},"li",{},[122,127],{"type":41,"tag":56,"props":123,"children":124},{},[125],{"type":47,"value":126},"Upload your data",{"type":47,"value":128}," — provide a CSV or Excel file with one or more numeric columns. One row per observation.",{"type":41,"tag":119,"props":130,"children":131},{},[132,137,139],{"type":41,"tag":56,"props":133,"children":134},{},[135],{"type":47,"value":136},"Describe what you want",{"type":47,"value":138}," — e.g. ",{"type":41,"tag":140,"props":141,"children":142},"em",{},[143],{"type":47,"value":144},"\"compute z-scores for GDP per capita, flag |z| > 2 as outliers, show the distribution\"",{"type":41,"tag":119,"props":146,"children":147},{},[148,153,155,162,164,170,172,178],{"type":41,"tag":56,"props":149,"children":150},{},[151],{"type":47,"value":152},"Get full results",{"type":47,"value":154}," — the AI writes Python code using ",{"type":41,"tag":156,"props":157,"children":159},"a",{"href":158},"https://pandas.pydata.org/",[160],{"type":47,"value":161},"pandas",{"type":47,"value":163}," and ",{"type":41,"tag":156,"props":165,"children":167},{"href":166},"https://scipy.org/",[168],{"type":47,"value":169},"scipy",{"type":47,"value":171}," to compute z-scores, percentiles, and outlier flags, and ",{"type":41,"tag":156,"props":173,"children":175},{"href":174},"https://plotly.com/python/",[176],{"type":47,"value":177},"Plotly",{"type":47,"value":179}," to visualize the distribution",{"type":41,"tag":42,"props":181,"children":183},{"id":182},"interpreting-the-results",[184],{"type":47,"value":185},"Interpreting the Results",{"type":41,"tag":187,"props":188,"children":189},"table",{},[190,209],{"type":41,"tag":191,"props":192,"children":193},"thead",{},[194],{"type":41,"tag":195,"props":196,"children":197},"tr",{},[198,204],{"type":41,"tag":199,"props":200,"children":201},"th",{},[202],{"type":47,"value":203},"Output",{"type":41,"tag":199,"props":205,"children":206},{},[207],{"type":47,"value":208},"What it means",{"type":41,"tag":210,"props":211,"children":212},"tbody",{},[213,230,246,262,278,294,310,326],{"type":41,"tag":195,"props":214,"children":215},{},[216,225],{"type":41,"tag":217,"props":218,"children":219},"td",{},[220],{"type":41,"tag":56,"props":221,"children":222},{},[223],{"type":47,"value":224},"z = 0",{"type":41,"tag":217,"props":226,"children":227},{},[228],{"type":47,"value":229},"Value equals the mean of the distribution",{"type":41,"tag":195,"props":231,"children":232},{},[233,241],{"type":41,"tag":217,"props":234,"children":235},{},[236],{"type":41,"tag":56,"props":237,"children":238},{},[239],{"type":47,"value":240},"z = +1",{"type":41,"tag":217,"props":242,"children":243},{},[244],{"type":47,"value":245},"Value is 1 standard deviation above the mean (~84th percentile)",{"type":41,"tag":195,"props":247,"children":248},{},[249,257],{"type":41,"tag":217,"props":250,"children":251},{},[252],{"type":41,"tag":56,"props":253,"children":254},{},[255],{"type":47,"value":256},"z = −1",{"type":41,"tag":217,"props":258,"children":259},{},[260],{"type":47,"value":261},"Value is 1 standard deviation below the mean (~16th percentile)",{"type":41,"tag":195,"props":263,"children":264},{},[265,273],{"type":41,"tag":217,"props":266,"children":267},{},[268],{"type":41,"tag":56,"props":269,"children":270},{},[271],{"type":47,"value":272},"z = +2",{"type":41,"tag":217,"props":274,"children":275},{},[276],{"type":47,"value":277},"~97.7th percentile — top 2.3% of the distribution",{"type":41,"tag":195,"props":279,"children":280},{},[281,289],{"type":41,"tag":217,"props":282,"children":283},{},[284],{"type":41,"tag":56,"props":285,"children":286},{},[287],{"type":47,"value":288},"z = −2",{"type":41,"tag":217,"props":290,"children":291},{},[292],{"type":47,"value":293},"~2.3rd percentile — bottom 2.3%",{"type":41,"tag":195,"props":295,"children":296},{},[297,305],{"type":41,"tag":217,"props":298,"children":299},{},[300],{"type":41,"tag":56,"props":301,"children":302},{},[303],{"type":47,"value":304},"|z| > 2",{"type":41,"tag":217,"props":306,"children":307},{},[308],{"type":47,"value":309},"Potential outlier — outside the central 95.4% of a normal distribution",{"type":41,"tag":195,"props":311,"children":312},{},[313,321],{"type":41,"tag":217,"props":314,"children":315},{},[316],{"type":41,"tag":56,"props":317,"children":318},{},[319],{"type":47,"value":320},"|z| > 3",{"type":41,"tag":217,"props":322,"children":323},{},[324],{"type":47,"value":325},"Strong outlier — outside the central 99.7%",{"type":41,"tag":195,"props":327,"children":328},{},[329,337],{"type":41,"tag":217,"props":330,"children":331},{},[332],{"type":41,"tag":56,"props":333,"children":334},{},[335],{"type":47,"value":336},"Percentile",{"type":41,"tag":217,"props":338,"children":339},{},[340],{"type":47,"value":341},"% of observations that fall below this value",{"type":41,"tag":42,"props":343,"children":345},{"id":344},"example-prompts",[346],{"type":47,"value":347},"Example Prompts",{"type":41,"tag":187,"props":349,"children":350},{},[351,367],{"type":41,"tag":191,"props":352,"children":353},{},[354],{"type":41,"tag":195,"props":355,"children":356},{},[357,362],{"type":41,"tag":199,"props":358,"children":359},{},[360],{"type":47,"value":361},"Scenario",{"type":41,"tag":199,"props":363,"children":364},{},[365],{"type":47,"value":366},"What to type",{"type":41,"tag":210,"props":368,"children":369},{},[370,383,401,418,435],{"type":41,"tag":195,"props":371,"children":372},{},[373,378],{"type":41,"tag":217,"props":374,"children":375},{},[376],{"type":47,"value":377},"Outlier detection",{"type":41,"tag":217,"props":379,"children":380},{},[381],{"type":47,"value":382},"`compute z-scores for all columns, flag observations with",{"type":41,"tag":195,"props":384,"children":385},{},[386,391],{"type":41,"tag":217,"props":387,"children":388},{},[389],{"type":47,"value":390},"Standardize for comparison",{"type":41,"tag":217,"props":392,"children":393},{},[394],{"type":41,"tag":395,"props":396,"children":398},"code",{"className":397},[],[399],{"type":47,"value":400},"z-score normalize all numeric columns so they're on the same scale for comparison",{"type":41,"tag":195,"props":402,"children":403},{},[404,409],{"type":41,"tag":217,"props":405,"children":406},{},[407],{"type":47,"value":408},"Within-group z-scores",{"type":41,"tag":217,"props":410,"children":411},{},[412],{"type":41,"tag":395,"props":413,"children":415},{"className":414},[],[416],{"type":47,"value":417},"compute z-scores within each country group so values are relative to regional mean",{"type":41,"tag":195,"props":419,"children":420},{},[421,426],{"type":41,"tag":217,"props":422,"children":423},{},[424],{"type":47,"value":425},"Percentile ranking",{"type":41,"tag":217,"props":427,"children":428},{},[429],{"type":41,"tag":395,"props":430,"children":432},{"className":431},[],[433],{"type":47,"value":434},"compute z-scores and percentile ranks for exam scores, show normal curve with each student marked",{"type":41,"tag":195,"props":436,"children":437},{},[438,443],{"type":41,"tag":217,"props":439,"children":440},{},[441],{"type":47,"value":442},"Single value lookup",{"type":41,"tag":217,"props":444,"children":445},{},[446],{"type":41,"tag":395,"props":447,"children":449},{"className":448},[],[450],{"type":47,"value":451},"what is the z-score and percentile for a value of 85 in a distribution with mean 72 and std 9?",{"type":41,"tag":42,"props":453,"children":455},{"id":454},"related-tools",[456],{"type":47,"value":457},"Related Tools",{"type":41,"tag":50,"props":459,"children":460},{},[461,463,469,471,477,479,485],{"type":47,"value":462},"Use the ",{"type":41,"tag":156,"props":464,"children":466},{"href":465},"/tools/exploratory-data-analysis-ai",[467],{"type":47,"value":468},"Exploratory Data Analysis tool",{"type":47,"value":470}," for a full distributional summary including z-scores, outlier flags, skewness, and kurtosis across all columns at once. Use the ",{"type":41,"tag":156,"props":472,"children":474},{"href":473},"/tools/qq-plot",[475],{"type":47,"value":476},"Q-Q Plot Generator",{"type":47,"value":478}," to check whether the distribution of z-scores is truly normal before relying on normal-distribution percentile tables. Use the ",{"type":41,"tag":156,"props":480,"children":482},{"href":481},"/tools/t-test",[483],{"type":47,"value":484},"Online t-test calculator",{"type":47,"value":486}," when you want to formally test whether the mean of a sample differs from a known population mean, using the z-score logic extended to sample statistics.",{"type":41,"tag":42,"props":488,"children":490},{"id":489},"frequently-asked-questions",[491],{"type":47,"value":492},"Frequently Asked Questions",{"type":41,"tag":50,"props":494,"children":495},{},[496,501,503,508,510,515],{"type":41,"tag":56,"props":497,"children":498},{},[499],{"type":47,"value":500},"Can I compute z-scores without uploading data — just a single value?",{"type":47,"value":502},"\nYes — describe the calculation in text: ",{"type":41,"tag":140,"props":504,"children":505},{},[506],{"type":47,"value":507},"\"what is the z-score for x=92, mean=78, std=11?\"",{"type":47,"value":509}," The AI will compute the z-score, the corresponding percentile, and explain what it means. You can also ask ",{"type":41,"tag":140,"props":511,"children":512},{},[513],{"type":47,"value":514},"\"what value corresponds to the 90th percentile if mean=78 and std=11?\"",{"type":47,"value":516}," to work backwards from a percentile.",{"type":41,"tag":50,"props":518,"children":519},{},[520,525,527,532,534,539,541,546],{"type":41,"tag":56,"props":521,"children":522},{},[523],{"type":47,"value":524},"My data is skewed — are z-scores still valid?",{"type":47,"value":526},"\nZ-scores can always be computed, but the ",{"type":41,"tag":56,"props":528,"children":529},{},[530],{"type":47,"value":531},"percentile interpretation",{"type":47,"value":533}," assumes approximate normality. For heavily skewed data (like income or CO₂ emissions), ask the AI to compute z-scores on the ",{"type":41,"tag":56,"props":535,"children":536},{},[537],{"type":47,"value":538},"log-transformed",{"type":47,"value":540}," values instead, which are usually much closer to normal. Alternatively, use ",{"type":41,"tag":56,"props":542,"children":543},{},[544],{"type":47,"value":545},"modified z-scores",{"type":47,"value":547}," based on the median and MAD (median absolute deviation) instead of mean and standard deviation — these are more robust to outliers.",{"type":41,"tag":50,"props":549,"children":550},{},[551,556,558,563,565,570,572,577],{"type":41,"tag":56,"props":552,"children":553},{},[554],{"type":47,"value":555},"What's the difference between a z-score and a t-score?",{"type":47,"value":557},"\nA z-score uses the ",{"type":41,"tag":140,"props":559,"children":560},{},[561],{"type":47,"value":562},"population",{"type":47,"value":564}," standard deviation σ and is appropriate when σ is known or the sample is very large (n > 30). A ",{"type":41,"tag":56,"props":566,"children":567},{},[568],{"type":47,"value":569},"t-score",{"type":47,"value":571}," uses the ",{"type":41,"tag":140,"props":573,"children":574},{},[575],{"type":47,"value":576},"sample",{"type":47,"value":578}," standard deviation s and a t-distribution with n−1 degrees of freedom — appropriate for small samples where σ is estimated. For standardizing data points within a dataset, z-scores are standard. For hypothesis testing with small samples, use t-scores.",{"type":41,"tag":50,"props":580,"children":581},{},[582,587,589,594,596,601],{"type":41,"tag":56,"props":583,"children":584},{},[585],{"type":47,"value":586},"Can I z-score within groups rather than the whole dataset?",{"type":47,"value":588},"\nYes — ask for ",{"type":41,"tag":140,"props":590,"children":591},{},[592],{"type":47,"value":593},"\"z-scores within each department\"",{"type":47,"value":595}," or ",{"type":41,"tag":140,"props":597,"children":598},{},[599],{"type":47,"value":600},"\"standardize within each country group\"",{"type":47,"value":602},". This produces group-relative z-scores, which answer \"how extreme is this value compared to its own group?\" rather than the whole dataset. This is useful when groups have different baselines and you want to compare within-group standing.",{"type":41,"tag":50,"props":604,"children":605},{},[606,611,613,618],{"type":41,"tag":56,"props":607,"children":608},{},[609],{"type":47,"value":610},"How do I use z-scores to combine multiple indicators into a composite score?",{"type":47,"value":612},"\nCompute z-scores for each indicator column (so they're all on the same scale), then average or weight the z-scores. Ask: ",{"type":41,"tag":140,"props":614,"children":615},{},[616],{"type":47,"value":617},"\"z-score normalize GDP, life expectancy, and education index, then compute a composite score as the average z-score per country\"",{"type":47,"value":619},". This is the basis of many human development and country ranking indices.",{"title":7,"searchDepth":621,"depth":621,"links":622},2,[623,624,625,626,627,628],{"id":44,"depth":621,"text":48},{"id":110,"depth":621,"text":113},{"id":182,"depth":621,"text":185},{"id":344,"depth":621,"text":347},{"id":454,"depth":621,"text":457},{"id":489,"depth":621,"text":492},"markdown","content:tools:029.z-score-calculator.md","content","tools/029.z-score-calculator.md","tools/029.z-score-calculator","md",{"loc":4},1775502471196]