Skip to main content

How to Make a Box Plot on Desmos

Build box plots, dot plots and histograms

By JasonPublished 6 min read

A student lines up wooden crates of different heights in a school gym.

To make a box plot on Desmos, enter your data as a list, such as L = [5, 9, 6, 14, 8, 6, 15], then type boxplot(L). For a dot plot or histogram, use the same list and type dotplot(L) or histogram(L). Try the entries in our free Desmos calculator, then practice with Desmos Skills training.

Enter the data

A list holds the data inside square brackets, with commas between values. Name it so you can use it in more than one expression.

  1. On an expression line, type L = [5, 9, 6, 14, 8, 6, 15].
  2. Keep repeated values: the two 6s represent two observations.
  3. On a new line, use L inside the plot function you want.

The data do not need to be in order. Here the ordered values are 5,6,6,8,9,14,15. There are seven observations, even though only six distinct numbers appear.

You can also use a table. Click the plus button, choose a table, and enter or paste a column of numbers under x_1. That column is a list, so type boxplot(x_1) on an expression line to plot it. Use the actual column name shown in your table; another table can have a different number in its column name. The list and the table are two ways to supply the same data.

Make and read a box plot

  1. Enter L = [5, 9, 6, 14, 8, 6, 15].
  2. On the next line, type boxplot(L).
  3. Read the five-number summary against the x-axis: the ends of the whiskers are the minimum and maximum, the edges of the box are the first and third quartiles, and the line inside the box is the median.

For this list, the minimum is 5 and the maximum is 15. The box runs from the first quartile, 6, to the third quartile, 14. The line inside the box marks the median, 8. The whiskers extend from the box to 5 and 15.

Check the middle three values on separate lines: quartile(L,1) gives 6, median(L) gives 8, and quartile(L,3) gives 14. The first and third quartiles mark the ends of the middle half of the data. Their difference, 14−6=8, is the interquartile range.

A box plot summarizes the data; it does not show every observation. You cannot find the exact mean from the five-number summary alone. For the calculations behind these measures, see Desmos for SAT statistics.

Make a dot plot

  1. Enter the same list, L = [5, 9, 6, 14, 8, 6, 15].
  2. On a new line, type dotplot(L).
  3. Count the dots above a number to see how many observations have that value.

There are two dots above 6 and one above each of 5,8,9,14, and 15. The plot shows all seven observations. Unlike the box plot, it lets you recover each value by counting dots, which is useful when a question asks for a mean.

Common mistake

The number on the horizontal axis is the value; the number of dots above it is the frequency. Two dots above 6 mean two observations of 6, not six observations of 2.

Make a histogram

A histogram groups values into intervals called bins. To set a bin width of 5:

  1. Enter L = [5, 9, 6, 14, 8, 6, 15].
  2. Type histogram(L, 5) on a new line. The second input sets the bin width.
  3. Read each bar's horizontal interval and its height. The height counts observations in that interval.

The 5-to-10 bin contains 5,6,6,8, and 9, so its count is 5. The 10-to-15 bin contains 14, and the 15-to-20 bin contains 15. A boundary value goes in the bin that starts at that value: 15 belongs in the 15-to-20 bin. Changing the width changes the grouping, not the underlying data.

A histogram gives counts for intervals, not the individual values inside each interval. If you only have the histogram, do not treat a bar's midpoint as the exact value of every observation.

Compare two data sets

Use the same scale and compare center and spread. Try these two lists:

  • A = [10, 11, 12, 13, 14]
  • B = [4, 8, 12, 16, 20]

Both medians are 12. Set A has range 14−10=4; set B has range 20−4=16. The values of B are farther from their mean of 12, so B also has the larger standard deviation.

Enter both lists and type boxplot(A) and boxplot(B) on separate lines. If the plots overlap, click the colored circle beside an expression to hide it and compare the other plot on the same scale. You can also enter median(A), median(B), max(A)-min(A), and max(B)-min(B) to check the numbers.

Range uses only the smallest and largest values; standard deviation considers distances from the mean across the whole set. A larger range alone does not settle every standard deviation comparison. See SAT standard deviation for the reasoning, and Desmos statistics for the calculator functions.

Use plots on SAT questions

The SAT gives you plots and asks about measures such as median and range or which set has the larger standard deviation. Read the labels and the question first: a box plot gives the median and endpoints directly, while a dot plot gives the individual values and their counts.

To rebuild a small dot plot, repeat each value once for each dot. For example, two dots at 2, three at 4, and one at 7 give D = [2, 2, 4, 4, 4, 7]. Type mean(D) to get 23/6, or about 3.833, and median(D) to get 4. For larger counts, enter values and frequencies in a table and use repeat as shown in the statistics guide.

For more practice reading and comparing data, see SAT statistics questions and key Desmos features.

Practice with SAT-style questions

Practice question · Frequency Tables

Show the Detailed Explanation

Find the median position in each team: 10/2+1/2=5.5, so average the fifth and sixth scores for X; 13/2+1/2=7, so use the seventh score for Y. Counting cumulative frequencies gives X's fifth score as 6 and sixth as 7, so its median is 6.5. Y's seventh score is 7. The positive difference is 7−6.5=0.5.

Practice question · Frequency Tables

Show the Detailed Explanation

The mean is the sum of value times frequency divided by the sum of frequencies: 10(6)+20(15)+30(8)+40(10)+50(3)42=115042≈27.38. The median position is 42/2+1/2=21.5. Cumulative counts put the 21st value at 20 and the 22nd at 30, so the median is 25. The mean is approximately 2 more: choice A.

Practice these methods in frequency tables topic training and box plots topic training.

Plots in Desmos

  • Enter the observations in a list, including repeats, or use a table column.
  • Type boxplot(L), dotplot(L), or histogram(L, 5) for a histogram with width 5.
  • Read the five-number summary from a box plot; count individual values in a dot plot; read interval counts in a histogram.
  • Compare center and spread on the same scale, and use the data rather than range alone to compare standard deviations.

Tutor? Use Resolve Prep with your students