[{"data":1,"prerenderedAt":730},["ShallowReactive",2],{"content-query-6QNGfWYlGF":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"heading":10,"prompt":11,"tags":15,"files":18,"nav":6,"presets":19,"gallery":37,"body":39,"_type":723,"_id":724,"_source":725,"_file":726,"_stem":727,"_extension":728,"sitemap":729},"/tools/ai-box-plot","tools",false,"","Box Plot Generator for Excel & CSV","Create box plots online from Excel and CSV data. Compare medians, quartiles, spread, and outliers with AI.","Box Plot Generator",{"prefix":12,"label":13,"placeholder":14},"Generate a box plot","Describe the box plot you want to generate","e.g. box plot of salary by department, show outliers and mean",[16,17],"charts","statistics",true,[20,26,32],{"label":21,"prompt":22,"dataset_url":23,"dataset_title":24,"dataset_citation":25},"Salary by income group","box plot of GDP per capita by World Bank income group, show outliers, log scale on y-axis","https://api.worldbank.org/v2/en/indicator/NY.GDP.PCAP.CD?downloadformat=excel","GDP per capita (current US$)","World Bank",{"label":27,"prompt":28,"dataset_url":29,"dataset_title":30,"dataset_citation":31},"Life expectancy by region","box plot of life expectancy by region for the most recent year, color each region, show mean as dashed line","https://ourworldindata.org/grapher/life-expectancy.csv","Life expectancy","Our World in Data",{"label":33,"prompt":34,"dataset_url":35,"dataset_title":36,"dataset_citation":31},"CO₂ emissions by income group","box plot of CO2 emissions per capita by World Bank income group, show outliers, annotate median values","https://ourworldindata.org/grapher/co-emissions-per-capita.csv","CO₂ emissions per capita",[38],"/img/tools/box-plot.png",{"type":40,"children":41,"toc":713},"root",[42,51,112,117,129,135,223,229,401,407,514,520,613,626,632,660,666,676,686,696],{"type":43,"tag":44,"props":45,"children":47},"element","h2",{"id":46},"what-is-a-box-plot",[48],{"type":49,"value":50},"text","What Is a Box Plot?",{"type":43,"tag":52,"props":53,"children":54},"p",{},[55,57,63,65,70,72,77,78,83,84,89,91,96,98,103,105,110],{"type":49,"value":56},"A ",{"type":43,"tag":58,"props":59,"children":60},"strong",{},[61],{"type":49,"value":62},"box plot",{"type":49,"value":64}," (also called a box-and-whisker plot) is a compact chart that summarises a distribution using five numbers: the ",{"type":43,"tag":58,"props":66,"children":67},{},[68],{"type":49,"value":69},"minimum",{"type":49,"value":71},", ",{"type":43,"tag":58,"props":73,"children":74},{},[75],{"type":49,"value":76},"first quartile (Q1)",{"type":49,"value":71},{"type":43,"tag":58,"props":79,"children":80},{},[81],{"type":49,"value":82},"median",{"type":49,"value":71},{"type":43,"tag":58,"props":85,"children":86},{},[87],{"type":49,"value":88},"third quartile (Q3)",{"type":49,"value":90},", and ",{"type":43,"tag":58,"props":92,"children":93},{},[94],{"type":49,"value":95},"maximum",{"type":49,"value":97},". The rectangle (the \"box\") spans from Q1 to Q3, enclosing the ",{"type":43,"tag":58,"props":99,"children":100},{},[101],{"type":49,"value":102},"interquartile range (IQR)",{"type":49,"value":104}," — the middle 50% of the data. A line inside the box marks the median, and \"whiskers\" extend to the furthest points within 1.5× the IQR. Any values beyond the whiskers are plotted individually as ",{"type":43,"tag":58,"props":106,"children":107},{},[108],{"type":49,"value":109},"outliers",{"type":49,"value":111},".",{"type":43,"tag":52,"props":113,"children":114},{},[115],{"type":49,"value":116},"Box plots were designed for comparison. Placing several side by side immediately reveals which groups have higher medians, wider spreads, or unusual outliers — something that is much harder to read from a table. A common real-world use: an HR analyst comparing salary distributions across departments to identify pay equity issues, or a medical researcher comparing patient biomarker levels across treatment arms.",{"type":43,"tag":52,"props":118,"children":119},{},[120,122,127],{"type":49,"value":121},"Because they summarise data into just a few statistics, box plots work well even with ",{"type":43,"tag":58,"props":123,"children":124},{},[125],{"type":49,"value":126},"large datasets",{"type":49,"value":128}," where individual data points would be too dense to plot. For smaller samples (under ~30 per group) it is often worth overlaying the raw points so viewers can judge the density directly.",{"type":43,"tag":44,"props":130,"children":132},{"id":131},"how-it-works",[133],{"type":49,"value":134},"How It Works",{"type":43,"tag":136,"props":137,"children":138},"ol",{},[139,180,196],{"type":43,"tag":140,"props":141,"children":142},"li",{},[143,148,150,157,158,164,165,171,172,178],{"type":43,"tag":58,"props":144,"children":145},{},[146],{"type":49,"value":147},"Upload your data",{"type":49,"value":149}," — provide a CSV or Excel file with at least one numeric column and one categorical column to group by (e.g. ",{"type":43,"tag":151,"props":152,"children":154},"code",{"className":153},[],[155],{"type":49,"value":156},"department",{"type":49,"value":71},{"type":43,"tag":151,"props":159,"children":161},{"className":160},[],[162],{"type":49,"value":163},"region",{"type":49,"value":71},{"type":43,"tag":151,"props":166,"children":168},{"className":167},[],[169],{"type":49,"value":170},"treatment",{"type":49,"value":71},{"type":43,"tag":151,"props":173,"children":175},{"className":174},[],[176],{"type":49,"value":177},"category",{"type":49,"value":179},")",{"type":43,"tag":140,"props":181,"children":182},{},[183,188,190],{"type":43,"tag":58,"props":184,"children":185},{},[186],{"type":49,"value":187},"Describe the plot",{"type":49,"value":189}," — e.g. ",{"type":43,"tag":191,"props":192,"children":193},"em",{},[194],{"type":49,"value":195},"\"box plot of test scores by school type, show the mean and label outliers\"",{"type":43,"tag":140,"props":197,"children":198},{},[199,204,206,213,215,221],{"type":43,"tag":58,"props":200,"children":201},{},[202],{"type":49,"value":203},"Get the visualization",{"type":49,"value":205}," — the AI writes Python code using ",{"type":43,"tag":207,"props":208,"children":210},"a",{"href":209},"https://plotly.com/python/box-plots/",[211],{"type":49,"value":212},"Plotly",{"type":49,"value":214}," or ",{"type":43,"tag":207,"props":216,"children":218},{"href":217},"https://seaborn.pydata.org/generated/seaborn.boxplot.html",[219],{"type":49,"value":220},"seaborn",{"type":49,"value":222}," to build and style the chart",{"type":43,"tag":44,"props":224,"children":226},{"id":225},"interpreting-the-results",[227],{"type":49,"value":228},"Interpreting the Results",{"type":43,"tag":230,"props":231,"children":232},"table",{},[233,252],{"type":43,"tag":234,"props":235,"children":236},"thead",{},[237],{"type":43,"tag":238,"props":239,"children":240},"tr",{},[241,247],{"type":43,"tag":242,"props":243,"children":244},"th",{},[245],{"type":49,"value":246},"Visual element",{"type":43,"tag":242,"props":248,"children":249},{},[250],{"type":49,"value":251},"What it means",{"type":43,"tag":253,"props":254,"children":255},"tbody",{},[256,273,289,305,321,337,353,369,385],{"type":43,"tag":238,"props":257,"children":258},{},[259,268],{"type":43,"tag":260,"props":261,"children":262},"td",{},[263],{"type":43,"tag":58,"props":264,"children":265},{},[266],{"type":49,"value":267},"Box (IQR)",{"type":43,"tag":260,"props":269,"children":270},{},[271],{"type":49,"value":272},"Middle 50% of observations — Q1 to Q3",{"type":43,"tag":238,"props":274,"children":275},{},[276,284],{"type":43,"tag":260,"props":277,"children":278},{},[279],{"type":43,"tag":58,"props":280,"children":281},{},[282],{"type":49,"value":283},"Line inside box",{"type":43,"tag":260,"props":285,"children":286},{},[287],{"type":49,"value":288},"Median (50th percentile)",{"type":43,"tag":238,"props":290,"children":291},{},[292,300],{"type":43,"tag":260,"props":293,"children":294},{},[295],{"type":43,"tag":58,"props":296,"children":297},{},[298],{"type":49,"value":299},"Dashed line inside box",{"type":43,"tag":260,"props":301,"children":302},{},[303],{"type":49,"value":304},"Mean (when shown) — distance from median reveals skew",{"type":43,"tag":238,"props":306,"children":307},{},[308,316],{"type":43,"tag":260,"props":309,"children":310},{},[311],{"type":43,"tag":58,"props":312,"children":313},{},[314],{"type":49,"value":315},"Whiskers",{"type":43,"tag":260,"props":317,"children":318},{},[319],{"type":49,"value":320},"Extend to the last data point within 1.5× IQR from the box edge",{"type":43,"tag":238,"props":322,"children":323},{},[324,332],{"type":43,"tag":260,"props":325,"children":326},{},[327],{"type":43,"tag":58,"props":328,"children":329},{},[330],{"type":49,"value":331},"Individual dots beyond whiskers",{"type":43,"tag":260,"props":333,"children":334},{},[335],{"type":49,"value":336},"Outliers — values unusually far from the bulk of the data",{"type":43,"tag":238,"props":338,"children":339},{},[340,348],{"type":43,"tag":260,"props":341,"children":342},{},[343],{"type":43,"tag":58,"props":344,"children":345},{},[346],{"type":49,"value":347},"Tall narrow box",{"type":43,"tag":260,"props":349,"children":350},{},[351],{"type":49,"value":352},"Low variance — values are clustered near the median",{"type":43,"tag":238,"props":354,"children":355},{},[356,364],{"type":43,"tag":260,"props":357,"children":358},{},[359],{"type":43,"tag":58,"props":360,"children":361},{},[362],{"type":49,"value":363},"Wide box",{"type":43,"tag":260,"props":365,"children":366},{},[367],{"type":49,"value":368},"High variance — values are spread out",{"type":43,"tag":238,"props":370,"children":371},{},[372,380],{"type":43,"tag":260,"props":373,"children":374},{},[375],{"type":43,"tag":58,"props":376,"children":377},{},[378],{"type":49,"value":379},"Median near Q1",{"type":43,"tag":260,"props":381,"children":382},{},[383],{"type":49,"value":384},"Right-skewed distribution (long upper tail)",{"type":43,"tag":238,"props":386,"children":387},{},[388,396],{"type":43,"tag":260,"props":389,"children":390},{},[391],{"type":43,"tag":58,"props":392,"children":393},{},[394],{"type":49,"value":395},"Median near Q3",{"type":43,"tag":260,"props":397,"children":398},{},[399],{"type":49,"value":400},"Left-skewed distribution (long lower tail)",{"type":43,"tag":44,"props":402,"children":404},{"id":403},"example-prompts",[405],{"type":49,"value":406},"Example Prompts",{"type":43,"tag":230,"props":408,"children":409},{},[410,426],{"type":43,"tag":234,"props":411,"children":412},{},[413],{"type":43,"tag":238,"props":414,"children":415},{},[416,421],{"type":43,"tag":242,"props":417,"children":418},{},[419],{"type":49,"value":420},"Scenario",{"type":43,"tag":242,"props":422,"children":423},{},[424],{"type":49,"value":425},"What to type",{"type":43,"tag":253,"props":427,"children":428},{},[429,446,463,480,497],{"type":43,"tag":238,"props":430,"children":431},{},[432,437],{"type":43,"tag":260,"props":433,"children":434},{},[435],{"type":49,"value":436},"Department salary comparison",{"type":43,"tag":260,"props":438,"children":439},{},[440],{"type":43,"tag":151,"props":441,"children":443},{"className":442},[],[444],{"type":49,"value":445},"box plot of salary by department, color by department, show outliers",{"type":43,"tag":238,"props":447,"children":448},{},[449,454],{"type":43,"tag":260,"props":450,"children":451},{},[452],{"type":49,"value":453},"Clinical trial",{"type":43,"tag":260,"props":455,"children":456},{},[457],{"type":43,"tag":151,"props":458,"children":460},{"className":459},[],[461],{"type":49,"value":462},"box plot of blood pressure by treatment group, show individual patients as dots",{"type":43,"tag":238,"props":464,"children":465},{},[466,471],{"type":43,"tag":260,"props":467,"children":468},{},[469],{"type":49,"value":470},"Academic performance",{"type":43,"tag":260,"props":472,"children":473},{},[474],{"type":43,"tag":151,"props":475,"children":477},{"className":476},[],[478],{"type":49,"value":479},"box plot of exam scores by school, horizontal orientation, sort by median",{"type":43,"tag":238,"props":481,"children":482},{},[483,488],{"type":43,"tag":260,"props":484,"children":485},{},[486],{"type":49,"value":487},"Financial returns",{"type":43,"tag":260,"props":489,"children":490},{},[491],{"type":43,"tag":151,"props":492,"children":494},{"className":493},[],[495],{"type":49,"value":496},"box plot of monthly returns by asset class, log scale",{"type":43,"tag":238,"props":498,"children":499},{},[500,505],{"type":43,"tag":260,"props":501,"children":502},{},[503],{"type":49,"value":504},"Survey data",{"type":43,"tag":260,"props":506,"children":507},{},[508],{"type":43,"tag":151,"props":509,"children":511},{"className":510},[],[512],{"type":49,"value":513},"box plot of customer satisfaction score by product line, annotate median",{"type":43,"tag":44,"props":515,"children":517},{"id":516},"box-plot-vs-violin-plot-vs-histogram",[518],{"type":49,"value":519},"Box Plot vs. Violin Plot vs. Histogram",{"type":43,"tag":230,"props":521,"children":522},{},[523,539],{"type":43,"tag":234,"props":524,"children":525},{},[526],{"type":43,"tag":238,"props":527,"children":528},{},[529,534],{"type":43,"tag":242,"props":530,"children":531},{},[532],{"type":49,"value":533},"Chart",{"type":43,"tag":242,"props":535,"children":536},{},[537],{"type":49,"value":538},"Best for",{"type":43,"tag":253,"props":540,"children":541},{},[542,558,581,597],{"type":43,"tag":238,"props":543,"children":544},{},[545,553],{"type":43,"tag":260,"props":546,"children":547},{},[548],{"type":43,"tag":58,"props":549,"children":550},{},[551],{"type":49,"value":552},"Box plot",{"type":43,"tag":260,"props":554,"children":555},{},[556],{"type":49,"value":557},"Comparing many groups quickly; outlier detection; large datasets",{"type":43,"tag":238,"props":559,"children":560},{},[561,569],{"type":43,"tag":260,"props":562,"children":563},{},[564],{"type":43,"tag":58,"props":565,"children":566},{},[567],{"type":49,"value":568},"Violin plot",{"type":43,"tag":260,"props":570,"children":571},{},[572,574,579],{"type":49,"value":573},"Comparing distribution ",{"type":43,"tag":191,"props":575,"children":576},{},[577],{"type":49,"value":578},"shape",{"type":49,"value":580}," (bimodal, skewed) across a few groups",{"type":43,"tag":238,"props":582,"children":583},{},[584,592],{"type":43,"tag":260,"props":585,"children":586},{},[587],{"type":43,"tag":58,"props":588,"children":589},{},[590],{"type":49,"value":591},"Histogram",{"type":43,"tag":260,"props":593,"children":594},{},[595],{"type":49,"value":596},"Showing one group's distribution in detail",{"type":43,"tag":238,"props":598,"children":599},{},[600,608],{"type":43,"tag":260,"props":601,"children":602},{},[603],{"type":43,"tag":58,"props":604,"children":605},{},[606],{"type":49,"value":607},"Strip / swarm plot",{"type":43,"tag":260,"props":609,"children":610},{},[611],{"type":49,"value":612},"Small samples where every point should be visible",{"type":43,"tag":52,"props":614,"children":615},{},[616,618,624],{"type":49,"value":617},"Choose a box plot when you have more than ~6 groups to compare, or when outlier detection is the primary goal. Switch to a ",{"type":43,"tag":207,"props":619,"children":621},{"href":620},"/tools/ai-violin-plot",[622],{"type":49,"value":623},"violin plot",{"type":49,"value":625}," when distribution shape matters more than outlier identification.",{"type":43,"tag":44,"props":627,"children":629},{"id":628},"related-tools",[630],{"type":49,"value":631},"Related Tools",{"type":43,"tag":52,"props":633,"children":634},{},[635,637,643,645,651,653,658],{"type":49,"value":636},"Use the ",{"type":43,"tag":207,"props":638,"children":640},{"href":639},"/tools/t-test",[641],{"type":49,"value":642},"Online t-test calculator",{"type":49,"value":644}," to test whether two groups differ significantly, or the ",{"type":43,"tag":207,"props":646,"children":648},{"href":647},"/tools/one-way-anova",[649],{"type":49,"value":650},"ANOVA calculator",{"type":49,"value":652}," to compare three or more groups. Use the ",{"type":43,"tag":207,"props":654,"children":655},{"href":620},[656],{"type":49,"value":657},"AI Violin Plot Generator",{"type":49,"value":659}," when you want to see the full distribution shape alongside the summary statistics.",{"type":43,"tag":44,"props":661,"children":663},{"id":662},"frequently-asked-questions",[664],{"type":49,"value":665},"Frequently Asked Questions",{"type":43,"tag":52,"props":667,"children":668},{},[669,674],{"type":43,"tag":58,"props":670,"children":671},{},[672],{"type":49,"value":673},"Why do some points appear beyond the whiskers — are they errors?",{"type":49,"value":675},"\nNot necessarily. Outliers are simply values more than 1.5× the IQR beyond the box. They may be genuine extreme values, data entry errors, or members of a distinct sub-population. Ask the AI to label outliers with their row identifiers so you can investigate them.",{"type":43,"tag":52,"props":677,"children":678},{},[679,684],{"type":43,"tag":58,"props":680,"children":681},{},[682],{"type":49,"value":683},"Can I show a notched box plot?",{"type":49,"value":685},"\nYes — ask for a \"notched box plot\". The notches represent a 95% confidence interval around the median. If the notches of two boxes do not overlap, the medians are significantly different at roughly the 5% level.",{"type":43,"tag":52,"props":687,"children":688},{},[689,694],{"type":43,"tag":58,"props":690,"children":691},{},[692],{"type":49,"value":693},"How do I sort the boxes by median?",{"type":49,"value":695},"\nInclude \"sort by median\" or \"order boxes from lowest to highest median\" in your prompt. The AI will reorder the categorical axis accordingly.",{"type":43,"tag":52,"props":697,"children":698},{},[699,704,706,711],{"type":43,"tag":58,"props":700,"children":701},{},[702],{"type":49,"value":703},"My data has many groups — the chart is too wide. What should I do?",{"type":49,"value":705},"\nAsk for a ",{"type":43,"tag":58,"props":707,"children":708},{},[709],{"type":49,"value":710},"horizontal box plot",{"type":49,"value":712}," — it reads more naturally when there are many categories. You can also ask the AI to filter to the top N groups by count or median.",{"title":7,"searchDepth":714,"depth":714,"links":715},2,[716,717,718,719,720,721,722],{"id":46,"depth":714,"text":50},{"id":131,"depth":714,"text":134},{"id":225,"depth":714,"text":228},{"id":403,"depth":714,"text":406},{"id":516,"depth":714,"text":519},{"id":628,"depth":714,"text":631},{"id":662,"depth":714,"text":665},"markdown","content:tools:010.ai-box-plot.md","content","tools/010.ai-box-plot.md","tools/010.ai-box-plot","md",{"loc":4},1775502471196]