Skip to content
Statistics

Box Plot Calculator

Paste or type your numbers below, separated by commas or spaces, and the calculator will find the five-number summary (minimum, lower quartile Q1, median, upper quartile Q3, maximum), the interquartile range, and any outliers flagged by the 1.5 x IQR rule. Results update as you type. You can also see the step-by-step working for any dataset.

Your details

Enter numbers separated by commas, spaces, or new lines. At least 4 values required.
Inclusive (Tukey hinges) includes the median in both halves when n is odd. Exclusive excludes it. Both are widely used; the results are usually close.
Median (Q2)Moderate spread
18

Middle value of the sorted dataset

Lower quartile (Q1)11
Upper quartile (Q3)29
Interquartile range (IQR)18
Minimum4
Maximum45
Lower fence-16
Upper fence56
Lower whisker4
Upper whisker45
OutliersNone
n (sample size)9
Range41
Min4
Q111
Median18
Q329
Max45

Median is 18.0000, IQR is 18.0000.

  • The middle 50% of values (IQR) spans 18.0000, from 11.0000 to 29.0000.
  • The median of 18.0000 is offset toward the right (upper tail is longer).
  • No outliers detected by the 1.5 x IQR rule. All values lie within the whisker fences.
  • The full range of the dataset is 41.0000, with 9 values from 4 to 45.

Next stepA box plot is a compact 5-number summary. For a full picture of shape and modality, also check a histogram or density plot of the same data.

What is a box plot?

A box plot, also called a box-and-whisker plot, is a compact graphic that shows the shape of a distribution using just five numbers: the minimum, the lower quartile (Q1), the median (Q2), the upper quartile (Q3), and the maximum. The rectangular box spans from Q1 to Q3, a horizontal line inside the box marks the median, and the whiskers extend outward to the most extreme non-outlier values. Individual points beyond the whisker ends are plotted separately as outliers. This format makes it easy to see where the data are concentrated, whether the distribution is skewed, and whether any unusual values lie at the fringes.

How to calculate the five-number summary

First, sort your values from smallest to largest. The minimum and maximum are simply the first and last values. The median is the middle value (or the average of the two middle values for an even-count dataset). Q1 is the median of the lower half of the data, and Q3 is the median of the upper half. For example, with 9 sorted values {4, 7, 11, 15, 18, 23, 27, 31, 45}: the median is the 5th value, 18. The lower half is {4, 7, 11, 15}, so Q1 = (7+11)/2 = 9. The upper half is {23, 27, 31, 45}, so Q3 = (27+31)/2 = 29. IQR = 29 - 9 = 20. Fences are 9 - 30 = -21 (lower) and 29 + 30 = 59 (upper), so 45 is not an outlier.

IQR and the 1.5 x IQR outlier rule

The interquartile range (IQR) is Q3 minus Q1 and describes the spread of the central 50% of the data. It is far more resistant to extreme values than the full range. John Tukey introduced the widely used outlier rule: a value is flagged as a potential outlier if it falls below Q1 - 1.5 x IQR (the lower fence) or above Q3 + 1.5 x IQR (the upper fence). In a normal distribution, only about 0.7% of values exceed these fences. A stricter variant, the 3 x IQR rule (sometimes called "far outliers"), uses the same structure but with a multiplier of 3 instead of 1.5.

Inclusive vs exclusive quartile methods

Different software packages use slightly different formulas for Q1 and Q3, which can produce different results from the same data. The inclusive method (Tukey hinges), used in R's default boxplot() and most statistics textbooks, includes the median value in both halves when the count is odd. The exclusive method, used in Excel's QUARTILE.EXC and SPSS, excludes the median from both halves. For large datasets the two methods produce nearly identical results; differences are most noticeable with small samples (n < 20). If you need to match a specific tool, select the corresponding method from the dropdown above.

Box plot anatomy

ComponentFormulaMeaning
MinimumSmallest value (or lower whisker)Start of the data range
Q1 (25th percentile)Median of the lower half25% of values fall below this
Median (Q2)Middle value of all data50% of values fall below this
Q3 (75th percentile)Median of the upper half75% of values fall below this
MaximumLargest value (or upper whisker)End of the data range
IQRQ3 - Q1Spread of the middle 50% of data
Lower fenceQ1 - 1.5 x IQRValues below this are potential outliers
Upper fenceQ3 + 1.5 x IQRValues above this are potential outliers

The five key values in a box-and-whisker plot and what they represent.

Frequently asked questions

How many data points do I need for a box plot?

You need at least 4 values to produce a meaningful five-number summary and box plot. With fewer than 4 values, Q1 and Q3 cannot be calculated reliably. In practice, a box plot becomes informative and stable with around 10 or more observations; with very small samples a dot plot or stem-and-leaf plot often communicates more clearly.

What is the difference between Q1 and the 25th percentile?

They refer to the same concept: the value below which 25% of the data falls. The terminology differs between textbooks. Q1, Q2, and Q3 are the 1st, 2nd, and 3rd quartiles and correspond to the 25th, 50th, and 75th percentiles respectively. Different algorithms for computing them can give slightly different numerical results from the same dataset.

What does a long whisker on one side mean?

A whisker that is noticeably longer on one side than the other indicates skewness. A longer upper whisker (and often a median closer to Q1 than to Q3) suggests right skew, meaning a few high values pull the tail upward. A longer lower whisker suggests left skew. When the median sits in the middle of the box and the whiskers are roughly equal in length, the distribution is approximately symmetric.

Are the flagged outliers definitely wrong data points?

Not necessarily. The 1.5 x IQR rule flags values as potential outliers, meaning they are unusually far from the bulk of the data. They could be legitimate extreme values, data entry errors, or values from a different subpopulation. Each flagged point needs domain knowledge to decide whether to keep, investigate, or remove it. Removing values simply because they are extreme can introduce bias.

Why do different software tools give different Q1 and Q3 values?

There are at least nine recognized methods for calculating sample quantiles, all of which agree on the median but differ for Q1 and Q3 when the sample size is small. R provides all nine methods via its quantile() function. Excel, Python (NumPy), SPSS, and textbooks each default to a different subset. The most common are the inclusive (Tukey hinges) and exclusive (interpolation) methods, which this calculator supports via the method selector.

How does a box plot compare to a histogram?

A box plot summarizes five key percentiles and makes outliers, spread, and skewness easy to see and compare across groups. A histogram shows the full shape of the distribution including modality (peaks) and fine-grained density. Box plots work well for comparing many groups side by side; histograms are better for understanding the detailed shape of a single distribution. For a thorough analysis, use both.

Sources

Written by Dr. Hannah Brandt, PhD Statistician · Munich, Germany

Applied statistician translating rigorous probability theory into clear, accurate tools for researchers and practitioners.

Search 3,500+ calculators

Loading search…