Skip to main content
Statistics LibreTexts

2.3: The Five-Number Summary and Interquartile Range

  • Page ID
    58864
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Example Scenario: Test Scores

    Imagine a teacher administered a statistics quiz and got back 25 student scores, ranging from very low to very high. She wants to understand how students performed overall: How many did really well? How many struggled? Where’s the “typical” performance?

    This is where percentiles and the five-number summary can help break down the distribution of the data and make outliers easier to spot. Let’s explore the tools you need to do just that.

    What Is the Five-Number Summary?

    The five-number summary gives a quick, informative snapshot of how a set of data is distributed. It consists of five key statistics that help describe the position and spread of a numerical variable. Think of it as an overview, like a short story, that explains what your data looks like.

    The five numbers include the lowest and highest values, the middle value, and two quartile markers that show where the middle 50% of the values fall. These numbers are especially useful when comparing groups or spotting skewed distributions and outliers.


    This is a reference for the five number summary.
    Statistic What It Tells You
    Minimum Smallest value in the dataset
    Q1 (1st Quartile) Value that marks the bottom 25% of the data
    Median (Q2) The middle value; 50% of data is above, 50% is below
    Q3 (3rd Quartile) Value that marks the top 25% of the data
    Maximum Largest value in the dataset

    Each of these points corresponds to meaningful locations in your data’s distribution — and together, they form the backbone of the box-and-whisker plot you'll learn about in the next section.


    Percentiles & Quartiles

    Description: A percentile is the value below which a given percentage of data falls. The quartiles divide the data into four equal parts:

    • Q1 (25th percentile): 25% of values are below this point
    • Q2 (Median / 50th percentile): middle point
    • Q3 (75th percentile): 75% of values are below this point

    Use cases:

    • Classifying scores on tests or surveys
    • Describing household income, rent, or prices in a market
    • Identifying values at known thresholds (e.g. top 10%)

    Example: If your exam score is in the 80th percentile, you scored better than 80% of students.

    How to Calculate Percentiles (by hand)

    To estimate a specific percentile (e.g., the 25th percentile), use the following approach:

    1. Sort the dataset from lowest to highest.
    2. Use the formula to estimate the rank position: \[ R = \frac{p}{100} \times (n + 1) \] where \( p \) is the desired percentile (e.g., 25 for the 25th), and \( n \) is the number of data points.
    3. If \( R \) is a whole number, that item is your percentile value.
      If \( R \) is a decimal, interpolate between the two closest items.

    Example: To find the 25th percentile of a dataset with 10 ordered values:

    • \( R = \frac{25}{100} \times (10 + 1) = 2.75 \)
    • The 25th percentile will lie between the 2nd and 3rd values — 75% of the way between them.

    How to Find Quartiles

    Quartiles follow the same logic:

    • Q1 (25th percentile): what value is one-quarter of the way through the dataset?
    • Q2 (Median, 50%): middle value
    • Q3 (75th percentile): value three-quarters of the way through the dataset

    Excel / Google Sheets Shortcut

    To easily find quartiles and percentiles in Excel:

    • =PERCENTILE.INC(A2:A26, 0.25) → 25th percentile
    • =PERCENTILE.INC(A2:A26, 0.75) → 75th percentile
    • =QUARTILE.INC(A2:A26, 1) → Q1
    • =QUARTILE.INC(A2:A26, 3) → Q3

    These functions save time and are especially helpful when working with larger datasets.

    Interquartile Range (IQR)

    Description: The IQR describes the range of the middle 50% of data — between the 1st and 3rd quartiles. It’s a common measure of spread and helps identify unusually high or low values.

    Formula:

    \[ \text{IQR} = Q3 - Q1 \]

    Why it matters: The IQR is resistant to extreme values and is often used to find skew or irregularities in the tails of a distribution.

    Example: If Q1 = 65 and Q3 = 85, then IQR = 85 - 65 = 20 points.

    Outliers (IQR Rule)

    Description: An outlier is a data point that lies far outside the rest of the distribution. One common rule uses the IQR to flag values:

    Outlier criteria:

    • Lower outlier: \( \text{value} < Q1 - 1.5 \times \text{IQR} \)
    • Upper outlier: \( \text{value} > Q3 + 1.5 \times \text{IQR} \)

    Note: This isn’t a universal rule, but it’s good for detecting extremes in a consistent way.

    Example: If Q1 = 40 and Q3 = 80 → IQR = 40
    Any value below \( 40 - 60 = -20 \) or above \( 80 + 60 = 140 \) may be flagged.


    Applied Example: Student Quiz Scores

    Let’s pretend the teacher has the following quiz scores (out of 100) from 25 students:

    [42, 58, 61, 63, 66, 67, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 88, 90, 92, 94, 95, 97, 98]
      

    From this data, she computes:

    • Min: 42
    • Q1: 66
    • Median (Q2): 76
    • Q3: 88
    • Max: 98

    Five-Number Summary: [42, 66, 76, 88, 98]

    IQR = 88 - 66 = 22 → Outliers would be below \( 66 - 1.5 \times 22 = 33 \) or above \( 88 + 33 = 121 \) → no outliers in this case.

    The five-number summary helps us quickly understand how the class performed overall. In this case, we can see that the lowest score (42) is quite far from the rest of the class, which may indicate a struggling student or an outlier. Half the class scored between 66 and 88 which suggests a relatively strong, consistent middle group. The median score of 76 tells us that most students performed reasonably well. The maximum score (98) shows that at least one student nearly aced the quiz. Altogether, the summary gives us a simple but powerful story: most students scored in a tight middle band with a few scores stretching toward the extremes.

    As you analyze your own data, keep in mind how you might use the five-number summary to describe the distribution of your chosen variable, especially when comparing across groups, highlighting trends, or spotting unusual values or outliers.

    Using Excel to Find Five-Number Summary

    Use these spreadsheet functions to quickly generate a five-number summary:

    Reference functions for the Excel for the 5 number summary.
    Statistic Function in Excel
    Minimum =MIN(A2:A26)
    Q1 (25th percentile) =QUARTILE.INC(A2:A26, 1)
    Median (Q2) =MEDIAN(A2:A26)
    Q3 (75th percentile) =QUARTILE.INC(A2:A26, 3)
    Maximum =MAX(A2:A26)

    Project Sidequest: Adding a Summary Story

    Now that you’ve learned how to calculate the five-number summary and identify outliers, it’s time to return to your semester housing dataset and tell a story with your numbers.

    TODO: Add the five-number summary for one continuous variable, most likely price, to your project’s executive summary write-up. This will provide an overview of how housing costs are distributed and give your audience a clearer picture of the housing market in your region.

    What to include:

    • The full five-number summary (Min, Q1, Median, Q3, Max) clearly labeled
    • A few sentences interpreting what the summary says about your dataset
    • If applicable, mention any potential outliers (based on the IQR rule)

    You’ll use this in the next section when we create boxplots and start comparing distributions. Your write-up is slowly transforming into a full data story!

    💬 Need inspiration? Revisit the quiz score example in this chapter — notice how just five numbers can tell a powerful story about performance, consistency, and extremes.

    Related Videos

    What’s Next: Box-and-Whisker Plots

    Now that you know how to calculate the five-number summary and define outliers, you’re ready to visualize it. In the next section, we’ll introduce box-and-whisker plots, a powerful visual that displays a full distribution at a glance using the five-number summary.


    This page titled 2.3: The Five-Number Summary and Interquartile Range is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Mathematics Department.

    • Was this article helpful?